Exemple #1
0
 public static void Save(string filename, TrackingDatabase trackingDb)
 {
     using (StreamWriter file = File.CreateText(filename))
     {
         JsonSerializer serializer = new JsonSerializer();
         serializer.Serialize(file, trackingDb);
     }
 }
 public override void Dispose()
 {
     base.Dispose();
     TrackingDatabase db = new TrackingDatabase();
     foreach (Tracker t in trackers.Values) db.Objects.Add(t);
     TrackingDatabase.Save(Properties.Settings.Default.TrackingDatabase, db);
     Debug("Saved tracking database to '" + Properties.Settings.Default.TrackingDatabase + "'.");
 }