- Timestamp:
- 12/03/09 15:12:44 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/MainFormBase.cs
r2539 r2541 33 33 namespace HeuristicLab.MainForm.WindowsForms { 34 34 public partial class MainFormBase : Form, IMainForm { 35 36 private bool initialized; 35 37 protected MainFormBase() 36 38 : base() { … … 38 40 this.views = new Dictionary<IView, Form>(); 39 41 this.userInterfaceItems = new List<IUserInterfaceItem>(); 42 this.initialized = false; 40 43 } 41 44 … … 44 47 this.userInterfaceItemType = userInterfaceItemType; 45 48 CreateGUI(); 46 OnMainFormChanged();47 49 } 48 50 49 51 private void MainFormBase_Load(object sender, EventArgs e) { 50 if (!DesignMode) 52 if (!DesignMode) { 51 53 MainFormManager.RegisterMainForm(this); 52 } 54 if (!this.initialized) { 55 this.initialized = true; 56 if (this.Initialized != null) 57 this.Initialized(this,new EventArgs()); 58 } 59 } 60 } 61 62 public event EventHandler Initialized; 53 63 54 64 #region IMainForm Members … … 239 249 this.InsertItem(menuItem.Structure, typeof(ToolStripMenuItem), new ToolStripSeparator(), menuStrip.Items); 240 250 } 241 251 } 242 252 243 253 private void AddToolStripButtonItem(IToolBarItem buttonItem) { … … 253 263 item.DisplayStyle = ((ToolBarItemBase)buttonItem).ToolStripItemDisplayStyle; 254 264 ((ToolBarItemBase)buttonItem).ToolStripItem = item; 255 } else if (buttonItem is IToolBarSeparatorItem) 265 } else if (buttonItem is IToolBarSeparatorItem) 256 266 item = new ToolStripSeparator(); 257 267 258 268 this.InsertItem(buttonItem.Structure, typeof(ToolStripDropDownButton), item, toolStrip.Items); 259 269 } … … 281 291 this.ActiveViewChanged += new EventHandler(userInterfaceItem.ActiveViewChanged); 282 292 this.Changed += new EventHandler(userInterfaceItem.MainFormChanged); 293 this.Initialized += new EventHandler(userInterfaceItem.MainFormInitialized); 283 294 toolStripItem.Click += new EventHandler(ToolStripItemClicked); 284 295 this.userInterfaceItems.Add(userInterfaceItem);
Note: See TracChangeset
for help on using the changeset viewer.