private void OnDesignatorDeselected()
 {
     ClearCurrentSelection();
     if (settingsWindow != null)
     {
         settingsWindow.CancelAndClose();
         settingsWindow = null;
     }
     CommitWorldSettings();
     CommitGlobalSettings();
 }
예제 #2
0
 private void ShowSettingsWindow()
 {
     if (settingsWindow != null)
     {
         return;
     }
     settingsWindow = new Dialog_StripMineConfiguration(worldSettings)
     {
         WindowPosition = globalSettings.WindowPosition
     };
     settingsWindow.SettingsChanged += WindowOnSettingsChanged;
     settingsWindow.Closing         += WindowOnClosing;
     Find.WindowStack.Add(settingsWindow);
 }
 private void WindowOnClosing(bool accept)
 {
     if (accept)
     {
         CommitCurrentSelection();
     }
     else
     {
         RevertToSavedWorldSettings();
         ClearCurrentSelection();
     }
     globalSettings.WindowPosition = settingsWindow.WindowPosition;
     settingsWindow = null;
 }