Пример #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);
        }
Пример #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);
        }
Пример #3
0
 public static void Save(AtlasGridData config, string RelativePath)
 {
     SaveAbsolutePath(config, GetBaseDir() + RelativePath);
 }
Пример #4
0
 public static void Save(AtlasGridData config)
 {
     SaveAbsolutePath(config, GetBaseDir() + "ServerGrid.json");
 }