Beispiel #1
0
 public static void GetFiles()
 {
     if (File.Exists(Loader.ConfigDir))
     {
         string       text = File.ReadAllText(Loader.ConfigDir);
         ConfigFields g    = JsonConvert.DeserializeObject <ConfigFields>(text);
         Configuration = g;
     }
 }
Beispiel #2
0
 public static void WriteFiles()
 {
     if (!File.Exists(Loader.ConfigDir))
     {
         ConfigFields cfg  = new ConfigFields();
         string       json = JsonConvert.SerializeObject(cfg, Formatting.Indented);
         File.WriteAllText(Loader.ConfigDir, json);
     }
 }
Beispiel #3
0
        public static void UpdateFiles()
        {
            ConfigFields cfg = new ConfigFields();

            cfg = Configuration;
            string json = JsonConvert.SerializeObject(cfg, Formatting.Indented);

            File.WriteAllText(Loader.ConfigDir, json);
            GetFiles();
        }