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
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 |
|
---|
6 | namespace 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 | }
|
---|
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 |
|
---|
32 | public override void ViewChanged(object sender, EventArgs e) {
|
---|
33 | this.ToolStripItem.Enabled = !this.ToolStripItem.Enabled;
|
---|
34 | }
|
---|
35 | }
|
---|
36 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.