Example #1
0
        public static AtlasGridData LoadAbsolutePath(string Path)
        {
            AtlasGridData LoadedConfig = new AtlasGridData(); //Default Object or null?
            string        JsonString   = File.ReadAllText(Path);

            LoadedConfig = JsonConvert.DeserializeObject <AtlasGridData>(JsonString);
            return(LoadedConfig);
        }
Example #2
0
        public static void SaveAbsolutePath(AtlasGridData config, string Path)
        {
            string JsonData = JsonConvert.SerializeObject(config, Formatting.Indented, new JsonSerializerSettings
            {
                NullValueHandling = NullValueHandling.Ignore
            });

            File.WriteAllText(Path, JsonData);
        }
Example #3
0
 public static void Save(AtlasGridData config, string RelativePath)
 {
     SaveAbsolutePath(config, GetBaseDir() + RelativePath);
 }
Example #4
0
 public static void Save(AtlasGridData config)
 {
     SaveAbsolutePath(config, GetBaseDir() + "ServerGrid.json");
 }