Changeset 2546 for trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems
- Timestamp:
- 12/07/09 02:44:23 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/CloseAllMenuItem.cs
r2520 r2546 10 10 11 11 namespace HeuristicLab.Optimizer.MenuItems { 12 publicclass CloseAllMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {12 internal class CloseAllMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider { 13 13 public override string Name { 14 14 get { return "Clos&e All"; } 15 15 } 16 17 16 public override IEnumerable<string> Structure { 18 17 get { return new string[] { "&File" }; } 19 18 } 20 21 19 public override int Position { 22 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; 23 28 } 24 29 -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/CloseMenuItem.cs
r2520 r2546 10 10 11 11 namespace HeuristicLab.Optimizer.MenuItems { 12 publicclass CloseMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {12 internal class CloseMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider { 13 13 public override string Name { 14 14 get { return "&Close"; } 15 15 } 16 17 16 public override IEnumerable<string> Structure { 18 17 get { return new string[] { "&File" }; } 19 18 } 20 21 19 public override int Position { 22 20 get { return 1600; } 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; 23 28 } 24 29 -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/ExitMenuItem.cs
r2520 r2546 10 10 11 11 namespace HeuristicLab.Optimizer.MenuItems { 12 publicclass ExitMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {12 internal class ExitMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider { 13 13 public override IEnumerable<string> Structure { 14 14 get { return new string[] { "&File" }; } 15 15 } 16 17 16 public override string Name { 18 17 get { return "E&xit"; } 19 18 } 20 21 19 public override int Position { 22 20 get { return 1999; } 23 21 } 24 25 22 public override Keys ShortCutKeys { 26 23 get { return Keys.Control | Keys.X; } -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/NewMenuItem.cs
r2520 r2546 9 9 10 10 namespace HeuristicLab.Optimizer.MenuItems { 11 publicclass NewMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {11 internal class NewMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider { 12 12 public override string Name { 13 13 get { return "&New..."; } 14 14 } 15 16 15 public override IEnumerable<string> Structure { 17 16 get { return new string[] { "&File" }; } 18 17 } 19 20 18 public override int Position { 21 19 get { return 1100; } 22 20 } 23 24 21 public override ToolStripItemDisplayStyle ToolStripItemDisplayStyle { 25 22 get { return ToolStripItemDisplayStyle.ImageAndText; } 26 23 } 27 28 24 public override Image Image { 29 25 get { return Resources.NewIcon; } 30 26 } 31 32 27 public override Keys ShortCutKeys { 33 28 get { return Keys.Control | Keys.N; } … … 35 30 36 31 public override void Execute() { 37 Actions.NewAction.Execute();32 FileManager.New(); 38 33 } 39 34 } -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/OpenMenuItem.cs
r2520 r2546 9 9 10 10 namespace HeuristicLab.Optimizer.MenuItems { 11 publicclass OpenMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {11 internal class OpenMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider { 12 12 public override string Name { 13 13 get { return "&Open..."; } 14 14 } 15 16 15 public override IEnumerable<string> Structure { 17 16 get { return new string[] { "&File" }; } 18 17 } 19 20 18 public override int Position { 21 19 get { return 1200; } 22 20 } 23 24 21 public override ToolStripItemDisplayStyle ToolStripItemDisplayStyle { 25 22 get { return ToolStripItemDisplayStyle.ImageAndText; } 26 23 } 27 28 24 public override Image Image { 29 25 get { return Resources.OpenIcon; } 30 26 } 31 32 27 public override Keys ShortCutKeys { 33 28 get { return Keys.Control | Keys.O; } … … 35 30 36 31 public override void Execute() { 37 Actions.OpenAction.Execute();32 FileManager.Open(); 38 33 } 39 34 } -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAllMenuItem.cs
r2520 r2546 5 5 using System.Windows.Forms; 6 6 using System.Drawing; 7 using HeuristicLab.MainForm; 7 8 using HeuristicLab.MainForm.WindowsForms; 8 9 using HeuristicLab.Common.Resources; 9 10 10 11 namespace HeuristicLab.Optimizer.MenuItems { 11 publicclass SaveAllMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {12 internal class SaveAllMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider { 12 13 public override string Name { 13 14 get { return "Save Al&l"; } 14 15 } 15 16 16 public override IEnumerable<string> Structure { 17 17 get { return new string[] { "&File" }; } 18 18 } 19 20 19 public override int Position { 21 20 get { return 1500; } 22 21 } 23 24 22 public override ToolStripItemDisplayStyle ToolStripItemDisplayStyle { 25 23 get { return ToolStripItemDisplayStyle.ImageAndText; } 26 24 } 27 28 25 public override Image Image { 29 26 get { return Resources.SaveAllIcon; } 30 27 } 31 28 29 public override void MainFormInitialized(object sender, EventArgs e) { 30 ToolStripItem.Enabled = false; 31 } 32 public override void ActiveViewChanged(object sender, EventArgs e) { 33 ToolStripItem.Enabled = MainFormManager.MainForm.Views.FirstOrDefault() != null; 34 } 35 32 36 public override void Execute() { 33 Actions.SaveAllAction.Execute();37 FileManager.SaveAll(); 34 38 } 35 39 } -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAsMenuItem.cs
r2520 r2546 5 5 using System.Windows.Forms; 6 6 using System.Drawing; 7 using HeuristicLab.MainForm; 7 8 using HeuristicLab.MainForm.WindowsForms; 8 9 using HeuristicLab.Common.Resources; 10 using HeuristicLab.Core; 11 using HeuristicLab.Core.Views; 9 12 10 13 namespace HeuristicLab.Optimizer.MenuItems { 11 publicclass SaveAsMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {14 internal class SaveAsMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider { 12 15 public override string Name { 13 16 get { return "Save &As..."; } 14 17 } 15 16 18 public override IEnumerable<string> Structure { 17 19 get { return new string[] { "&File" }; } 18 20 } 19 20 21 public override int Position { 21 22 get { return 1400; } 22 23 } 23 24 24 public override ToolStripItemDisplayStyle ToolStripItemDisplayStyle { 25 25 get { return ToolStripItemDisplayStyle.ImageAndText; } 26 26 } 27 28 27 public override Keys ShortCutKeys { 29 28 get { return Keys.Control | Keys.Shift | Keys.S; } 30 29 } 31 30 31 public override void MainFormInitialized(object sender, EventArgs e) { 32 ToolStripItem.Enabled = false; 33 } 34 public override void ActiveViewChanged(object sender, EventArgs e) { 35 IItemView activeView = MainFormManager.MainForm.ActiveView as IItemView; 36 ToolStripItem.Enabled = ((activeView != null) && (CreatableAttribute.IsCreatable(activeView.Item.GetType()))); 37 } 38 32 39 public override void Execute() { 33 Actions.SaveAsAction.Execute();40 FileManager.SaveAs(); 34 41 } 35 42 } -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveMenuItem.cs
r2520 r2546 5 5 using System.Windows.Forms; 6 6 using System.Drawing; 7 using HeuristicLab.MainForm; 7 8 using HeuristicLab.MainForm.WindowsForms; 8 9 using HeuristicLab.Common.Resources; 10 using HeuristicLab.Core; 11 using HeuristicLab.Core.Views; 9 12 10 13 namespace HeuristicLab.Optimizer.MenuItems { 11 publicclass SaveMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {14 internal class SaveMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider { 12 15 public override string Name { 13 16 get { return "&Save"; } 14 17 } 15 16 18 public override IEnumerable<string> Structure { 17 19 get { return new string[] { "&File" }; } 18 20 } 19 20 21 public override int Position { 21 22 get { return 1300; } 22 23 } 23 24 24 public override ToolStripItemDisplayStyle ToolStripItemDisplayStyle { 25 25 get { return ToolStripItemDisplayStyle.ImageAndText; } 26 26 } 27 28 27 public override Image Image { 29 28 get { return Resources.SaveIcon; } 30 29 } 31 32 30 public override Keys ShortCutKeys { 33 31 get { return Keys.Control | Keys.S; } 34 32 } 35 33 34 public override void MainFormInitialized(object sender, EventArgs e) { 35 ToolStripItem.Enabled = false; 36 } 37 public override void ActiveViewChanged(object sender, EventArgs e) { 38 IItemView activeView = MainFormManager.MainForm.ActiveView as IItemView; 39 ToolStripItem.Enabled = ((activeView != null) && (CreatableAttribute.IsCreatable(activeView.Item.GetType()))); 40 } 41 36 42 public override void Execute() { 37 Actions.SaveAction.Execute();43 FileManager.Save(); 38 44 } 39 45 } -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/Separators.cs
r2520 r2546 10 10 11 11 namespace HeuristicLab.Optimizer.MenuItems { 12 publicclass SeparatorMenuItem : MenuSeparatorItemBase, IOptimizerUserInterfaceItemProvider {12 internal class SeparatorMenuItem : MenuSeparatorItemBase, IOptimizerUserInterfaceItemProvider { 13 13 public override IEnumerable<string> Structure { 14 14 get { return new string[] { "&File" }; }
Note: See TracChangeset
for help on using the changeset viewer.