- Timestamp:
- 12/03/09 15:12:44 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 7 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); -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/ToolBarItemBase.cs
r2458 r2541 24 24 using System.Text; 25 25 using System.Windows.Forms; 26 26 27 27 namespace HeuristicLab.MainForm.WindowsForms { 28 28 public abstract class ToolBarItemBase : HeuristicLab.MainForm.ToolBarItemBase { -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/ViewBase.cs
r2532 r2541 69 69 } 70 70 71 public event EventHandler Initialize ;71 public event EventHandler Initialized; 72 72 73 73 private void ViewBase_Load(object sender, EventArgs e) { 74 74 if (!this.initialized && !this.DesignMode) { 75 if (this.Initialize != null)76 this.Initialize (this, new EventArgs());75 if (this.Initialized != null) 76 this.Initialized(this, new EventArgs()); 77 77 this.initialized = true; 78 78 } -
trunk/sources/HeuristicLab.MainForm/3.2/Interfaces/IUserInterfaceItem.cs
r2458 r2541 38 38 void ViewChanged(object sender, EventArgs e); 39 39 void MainFormChanged(object sender, EventArgs e); 40 void MainFormInitialized(object sender, EventArgs e); 40 41 } 41 42 } -
trunk/sources/HeuristicLab.MainForm/3.2/MenuSeparatorItemBase.cs
r2514 r2541 37 37 throw new NotImplementedException(); 38 38 } 39 40 public void MainFormInitialized(object sender, EventArgs e) { 41 throw new NotImplementedException(); 42 } 39 43 } 40 44 } -
trunk/sources/HeuristicLab.MainForm/3.2/ToolBarSeparatorItemBase.cs
r2514 r2541 39 39 throw new NotImplementedException(); 40 40 } 41 42 public void MainFormInitialized(object sender, EventArgs e) { 43 throw new NotImplementedException(); 44 } 41 45 } 42 46 } -
trunk/sources/HeuristicLab.MainForm/3.2/UserInterfaceItemBase.cs
r2458 r2541 51 51 public virtual void MainFormChanged(object sender, EventArgs e) { 52 52 } 53 54 public virtual void MainFormInitialized(object sender, EventArgs e) { 55 } 53 56 } 54 57 }
Note: See TracChangeset
for help on using the changeset viewer.