public static void SetMakeAndModel(string make, string model) { string pathToBedSettings = Path.Combine("PrinterSettings", make, model, "BedSettings.json"); if (StaticData.Instance.FileExists(pathToBedSettings)) { string content = StaticData.Instance.ReadAllText(pathToBedSettings); instance = (BedSettings)Newtonsoft.Json.JsonConvert.DeserializeObject<BedSettings>(content); } else { instance = new BedSettings(); } }
public static void SetMakeAndModel(string make, string model) { string pathToBedSettings = Path.Combine("PrinterSettings", make, model, "BedSettings.json"); if (AggContext.StaticData.FileExists(pathToBedSettings)) { string content = AggContext.StaticData.ReadAllText(pathToBedSettings); instance = (BedSettings)Newtonsoft.Json.JsonConvert.DeserializeObject <BedSettings>(content); } else { instance = new BedSettings(); } }
public static void SetMakeAndModel(string make, string model) { string pathToBedSettings = Path.Combine(ApplicationDataStorage.Instance.ApplicationStaticDataPath, "PrinterSettings", make, model, "BedSettings.json"); if (File.Exists(pathToBedSettings)) { string content = File.ReadAllText(pathToBedSettings); instance = (BedSettings)Newtonsoft.Json.JsonConvert.DeserializeObject <BedSettings>(content); } else { instance = new BedSettings(); } }