public static void Save(ProjectConfig config, string filePath) { string fileText = JsonConvert.SerializeObject(config, Formatting.Indented); File.WriteAllText(filePath, fileText); HPPConfig.GetInstance().LastProjectPath = filePath; }
/* * ------- * Methods * ------- */ public static ProjectConfig Open(string filePath) { string fileText = File.ReadAllText(filePath); HPPConfig.GetInstance().LastProjectPath = filePath; return(JsonConvert.DeserializeObject <ProjectConfig>(fileText)); }