public frmManager() { InitializeComponent(); //Set custom format for DateTimePicker /* this.dtEmployeeDOB.Format = DateTimePickerFormat.Custom; * this.dtPhoneYear.Format = DateTimePickerFormat.Custom; * * this.dtEmployeeDOB.CustomFormat = "dd-MM-yyyy"; * this.dtPhoneYear.CustomFormat = "dd-MM-yyyy";*/ _managerPresenter = new ManagerPresenter(this); }
static void Main() { try { IMainView MainWin = new MainUI(); IModel MainModel = new DataIO(); MainModel.LoadData(); IManager Manager = new QuestionManager(); MainWin.SetManager(Manager); MainPresenter presenter1 = new MainPresenter(MainWin, MainModel); ManagerPresenter presenter2 = new ManagerPresenter(Manager, MainModel); ((MainUI)MainWin).ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }