Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2300 for trunk/sources


Ignore:
Timestamp:
08/21/09 09:51:59 (15 years ago)
Author:
mkommend
Message:

added MainFormChanged event (ticket #716)

Location:
trunk/sources/HeuristicLab.MainForm/3.2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.MainForm/3.2/Interfaces/IMainForm.cs

    r2298 r2300  
    3434    IView ActiveView { get; }
    3535    event EventHandler ActiveViewChanged;
     36    event EventHandler MainFormChanged;
    3637    IEnumerable<IView> Views { get; }
    3738
  • trunk/sources/HeuristicLab.MainForm/3.2/Interfaces/IToolStripItem.cs

    r2269 r2300  
    4040    void ActiveViewChanged(object sender, EventArgs e);
    4141    void ViewChanged(object sender, EventArgs e);
     42    void MainFormChanged(object sender, EventArgs e);
    4243  }
    4344}
  • trunk/sources/HeuristicLab.MainForm/3.2/MainFormBase.cs

    r2298 r2300  
    9898    }
    9999
     100    public event EventHandler MainFormChanged;
     101    public void FireMainFormChanged() {
     102      OnMainFormChanged();
     103    }
     104    protected virtual void OnMainFormChanged() {
     105      if (MainFormChanged != null)
     106        MainFormChanged(this, new EventArgs());
     107    }
     108
    100109    protected List<IView> views;
    101110    public IEnumerable<IView> Views {
     
    181190      toolStripItem.Image = iToolStripItem.Image;
    182191      toolStripItem.DisplayStyle = iToolStripItem.DisplayStyle;
    183       this.ActiveViewChanged += new EventHandler(iToolStripItem.ActiveViewChanged);   
     192      this.ActiveViewChanged += new EventHandler(iToolStripItem.ActiveViewChanged);
     193      this.MainFormChanged += new EventHandler(iToolStripItem.MainFormChanged);
    184194      toolStripItem.Click += new EventHandler(ToolStripItemClicked);
    185195      this.toolStripItems.Add(iToolStripItem);
  • trunk/sources/HeuristicLab.MainForm/3.2/ToolStripItemBase.cs

    r2269 r2300  
    6161    public virtual void ViewChanged(object sender, EventArgs e) {
    6262    }
     63
     64    public virtual void MainFormChanged(object sender, EventArgs e) {
     65    }
    6366    #endregion
    6467  }
Note: See TracChangeset for help on using the changeset viewer.