示例#1
0
 void OnFileDeleted(object sender, FileSystemEventArgs e)
 {
     Dispatcher.InvokeIfRequired(() =>
     {
         ObservableFileInfo deletedFile = m_files.GetFile(e.FullPath);
         if (deletedFile != null)
         {
             m_files.Remove(deletedFile);
         }
     });
 }
示例#2
0
 void OnFileRenamed(object sender, RenamedEventArgs e)
 {
     Dispatcher.InvokeIfRequired(() =>
     {
         ObservableFileInfo file = m_files.GetFile(e.OldFullPath);
         if (file != null)
         {
             file.ChangeName(e.FullPath);
         }
     });
 }
示例#3
0
 void OnFileChanged(object sender, FileSystemEventArgs e)
 {
     Dispatcher.InvokeIfRequired(() =>
     {
         ObservableFileInfo changedFile = m_files.GetFile(e.FullPath);
         if (changedFile != null)
         {
             changedFile.Refresh();
         }
     });
 }