public CanCloseResult CanClose() { if (WinForm != null) { WinForm.TextChanged -= OnFormTextChanged; WinForm.Close(); return(WinForm == null || WinForm.IsDisposed ? CanCloseResult.Yes : CanCloseResult.No); } return(CanCloseResult.Yes); }
/// <summary> /// Force-closes and disposes the window. /// </summary> public void ForceClose() { if (WinForm.InvokeRequired) { InvokeOnForm((MethodInvoker) delegate { WinForm.Close(); }); return; } WinForm.Close(); }
/// <summary> /// Handles user's action to close and update. /// </summary> private void updateNow() { updateAfterClose = true; WinForm.Close(); }