Exemple #1
0
        public static void ReadConfig()
        {
            var path = Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName;

            var configPath = Path.Combine(path, "gfc_settings.bin");

            var oldConfigPath = Path.Combine(path, "gfc.bin");

            if (File.Exists(oldConfigPath))
            {
                File.Delete(oldConfigPath);
            }

            if (!File.Exists(configPath))
            {
                SaveConfig();
            }
            else
            {
                var json = File.ReadAllText(configPath);
                Configuration = JsonConvert.DeserializeObject <GfcConfiguration>(json);

                FillUnsetValues();

                SaveConfig();
            }
        }
Exemple #2
0
 static AppConfigurationHelper()
 {
     Configuration = new GfcConfiguration();
 }