Пример #1
0
 public void ClearRecentPlansList()
 {
     recentPlansList.Clear();
     try
     {
         File.Delete(recentPlansFile);
     }
     catch (Exception ex)
     {
         Log.Error($"Unable to delete recent plans file. Error: {ex}");
     }
     RecentPlansListChanged?.Invoke();
 }
Пример #2
0
        private void SaveFile()
        {
            try
            {
                string json = JsonConvert.SerializeObject(recentPlansList);
                File.WriteAllText(recentPlansFile, json, Encoding.UTF8);
            }
            catch (Exception ex)
            {
                Log.Error($"Unable to save recent plans to file. Error: {ex}");
            }

            RecentPlansListChanged?.Invoke();
        }