public IMainForm LoadForm() { this.form = dlgFactory.CreateMainForm(); dm = new DecompilerMenus(this); form.Menu = dm.MainMenu; dm.MainToolbar.Text = ""; dm.MainToolbar.ImageList = form.ImageList; dm.ProjectBrowserToolbar.ImageList = form.ImageList; form.AddToolbar(dm.MainToolbar); form.AddProjectBrowserToolbar(dm.ProjectBrowserToolbar); var svcFactory = sc.RequireService <IServiceFactory>(); CreateServices(svcFactory, sc, dm); CreatePhaseInteractors(svcFactory); projectBrowserSvc.Clear(); form.Load += this.MainForm_Loaded; form.Closed += this.MainForm_Closed; form.ProcessCommandKey += this.MainForm_ProcessCommandKey; form.ToolBar.ItemClicked += toolBar_ItemClicked; form.ProjectBrowserToolbar.ItemClicked += toolBar_ItemClicked; //form.InitialPage.IsDirtyChanged += new EventHandler(InitialPage_IsDirtyChanged);//$REENABLE //MainForm.InitialPage.IsDirty = false; //$REENABLE return(form); }
public IMainForm LoadForm() { this.form = dlgFactory.CreateMainForm(); dm = new DecompilerMenus(this); form.Menu = dm.MainMenu; dm.MainToolbar.Text = ""; dm.MainToolbar.ImageList = form.ImageList; dm.ProjectBrowserToolbar.ImageList = form.ImageList; form.AddToolbar(dm.MainToolbar); form.AddProjectBrowserToolbar(dm.ProjectBrowserToolbar); var svcFactory = sc.RequireService<IServiceFactory>(); CreateServices(svcFactory, sc, dm); CreatePhaseInteractors(svcFactory); projectBrowserSvc.Clear(); form.Load += this.MainForm_Loaded; form.Closed += this.MainForm_Closed; form.ProcessCommandKey += this.MainForm_ProcessCommandKey; form.ToolBar.ItemClicked += toolBar_ItemClicked; form.ProjectBrowserToolbar.ItemClicked += toolBar_ItemClicked; //form.InitialPage.IsDirtyChanged += new EventHandler(InitialPage_IsDirtyChanged);//$REENABLE //MainForm.InitialPage.IsDirty = false; //$REENABLE return form; }