Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3488


Ignore:
Timestamp:
04/22/10 15:50:02 (15 years ago)
Author:
mkommend
Message:

fired MainForm.Changed event if a contained view changed (ticket #972)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForm.cs

    r3437 r3488  
    9191    protected void AddViewFormCombination(IView view, Form form) {
    9292      this.views.Add(view, form);
    93       view.Changed += new EventHandler(ViewChanged);
     93      view.Changed += new EventHandler(View_Changed);
    9494    }
    9595
     
    156156
    157157    public event EventHandler Changed;
    158     protected void FireMainFormChanged() {
     158    protected void OnChanged() {
    159159      if (InvokeRequired)
    160         Invoke((MethodInvoker)FireMainFormChanged);
     160        Invoke((MethodInvoker)OnChanged);
    161161      else {
    162162        EventHandler handler = Changed;
     
    254254    }
    255255
    256     private void ViewChanged(object sender, EventArgs e) {
     256    private void View_Changed(object sender, EventArgs e) {
    257257      IView view = (IView)sender;
    258258      if (view == this.ActiveView)
    259259        this.OnActiveViewChanged();
     260      this.OnChanged();
    260261    }
    261262
     
    283284      IView view = GetView(form);
    284285
    285       view.Changed -= new EventHandler(ViewChanged);
     286      view.Changed -= new EventHandler(View_Changed);
    286287      form.Activated -= new EventHandler(FormActivated);
    287288      form.FormClosed -= new FormClosedEventHandler(ChildFormClosed);
Note: See TracChangeset for help on using the changeset viewer.