Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/18/10 10:59:25 (14 years ago)
Author:
mkommend
Message:

registered on additional event ActiveContentChanged in !WinFormsUI to fire ActiveViewChanged (ticket #843)

Location:
trunk/sources/HeuristicLab.MainForm.Test/3.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.MainForm.Test/3.2/Actions/NewEditorAction.cs

    r2458 r2636  
    77namespace HeuristicLab.MainForm.Test {
    88  public static class NewEditorAction{
    9     private static IView view;
     9
    1010    public static void Execute(IMainForm mainform) {
    11       if (view == null)
    12         view = new EditorView();
    13       view.Caption = "Editor View";
     11      EditorView view = new EditorView();
     12      view.Caption = "Editor View " + mainform.Views.Count();
    1413      mainform.ShowView(view);
    1514    }
  • trunk/sources/HeuristicLab.MainForm.Test/3.2/ButtonItems/OpenToolStripButtonItem.cs

    r2514 r2636  
    2222      new OpenAction().Execute(MainFormManager.MainForm);
    2323    }
     24
     25    public override void ActiveViewChanged(object sender, EventArgs e) {
     26      this.ToolStripItem.Enabled = !this.ToolStripItem.Enabled;
     27      MainFormManager.MainForm.Title =
     28        MainFormManager.MainForm.ActiveView == null ? "null" : MainFormManager.MainForm.ActiveView.Caption;
     29    }
    2430  }
    2531}
Note: See TracChangeset for help on using the changeset viewer.