Techblox Mod Manager / Launcher
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

23 行
593B

  1. using System.IO;
  2. using Newtonsoft.Json;
  3. namespace TBMM
  4. {
  5. public class Configuration
  6. {
  7. public string GamePath { get; set; }
  8. public bool KeepPatched { get; set; }
  9. public static Configuration Load()
  10. {
  11. if (File.Exists("configuration.json"))
  12. return JsonConvert.DeserializeObject<Configuration>(File.ReadAllText("configuration.json"));
  13. return new Configuration();
  14. }
  15. public void Save()
  16. {
  17. File.WriteAllText("configuration.json", JsonConvert.SerializeObject(this));
  18. }
  19. }
  20. }