public void ClearRecentPlansList() { recentPlansList.Clear(); try { File.Delete(recentPlansFile); } catch (Exception ex) { Log.Error($"Unable to delete recent plans file. Error: {ex}"); } RecentPlansListChanged?.Invoke(); }
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(); }