public void FileRename (object sender, FileCopyEventArgs e) { foreach (FileCopyEventInfo args in e) { foreach (Change change in changes) { var replaceChange = change as TextReplaceChange; if (replaceChange == null) continue; if (args.SourceFile == replaceChange.FileName) replaceChange.FileName = args.TargetFile; } } }
static void OnFileRenamed(FileCopyEventArgs args) { foreach (FileCopyEventInfo fi in args) { if (fi.IsDirectory) { Counters.DirectoriesRenamed++; } else { Counters.FilesRenamed++; } } eventQueue.RaiseEvent(() => FileRenamed, args); }
static void OnFileRenamed(FileCopyEventArgs args) { if (args.IsDirectory) { Counters.DirectoriesRenamed++; } else { Counters.FilesRenamed++; } if (FileRenamed != null) { FileRenamed(null, args); } }
static void OnFileMoved(FileCopyEventArgs args) { eventQueue.RaiseEvent(FileMoved, args); }
internal void OnFileRenamed(FileCopyEventArgs args) { FileRenamed?.Invoke(this, args); }
void OnFolderRenamed(object sender, FileCopyEventArgs e) { ProjectFolder f = (ProjectFolder) sender; ITreeBuilder tb = Context.GetTreeBuilder (f.Parent); if (tb != null) tb.UpdateAll (); }
void OnSystemFileRenamed (object sender, FileCopyEventArgs args) { foreach (FileCopyEventInfo e in args) { Project project = GetProjectForFile (e.SourceFile); if (project == null) return; if (e.IsDirectory) { /* string childPath; ITreeBuilder tb = FindParentFolderNode (e.SourceFile, project, out childPath); if (tb != null && tb.Options ["ShowAllFiles"]) { tb.UpdateAll (); } */ } else { ITreeBuilder tb = Context.GetTreeBuilder (new SystemFile (e.SourceFile, project)); if (tb != null) { tb.Remove (true); tb.AddChild (new SystemFile (e.TargetFile, project)); } } } }
void OnFileRenamed(object sender, FileCopyEventArgs e) { // The folder path can't be updated because we would be changing // the identity of the object. Another folder object will need // to be created by updating the tree. var e2 = new FileCopyEventArgs (e.Where (i => i.IsDirectory && i.SourceFile == absolutePath)); if (e2.Count > 0 && FolderRenamed != null) FolderRenamed (this, e); }
static void OnFileRenamed (FileCopyEventArgs args) { foreach (FileCopyEventInfo fi in args) { if (fi.IsDirectory) Counters.DirectoriesRenamed++; else Counters.FilesRenamed++; } eventQueue.RaiseEvent (() => FileRenamed, args); }
void OnFileRenamed (object sender, FileCopyEventArgs e) { if (!e.IsDirectory || e.SourceFile != absolutePath) return; // The folder path can't be updated because we would be changing // the identity of the object. Another folder object will need // to be created by updating the tree. if (FolderRenamed != null) FolderRenamed (this, e); }
static void OnFileCopied(FileCopyEventArgs args) { eventQueue.RaiseEvent(() => FileCopied, args); }
void CheckRenamedFile(object sender, FileCopyEventArgs e) { if (e.IsDirectory) { foreach (IViewContent content in viewContentCollection) { if (content.ContentName != null && content.ContentName.StartsWith(e.SourceFile)) { content.ContentName = e.TargetFile + content.ContentName.Substring(e.SourceFile.Length); } } } else { foreach (IViewContent content in viewContentCollection) { if (content.ContentName != null && content.ContentName == e.SourceFile) { content.ContentName = e.TargetFile; return; } } } }
void HandleMonoDevelopCoreFileServiceFileRenamed (object sender, FileCopyEventArgs e) { foreach(FileCopyEventInfo evInfo in e.ToList()) { if(!evInfo.IsDirectory) { MonoDevelop.Core.LoggingService.LogInfo ("Renamed {0} to {1}", evInfo.SourceFile.FileName, evInfo.TargetFile.FileName); client.SendFilePath (evInfo.SourceFile, evInfo.TargetFile, EventType.Move); } } }
public void InformFileRenamed (object sender, FileCopyEventArgs e) { if (!e.IsDirectory) { recentFiles.RenameItem (RecentFileStorage.ToUri (e.SourceFile), RecentFileStorage.ToUri (e.TargetFile)); OnRecentFileChange(); } }
static void NotifyFileRenamed (object sender, FileCopyEventArgs args) { foreach (FileCopyEventInfo e in args) { if (!e.IsDirectory) { platformService.RecentFiles.NotifyFileRenamed (e.SourceFile, e.TargetFile); } } }
void CheckRenamedFile(object sender, FileCopyEventArgs args) { foreach (FileCopyEventInfo e in args) { if (e.IsDirectory) { foreach (IViewContent content in viewContentCollection) { if (content.ContentName != null && ((FilePath)content.ContentName).IsChildPathOf (e.SourceFile)) { content.ContentName = e.TargetFile.Combine (((FilePath) content.ContentName).FileName); } } } else { foreach (IViewContent content in viewContentCollection) { if (content.ContentName != null && content.ContentName == e.SourceFile) { content.ContentName = e.TargetFile; return; } } } } }
static void OnFileMoved (FileCopyEventArgs args) { eventQueue.RaiseEvent (() => FileMoved, args); }