Techblox Mod Manager / Launcher
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
547B

  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 static Configuration Load()
  9. {
  10. if (File.Exists("configuration.json"))
  11. return JsonConvert.DeserializeObject<Configuration>(File.ReadAllText("configuration.json"));
  12. return new Configuration();
  13. }
  14. public void Save()
  15. {
  16. File.WriteAllText("configuration.json", JsonConvert.SerializeObject(this));
  17. }
  18. }
  19. }