Example #1
0
 private void MenuPropertiesClick(object sender, EventArgs e)
 {
     if (PropertyWindow != null)
     {
         PropertyWindow.Close();
     }
     else
     {
         ShowSubWindow(PropertyWindow = new PhotoPropertyWindow());
     }
 }
Example #2
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     // Show warning of unsaved progress
     if (CurrentSaveStatus == SaveStatus.Unsaved)
     {
         var result = MessageBox.Show("There are unsaved annotations. Would you like to make a save first?\n" +
                                      "Click Yes to save before exit, \n" +
                                      "Click No to discard unsaved annotations, \n" +
                                      "Click Cancel to cancel exiting.",
                                      "Confirmation", MessageBoxButton.YesNoCancel, MessageBoxImage.Information);
         if (result == MessageBoxResult.Cancel)
         {
             e.Cancel = true;
             return;
         }
         else if (result == MessageBoxResult.Yes)
         {
             SaveCommand_Executed(null, null);
         }
     }
     // Close all windows
     PropertyWindow.ShouldReallyClose = true;
     PropertyWindow.Close();
 }