- Timestamp:
- 12/07/09 02:44:23 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note: See TracChangeset
for help on using the changeset viewer.