Last change
on this file since 2515 was
2458,
checked in by mkommend, 15 years ago
|
integrated branch MainForm refactoring into trunk (ticket #771)
|
File size:
1.1 KB
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using HeuristicLab.MainForm.WindowsForms;
|
---|
6 |
|
---|
7 | namespace HeuristicLab.MainForm.Test {
|
---|
8 | public class SaveToolStripButtonItem : HeuristicLab.MainForm.WindowsForms.ToolBarItemBase, ITestUserInterfaceItemProvider {
|
---|
9 | public override int Position {
|
---|
10 | get { return 30; }
|
---|
11 | }
|
---|
12 |
|
---|
13 | public override string Name {
|
---|
14 | get { return "Save"; }
|
---|
15 | }
|
---|
16 |
|
---|
17 | public override System.Drawing.Image Image {
|
---|
18 | get { return HeuristicLab.Common.Resources.Resources.SaveIcon; }
|
---|
19 | }
|
---|
20 |
|
---|
21 | public override void Execute() {
|
---|
22 | new SaveAction().Execute(MainFormManager.MainForm);
|
---|
23 | }
|
---|
24 |
|
---|
25 | public override void ActiveViewChanged(object sender, EventArgs e) {
|
---|
26 | IMainForm mainform = MainFormManager.MainForm;
|
---|
27 | if (mainform.ActiveView == null)
|
---|
28 | this.ToolStripItem.Enabled = false;
|
---|
29 | else
|
---|
30 | this.ToolStripItem.Enabled = !(mainform.ActiveView is FormView1);
|
---|
31 | }
|
---|
32 |
|
---|
33 | public override void ViewChanged(object sender, EventArgs e) {
|
---|
34 | this.ToolStripItem.Enabled = !this.ToolStripItem.Enabled;
|
---|
35 | }
|
---|
36 | }
|
---|
37 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.