Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/04/09 15:09:43 (15 years ago)
Author:
mkommend
Message:

changed CloseReason to FormOwnerClosing if IView.Close method is used (ticket #771)

File:
1 edited

Legend:

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

    r2541 r2543  
    5555          this.initialized = true;
    5656          if (this.Initialized != null)
    57             this.Initialized(this,new EventArgs());
     57            this.Initialized(this, new EventArgs());
    5858        }
    5959      }
     
    154154          form.GotFocus += new EventHandler(FormActivated);
    155155          form.FormClosing += new FormClosingEventHandler(view.OnClosing);
    156           form.FormClosing += new FormClosingEventHandler(((ViewBase)view).OnClosing);
     156          form.FormClosing += new FormClosingEventHandler(((ViewBase)view).OnClosingHelper);
    157157          form.FormClosed += new FormClosedEventHandler(view.OnClosed);
    158158          form.FormClosed += new FormClosedEventHandler(ChildFormClosed);
     
    176176      if (InvokeRequired) Invoke((Action<IView>)CloseView, view);
    177177      else {
    178         if (views.ContainsKey(view))
     178        if (views.ContainsKey(view)) {
     179          ((ViewBase)view).closeReason = CloseReason.FormOwnerClosing;
    179180          views[view].Close();
     181        }
    180182      }
    181183    }
     
    195197      form.GotFocus -= new EventHandler(FormActivated);
    196198      form.FormClosing -= new FormClosingEventHandler(view.OnClosing);
    197       form.FormClosing -= new FormClosingEventHandler(((ViewBase)view).OnClosing);
     199      form.FormClosing -= new FormClosingEventHandler(((ViewBase)view).OnClosingHelper);
    198200      form.FormClosed -= new FormClosedEventHandler(view.OnClosed);
    199201      form.FormClosed -= new FormClosedEventHandler(ChildFormClosed);
Note: See TracChangeset for help on using the changeset viewer.