/// <summary>Application is closing - allow this to happen?</summary> /// <param name="sender">Event sender.</param> /// <param name="e">Close arguments</param> private void OnClosing(object sender, AllowCloseArgs e) { Utility.Configuration.Settings.MainFormLocation = view.WindowLocation; Utility.Configuration.Settings.MainFormSize = view.WindowSize; Utility.Configuration.Settings.MainFormWindowState = view.WindowMinimisedOrMaximised; }
/// <summary>Application is closing - allow this to happen?</summary> /// <param name="sender">Event sender.</param> /// <param name="e">Close arguments</param> private void OnClosing(object sender, AllowCloseArgs e) { e.AllowClose = AllowClose(); if (e.AllowClose) { Utility.Configuration.Settings.MainFormLocation = view.WindowLocation; Utility.Configuration.Settings.MainFormSize = view.WindowSize; Utility.Configuration.Settings.MainFormMaximized = view.WindowMaximised; } }