//TODO make testable constructor public CruiseWizardPresenter(CruiseWizardView View, WindowPresenter windowPresenter, ApplicationControllerBase applicationController, DAL database) { this.View = View; this.WindowPresenter = windowPresenter; this.ApplicationController = applicationController; View.Presenter = this; _database = database; LoadSetupData();//load tree defaults, product codes, etc. LoadCruiseData();//read data from existing file //See if the file contains a template file record string templatePath = _database.ReadGlobalValue("CSM", "TemplatePath"); if (!String.IsNullOrEmpty(templatePath)) { this._fileHasTemplate = true; this._templateFile = new FileInfo(templatePath); View.SetTemplatePathTextBox(templatePath, false); } if (this.CuttingUnits.Count == 0) { this.CuttingUnits.Add(GetNewCuttingUnit()); } }