Exemplo n.º 1
0
        public FdoRecentFiles(string storageFile)
        {
            recentFiles = new RecentFileStorage(storageFile);
            recentFiles.RemoveMissingFiles(fileGroup);

            recentFiles.RecentFilesChanged += OnRecentFilesChanged;
        }
Exemplo n.º 2
0
		public FdoRecentFiles (string storageFile)
		{
			recentFiles = new RecentFileStorage (storageFile);
			recentFiles.RemoveMissingFiles (fileGroup);

			recentFiles.RecentFilesChanged += OnRecentFilesChanged;
		}
Exemplo n.º 3
0
 public void InformFileRemoved(object sender, FileEventArgs e)
 {
     if (!e.IsDirectory)
     {
         recentFiles.RemoveItem(RecentFileStorage.ToUri(e.FileName));
         OnRecentFileChange();
     }
 }
Exemplo n.º 4
0
 public override void NotifyFileRemoved(string fileName)
 {
     try {
         recentFiles.RemoveItem(RecentFileStorage.ToUri(fileName));
     } catch (Exception e) {
         LoggingService.LogError("Can't remove from recent files list.", e);
     }
 }
Exemplo n.º 5
0
 public override void NotifyFileRenamed(string oldName, string newName)
 {
     try {
         recentFiles.RenameItem(RecentFileStorage.ToUri(oldName), RecentFileStorage.ToUri(newName));
     } catch (Exception e) {
         LoggingService.LogError("Can't rename file in recent files list.", e);
     }
 }
Exemplo n.º 6
0
 public void InformFileRenamed(object sender, FileCopyEventArgs e)
 {
     if (!e.IsDirectory)
     {
         recentFiles.RenameItem(RecentFileStorage.ToUri(e.SourceFile), RecentFileStorage.ToUri(e.TargetFile));
         OnRecentFileChange();
     }
 }
Exemplo n.º 7
0
        public void AddLastProject(string name, string projectName)
        {
            RecentItem recentItem = new RecentItem(RecentFileStorage.ToUri(name), DesktopService.GetMimeTypeForUri(name), projectGroup);

            recentItem.Private = projectName;
            recentFiles.AddWithLimit(recentItem, projectGroup, ItemLimit);
            OnRecentProjectChange();
        }
Exemplo n.º 8
0
 public void Dispose()
 {
     if (recentFiles != null)
     {
         recentFiles.RecentFilesChanged -= OnRecentFilesChanged;
         recentFiles.Dispose();
         recentFiles = null;
     }
 }
Exemplo n.º 9
0
        public void AddLastFile(string name, string project)
        {
            RecentItem recentItem = new RecentItem(RecentFileStorage.ToUri(name), DesktopService.GetMimeTypeForUri(name), fileGroup);

            recentItem.Private = project != null?string.Format("{0} [{1}]", Path.GetFileName(name), project) : Path.GetFileName(name);

            recentFiles.AddWithLimit(recentItem, fileGroup, ItemLimit);
            OnRecentFileChange();
        }
Exemplo n.º 10
0
 public override void NotifyFileRenamed(string oldName, string newName)
 {
     System.Threading.ThreadPool.QueueUserWorkItem(_ => {
         try {
             recentFiles.RenameItem(RecentFileStorage.ToUri(oldName), RecentFileStorage.ToUri(newName));
         } catch (Exception e) {
             LoggingService.LogError("Can't rename file in recent files list.", e);
         }
     });
 }
Exemplo n.º 11
0
 public override void NotifyFileRemoved(string fileName)
 {
     System.Threading.ThreadPool.QueueUserWorkItem(_ => {
         try {
             recentFiles.RemoveItem(RecentFileStorage.ToUri(fileName));
         } catch (Exception e) {
             LoggingService.LogError("Can't remove from recent files list.", e);
         }
     });
 }
Exemplo n.º 12
0
        void Add(string grp, string fileName, string displayName)
        {
            var mime       = DesktopService.GetMimeTypeForUri(fileName);
            var uri        = RecentFileStorage.ToUri(fileName);
            var recentItem = new RecentItem(uri, mime, grp)
            {
                Private = displayName
            };

            recentFiles.AddWithLimit(recentItem, grp, ItemLimit);
        }
Exemplo n.º 13
0
        void Add(string grp, string fileName, string displayName)
        {
            var mime = DesktopService.GetMimeTypeForUri(fileName);

            try {
                var uri        = RecentFileStorage.ToUri(fileName);
                var recentItem = new RecentItem(uri, mime, grp)
                {
                    Private = displayName
                };
                recentFiles.AddWithLimit(recentItem, grp, ItemLimit);
            } catch (Exception e) {
                LoggingService.LogError("Failed to add item to recent files list.", e);
            }
        }
Exemplo n.º 14
0
 public override void NotifyFileRemoved(string fileName)
 {
     recentFiles.RemoveItem(RecentFileStorage.ToUri(fileName));
 }
Exemplo n.º 15
0
		public void Dispose ()
		{
			recentFiles.Dispose ();
			recentFiles = null;
		}
Exemplo n.º 16
0
 public override void NotifyFileRenamed(string oldName, string newName)
 {
     recentFiles.RenameItem(RecentFileStorage.ToUri(oldName), RecentFileStorage.ToUri(newName));
 }
Exemplo n.º 17
0
 public FdoRecentFiles(string storageFile)
 {
     recentFiles = new RecentFileStorage(storageFile);
     recentFiles.RemoveMissingFiles(projGroup, fileGroup);
 }
Exemplo n.º 18
0
 public void Dispose()
 {
     recentFiles.Dispose();
     recentFiles = null;
 }
Exemplo n.º 19
0
		public FdoRecentFiles (string storageFile)
		{
			recentFiles = new RecentFileStorage (storageFile);
			recentFiles.RemoveMissingFiles (projGroup, fileGroup);
		}
Exemplo n.º 20
0
		public void Dispose ()
		{
			if (recentFiles != null) {
				recentFiles.RecentFilesChanged -= OnRecentFilesChanged;
				recentFiles.Dispose ();
				recentFiles = null;
			}
		}