protected virtual void OnClosing(WindowClosingEventArgs e) { if (Closing != null) { Closing.Invoke(this, e); } }
private void Manager_WindowClosing(object sender, WindowClosingEventArgs e) { e.Cancel = !mExit && mExitConfirmation; if (!mExit && mExitConfirmation && mExitDialog == null) { mExitDialog = new ExitDialog(Manager); mExitDialog.Init(); mExitDialog.Closed += new WindowClosedEventHandler(closeDialog_Closed); mExitDialog.ShowModal(); Manager.Add(mExitDialog); } else if (!mExitConfirmation) { Exit(); } }
public virtual void Close() { WindowClosingEventArgs ex = new WindowClosingEventArgs(); OnClosing(ex); if (!ex.Cancel) { Manager.Input.KeyDown -= Input_KeyDown; Manager.Input.GamePadDown -= Input_GamePadDown; Manager.ModalWindow = lastModal; if (lastModal != null) lastModal.Focused = true; Hide(); WindowClosedEventArgs ev = new WindowClosedEventArgs(); OnClosed(ev); if (ev.Dispose) { this.Dispose(); } } }
public virtual void Close() { WindowClosingEventArgs ex = new WindowClosingEventArgs(); OnClosing(ex); if (!ex.Cancel) { Manager.Input.KeyDown -= Input_KeyDown; Manager.Input.GamePadDown -= Input_GamePadDown; Manager.ModalWindow = lastModal; if (lastModal != null) { lastModal.Focused = true; } Hide(); WindowClosedEventArgs ev = new WindowClosedEventArgs(); OnClosed(ev); if (ev.Dispose) { this.Dispose(); } } }
internal void Window_FormClosing(object sender, FormClosingEventArgs e) { bool ret = false; WindowClosingEventArgs ex = new WindowClosingEventArgs(); if (WindowClosing != null) { WindowClosing.Invoke(this, ex); ret = ex.Cancel; } e.Cancel = ret; }
protected virtual void OnClosing(WindowClosingEventArgs e) { if (Closing != null) Closing.Invoke(this, e); }
private void MainWindow_Closing(object sender, WindowClosingEventArgs e) { e.Cancel = true; Manager_WindowClosing(sender, e); }