Example #1
0
        public static void Add(string fileName)
        {
            RecentFiles files = GetRecentlyOpenedFiles();

            files.Add(fileName);
            StoreRecentlyOpenedFiles(files);
        }
Example #2
0
 public static void StoreRecentlyOpenedFiles(RecentFiles files)
 {
     using (FileStream stream = new FileStream(RecentFilesStorage, FileMode.OpenOrCreate))
     {
         XmlSerializer ser = new XmlSerializer(typeof(RecentFiles));
         ser.Serialize(stream, files);
         stream.Close();
     }
 }