コード例 #1
0
ファイル: Controller.cs プロジェクト: nphelpsiv/Spreadsheet
 /// <summary>
 /// Handles a request to close the window
 /// </summary>
 private void HandleClose()
 {
     if (model.Changed())
     {
         var result = MessageBox.Show("You are about to exit without saving!" + "\n" + "Contine?", "WARNING!",
                                      MessageBoxButtons.YesNo,
                                      MessageBoxIcon.Question);
         if (result == DialogResult.Yes)
         {
             window.DoClose();
         }
         else
         {
         }
     }
     else
     {
         window.DoClose();
     }
 }
コード例 #2
0
 /// <summary>
 /// Handles a request to close the window
 /// </summary>
 private void HandleClose()
 {
     //Check for unsaved progress before closing the window.
     if (sheet.Changed == true)
     {
         window.SaveWarning();
     }
     else
     {
         //Just closes the window since nothing needed to be saved.
         window.DoClose();
     }
 }
コード例 #3
0
ファイル: Controller.cs プロジェクト: carlosEGuerra/Boggle
 /// <summary>
 /// Handles a request to close the window
 /// </summary>
 private void HandleClose()
 {
     window.DoClose();
 }