- Timestamp:
- 04/11/10 19:32:52 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/MainForm.cs
r2963 r3301 31 31 using HeuristicLab.PluginInfrastructure; 32 32 using System.Collections; 33 using WeifenLuo.WinFormsUI.Docking; 33 34 34 35 namespace HeuristicLab.MainForm.WindowsForms { … … 162 163 this.ActiveView = GetView((Form)sender); 163 164 } 165 166 protected override void OnFormClosing(FormClosingEventArgs e) { 167 foreach (KeyValuePair<IView,Form > pair in this.views) { 168 DockForm dockForm = pair.Value as DockForm; 169 View view = pair.Key as View; 170 if (view != null && dockForm != null && dockForm.DockState != DockState.Document) { 171 view.CloseReason = CloseReason.ApplicationExitCall; 172 view.OnClosingHelper(dockForm, e); 173 } 174 } 175 base.OnFormClosing(e); 176 } 177 178 protected override void OnFormClosed(FormClosedEventArgs e) { 179 foreach (KeyValuePair<IView, Form> pair in this.views.ToList()) { 180 DockForm dockForm = pair.Value as DockForm; 181 View view = pair.Key as View; 182 if (view != null && dockForm != null && dockForm.DockState != DockState.Document) { 183 view.CloseReason = CloseReason.ApplicationExitCall; 184 view.OnClosedHelper(dockForm, e); 185 dockForm.Close(); 186 } 187 } 188 base.OnFormClosed(e); 189 } 164 190 #endregion 165 191 … … 188 214 form.Activated += new EventHandler(FormActivated); 189 215 form.FormClosed += new FormClosedEventHandler(ChildFormClosed); 190 216 191 217 } 192 218 this.Show(view, firstTimeShown);
Note: See TracChangeset
for help on using the changeset viewer.