Ejemplo n.º 1
0
 /// <summary>
 /// Saves the AppConfig to "c:\ProgramData\..."
 /// </summary>
 protected static void SaveAppConfig()
 {
     try
     {
         Messenger.AddInfo(Messages.MSG_SAVING_KSPMA_SETTINGS);
         string path = KSPPathHelper.GetPath(KSPPaths.AppConfig);
         if (path != string.Empty && Directory.Exists(Path.GetDirectoryName(path)))
         {
             AdminConfig.Save(path);
         }
         else
         {
             Messenger.AddError(Messages.MSG_KSPMA_SETTINGS_PATH_INVALID);
         }
     }
     catch (Exception ex)
     {
         Messenger.AddError(Messages.MSG_ERROR_DURING_SAVING_KSPMA_SETTINGS, ex);
         ShowAdminRightsDlg(ex);
     }
 }