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
|
Rev | Line | |
---|
[2249] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.Linq;
|
---|
| 4 | using System.Text;
|
---|
[2458] | 5 | using HeuristicLab.MainForm.WindowsForms;
|
---|
[2249] | 6 |
|
---|
| 7 | namespace HeuristicLab.MainForm.Test {
|
---|
[2458] | 8 | public class SaveToolStripButtonItem : HeuristicLab.MainForm.WindowsForms.ToolBarItemBase, ITestUserInterfaceItemProvider {
|
---|
[2249] | 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 |
|
---|
[2458] | 21 | public override void Execute() {
|
---|
| 22 | new SaveAction().Execute(MainFormManager.MainForm);
|
---|
[2249] | 23 | }
|
---|
[2254] | 24 |
|
---|
| 25 | public override void ActiveViewChanged(object sender, EventArgs e) {
|
---|
[2458] | 26 | IMainForm mainform = MainFormManager.MainForm;
|
---|
[2254] | 27 | if (mainform.ActiveView == null)
|
---|
| 28 | this.ToolStripItem.Enabled = false;
|
---|
| 29 | else
|
---|
[2458] | 30 | this.ToolStripItem.Enabled = !(mainform.ActiveView is FormView1);
|
---|
[2254] | 31 | }
|
---|
| 32 |
|
---|
[2256] | 33 | public override void ViewChanged(object sender, EventArgs e) {
|
---|
[2254] | 34 | this.ToolStripItem.Enabled = !this.ToolStripItem.Enabled;
|
---|
| 35 | }
|
---|
[2249] | 36 | }
|
---|
| 37 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.