- Timestamp:
- 05/01/10 02:46:16 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/CloseAllMenuItem.cs
r3571 r3576 40 40 41 41 protected override void OnToolStripItemSet(EventArgs e) { 42 ToolStripItem.Enabled = false;42 ToolStripItem.Enabled = MainFormManager.MainForm.Views.Any<IView>(v => v.IsShown && !(v is Sidebar)); 43 43 } 44 44 protected override void OnActiveViewChanged(object sender, EventArgs e) { … … 47 47 48 48 public override void Execute() { 49 foreach (IView view in MainFormManager.MainForm.Views)50 if (!(view is Sidebar))51 49 var views = MainFormManager.MainForm.Views.Where(x => !(x is Sidebar)).ToArray(); 50 foreach (IView view in views) 51 view.Close(); 52 52 } 53 53 } -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/CloseMenuItem.cs
r3571 r3576 39 39 40 40 protected override void OnToolStripItemSet(EventArgs e) { 41 ToolStripItem.Enabled = false;41 ToolStripItem.Enabled = !(MainFormManager.MainForm.ActiveView is Sidebar); 42 42 } 43 43 protected override void OnActiveViewChanged(object sender, EventArgs e) { 44 IView view = MainFormManager.MainForm.ActiveView; 45 ToolStripItem.Enabled = !(view is Sidebar); 44 ToolStripItem.Enabled = !(MainFormManager.MainForm.ActiveView is Sidebar); 46 45 } 47 46
Note: See TracChangeset
for help on using the changeset viewer.