Esempio n. 1
0
        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();
        }
Esempio n. 2
0
 public void OnDeserialized(StreamingContext context)
 {
     Favorites.RemoveAll(x => x.Address == null);
     Recent.RemoveAll(x => x.Address == null);
 }