Last change
on this file since 2591 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.4 KB
|
Rev | Line | |
---|
[2520] | 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;
|
---|
[2546] | 7 | using HeuristicLab.MainForm;
|
---|
[2520] | 8 | using HeuristicLab.MainForm.WindowsForms;
|
---|
| 9 | using HeuristicLab.Common.Resources;
|
---|
[2546] | 10 | using HeuristicLab.Core;
|
---|
| 11 | using HeuristicLab.Core.Views;
|
---|
[2520] | 12 |
|
---|
| 13 | namespace HeuristicLab.Optimizer.MenuItems {
|
---|
[2546] | 14 | internal class SaveAsMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItemBase, IOptimizerUserInterfaceItemProvider {
|
---|
[2520] | 15 | public override string Name {
|
---|
| 16 | get { return "Save &As..."; }
|
---|
| 17 | }
|
---|
| 18 | public override IEnumerable<string> Structure {
|
---|
| 19 | get { return new string[] { "&File" }; }
|
---|
| 20 | }
|
---|
| 21 | public override int Position {
|
---|
| 22 | get { return 1400; }
|
---|
| 23 | }
|
---|
| 24 | public override ToolStripItemDisplayStyle ToolStripItemDisplayStyle {
|
---|
| 25 | get { return ToolStripItemDisplayStyle.ImageAndText; }
|
---|
| 26 | }
|
---|
| 27 | public override Keys ShortCutKeys {
|
---|
| 28 | get { return Keys.Control | Keys.Shift | Keys.S; }
|
---|
| 29 | }
|
---|
| 30 |
|
---|
[2546] | 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 |
|
---|
[2520] | 39 | public override void Execute() {
|
---|
[2546] | 40 | FileManager.SaveAs();
|
---|
[2520] | 41 | }
|
---|
| 42 | }
|
---|
| 43 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.