Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2532 for trunk/sources


Ignore:
Timestamp:
11/25/09 10:43:07 (15 years ago)
Author:
mkommend
Message:

added new virtual method for form closing (ticket #771)

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

Legend:

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

    r2514 r2532  
    143143          form.GotFocus += new EventHandler(FormActivated);
    144144          form.FormClosing += new FormClosingEventHandler(view.OnClosing);
     145          form.FormClosing += new FormClosingEventHandler(((ViewBase)view).OnClosing);
    145146          form.FormClosed += new FormClosedEventHandler(view.OnClosed);
    146147          form.FormClosed += new FormClosedEventHandler(ChildFormClosed);
    147148          foreach (IUserInterfaceItem item in UserInterfaceItems)
    148             view.Changed += new EventHandler(item.ViewChanged);
     149            view.Changed += new EventHandler(item.ViewChanged);         
    149150          return true;
    150151        } else
     
    183184      form.GotFocus -= new EventHandler(FormActivated);
    184185      form.FormClosing -= new FormClosingEventHandler(view.OnClosing);
     186      form.FormClosing -= new FormClosingEventHandler(((ViewBase)view).OnClosing);
    185187      form.FormClosed -= new FormClosedEventHandler(view.OnClosed);
    186188      form.FormClosed -= new FormClosedEventHandler(ChildFormClosed);
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/ViewBase.cs

    r2510 r2532  
    5151    protected virtual void OnCaptionChanged() {
    5252      if (CaptionChanged != null)
    53         CaptionChanged(this, new EventArgs());     
     53        CaptionChanged(this, new EventArgs());
    5454    }
    5555
     
    5757    protected virtual void OnChanged() {
    5858      if (Changed != null)
    59         Changed(this, new EventArgs());   
     59        Changed(this, new EventArgs());
    6060    }
    6161
    62     public virtual void OnClosing(object sender, CancelEventArgs e) {
     62    public virtual void OnClosing(object sender, CancelEventArgs e) {     
     63    }
     64
     65    public virtual void OnClosing(object sender, FormClosingEventArgs e) {
    6366    }
    6467
Note: See TracChangeset for help on using the changeset viewer.