Esempio n. 1
0
 public static void ToFile(this EventPhysicsSettings self, string file)
 {
     using (var f = File.CreateText(file)) {
         var ser = JsonSerializer.Create(JsonConverter.Settings);
         ser.Serialize(f, self);
     }
 }
Esempio n. 2
0
        public MainForm( )
        {
            InitializeComponent( );
            var appDir = Path.GetDirectoryName(Assembly.GetCallingAssembly().Location);

            Settings = EventPhysicsSettings.FromFile(Path.Combine(appDir, "../../settings.json"));
            mapTree.Nodes.Add(MapRoot);
            InitMapTree(null);
        }
Esempio n. 3
0
 public static string ToJson(this EventPhysicsSettings self) => JsonConvert.SerializeObject(self, JsonConverter.Settings);