Esempio n. 1
0
        public static void SaveSettings()
        {
            ImportedSettings setting = new ImportedSettings()
            {
                IdClient = Settings.IdClient,
                GrandFantasiaExecutablePath = Settings.GrandFantasiaExecutablePath,
                TimeoutBeforeCode           = Settings.TimeoutBeforeCode
            };

            JsonHelper.Serialize(setting, SETTINGS_FILE_FILENAME);
        }
Esempio n. 2
0
 public static void LoadSettings()
 {
     if (IsSettingsFileExist())
     {
         try
         {
             ImportedSettings settings = JsonHelper.Deserialize <ImportedSettings>(SETTINGS_FILE_FILENAME);
             IdClient                    = settings.IdClient;
             TimeoutBeforeCode           = settings.TimeoutBeforeCode;
             GrandFantasiaExecutablePath = settings.GrandFantasiaExecutablePath;
         }
         catch (Exception e)
         {
             throw e;
         }
     }
 }