Exemplo n.º 1
0
 //Close window
 private void CloseWin(object sender, RoutedEventArgs e)
 {
     Views.AutoSaveSettings();
     if (DataContext is MappingTool mt)
     {
         mt.Dispose();
     }
     SettingsManager.UpdateSettings();
     SettingsManager.WriteToJson();
     Close();
 }
Exemplo n.º 2
0
 private void Window_Closing(object sender, EventArgs e)
 {
     // Perform saving of settings at application exit
     if (autoSave)
     {
         Views.AutoSaveSettings();
         if (DataContext is MappingTool mt)
         {
             mt.Dispose();
         }
         SettingsManager.UpdateSettings();
         SettingsManager.WriteToJson();
     }
 }