Beispiel #1
0
 public static void ResetHistory()
 {
     AppData.DeleteFile(HistoryFile);
     _history.Clear();
     FileHistoryChanged?.Invoke();
 }
Beispiel #2
0
 public static void Load()
 {
     try
     {
         if (AppData.FileExists(HistoryFile))
         {
             _history = JsonConvert.DeserializeObject <SerializableFileHistory>(AppData.ReadFile(HistoryFile)).Entries.ToList();
         }
     }
     catch (Exception e)
     {
         if (MessageBox.Show("Could not load file history!\nDo you want to reset it?", "Tabbed Editor - History", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
         {
             ResetHistory();
         }
         Logger.DumpException(e);
     }
     FileHistoryChanged?.Invoke();
 }