public CuraManagerGuiSettings LoadGuiSettings() { CuraManagerGuiSettings result; if (!File.Exists(GuiSettingsFilePath)) { result = new CuraManagerGuiSettings(); } else { result = JsonConvert.DeserializeObject <CuraManagerGuiSettings>(File.ReadAllText(GuiSettingsFilePath)); } return(result); }
public void SaveGuiSettings(CuraManagerGuiSettings settings) { Directory.CreateDirectory(AppDataPath); File.WriteAllText(GuiSettingsFilePath, JsonConvert.SerializeObject(settings, Formatting.Indented)); }