Last change
on this file since 2578 was
2546,
checked in by swagner, 15 years ago
|
Continued work on Optimizer and on adapting all views to the new MainForm concept (#770)
|
File size:
1.1 KB
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using System.Windows.Forms;
|
---|
6 | using System.Drawing;
|
---|
7 | using HeuristicLab.MainForm;
|
---|
8 | using HeuristicLab.MainForm.WindowsForms;
|
---|
9 | using HeuristicLab.Common.Resources;
|
---|
10 |
|
---|
11 | namespace HeuristicLab.Optimizer.MenuItems {
|
---|
12 | internal class CloseAllMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
|
---|
13 | public override string Name {
|
---|
14 | get { return "Clos&e All"; }
|
---|
15 | }
|
---|
16 | public override IEnumerable<string> Structure {
|
---|
17 | get { return new string[] { "&File" }; }
|
---|
18 | }
|
---|
19 | public override int Position {
|
---|
20 | get { return 1700; }
|
---|
21 | }
|
---|
22 |
|
---|
23 | public override void MainFormInitialized(object sender, EventArgs e) {
|
---|
24 | ToolStripItem.Enabled = false;
|
---|
25 | }
|
---|
26 | public override void ActiveViewChanged(object sender, EventArgs e) {
|
---|
27 | ToolStripItem.Enabled = MainFormManager.MainForm.Views.FirstOrDefault() != null;
|
---|
28 | }
|
---|
29 |
|
---|
30 | public override void Execute() {
|
---|
31 | MainFormManager.MainForm.CloseAllViews();
|
---|
32 | }
|
---|
33 | }
|
---|
34 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.