public CanCloseResult CanClose()
        {
            if (WinForm != null)
            {
                WinForm.TextChanged -= OnFormTextChanged;
                WinForm.Close();

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