Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.MainForm.Test/3.2/ButtonItems/SaveToolStripButtonItem.cs @ 2269

Last change on this file since 2269 was 2269, checked in by mkommend, 15 years ago

SingleDocumentMainForm shows open froms in taskbar
removed bool listen members from !IToolStripItem
(ticket #716)

File size: 1.0 KB
RevLine 
[2249]1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5
6namespace HeuristicLab.MainForm.Test {
7  public class SaveToolStripButtonItem : ToolStripButtonItemBase, ITestUserInterfaceItemProvider {
8    public override int Position {
9      get { return 30; }
10    }
11
12    public override string Name {
13      get { return "Save"; }
14    }
15
16    public override System.Drawing.Image Image {
17      get { return HeuristicLab.Common.Resources.Resources.SaveIcon; }
18    }
19
20    public override void Execute(IMainForm mainform) {
21      new SaveAction().Execute(mainform);
22    }
[2254]23
24    public override void ActiveViewChanged(object sender, EventArgs e) {
25      IMainForm mainform = (IMainForm)sender;
26      if (mainform.ActiveView == null)
27        this.ToolStripItem.Enabled = false;
28      else
29        this.ToolStripItem.Enabled = !(mainform.ActiveView is FormView);
30    }
31
[2256]32    public override void ViewChanged(object sender, EventArgs e) {
[2254]33      this.ToolStripItem.Enabled = !this.ToolStripItem.Enabled;
34    }
[2249]35  }
36}
Note: See TracBrowser for help on using the repository browser.