public static void SelectLogFile(string fileName) { Program.LogFileName = fileName; ReloadRecent(); Recent.RemoveAll(r => string.Equals(r, fileName, StringComparison.InvariantCultureIgnoreCase)); Recent.Insert(0, fileName); if (Recent.Count > 20) { Recent.RemoveAt(20); } Properties.Settings.Default.Filename = Program.LogFileName; Properties.Settings.Default.Recent = Recent.ToArray(); Properties.Settings.Default.Save(); }
public void OnDeserialized(StreamingContext context) { Favorites.RemoveAll(x => x.Address == null); Recent.RemoveAll(x => x.Address == null); }