示例#1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (DataToSave() && (!dataSaved && MessageBoxes.ShowSaveWarningMessageBox("You have not saved, do you really want to close the application?") == MessageBoxResult.No))
     {
         e.Cancel = true;
     }
 }
示例#2
0
 /// <summary>
 /// Asks theuser if they want to continue without saving
 /// </summary>
 /// <returns>true/false</returns>
 private static bool WantToContinueWithoutSaving()
 {
     return(MessageBoxes.ShowSaveWarningMessageBox("Your current work will be lost, please save them first. Do you want to continue?") == MessageBoxResult.Yes);
 }