Changeset 2636
- Timestamp:
- 01/18/10 10:59:25 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.MainForm.Test/3.2/Actions/NewEditorAction.cs
r2458 r2636 7 7 namespace HeuristicLab.MainForm.Test { 8 8 public static class NewEditorAction{ 9 private static IView view; 9 10 10 public static void Execute(IMainForm mainform) { 11 if (view == null) 12 view = new EditorView(); 13 view.Caption = "Editor View"; 11 EditorView view = new EditorView(); 12 view.Caption = "Editor View " + mainform.Views.Count(); 14 13 mainform.ShowView(view); 15 14 } -
trunk/sources/HeuristicLab.MainForm.Test/3.2/ButtonItems/OpenToolStripButtonItem.cs
r2514 r2636 22 22 new OpenAction().Execute(MainFormManager.MainForm); 23 23 } 24 25 public override void ActiveViewChanged(object sender, EventArgs e) { 26 this.ToolStripItem.Enabled = !this.ToolStripItem.Enabled; 27 MainFormManager.MainForm.Title = 28 MainFormManager.MainForm.ActiveView == null ? "null" : MainFormManager.MainForm.ActiveView.Caption; 29 } 24 30 } 25 31 } -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/DockingMainForm.Designer.cs
r2458 r2636 115 115 this.dockPanel.Skin = dockPanelSkin1; 116 116 this.dockPanel.TabIndex = 3; 117 this.dockPanel.ActiveContentChanged += new System.EventHandler(this.dockPanel_ActiveContentChanged); 117 118 // 118 119 // DockingMainForm -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/DockingMainForm.cs
r2548 r2636 67 67 } 68 68 69 private void dockPanel_ActiveContentChanged(object sender, EventArgs e) { 70 DockForm content = this.dockPanel.ActiveContent as DockForm; 71 this.ActiveView = content == null ? null : content.View; 72 } 69 73 } 70 74 } -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/MainFormBase.cs
r2591 r2636 176 176 views[view] = form; 177 177 form.Activated += new EventHandler(FormActivated); 178 form.GotFocus += new EventHandler(FormActivated);179 178 form.FormClosing += new FormClosingEventHandler(view.OnClosing); 180 179 form.FormClosing += new FormClosingEventHandler(((ViewBase)view).OnClosingHelper); … … 192 191 } 193 192 194 protected virtual void Show(IView view, bool firstTimeShown) { 193 protected virtual void Show(IView view, bool firstTimeShown) { 195 194 } 196 195 … … 245 244 246 245 form.Activated -= new EventHandler(FormActivated); 247 form.GotFocus -= new EventHandler(FormActivated);248 246 form.FormClosing -= new FormClosingEventHandler(view.OnClosing); 249 247 form.FormClosing -= new FormClosingEventHandler(((ViewBase)view).OnClosingHelper); … … 269 267 270 268 #region create menu and toolbar 271 protected virtual void CreateGUI() { 272 269 protected virtual void CreateGUI() { 273 270 IEnumerable<IMenuItem> toolStripMenuItems = 274 271 from mi in ApplicationManager.Manager.GetInstances(userInterfaceItemType)
Note: See TracChangeset
for help on using the changeset viewer.