public void FileRenamed(object sender, FileRenameEventArgs e) { for (int i = 0; i < this.lastfile.Count; i++) { string str = this.lastfile[i].ToString(); if (e.SourceFile == str) { this.lastfile.RemoveAt(i); this.lastfile.Insert(i, e.TargetFile); this.OnRecentFileChange(); break; } } }
private static void OnFileRenamed(FileRenameEventArgs e) { if (FileRenamed != null) { FileRenamed(null, e); } }
private void CheckRenamedFile(object sender, FileRenameEventArgs e) { if (e.IsDirectory) { foreach (IViewContent content in this.ViewContentCollection) { if ((content.FileName != null) && FileUtility.IsBaseDirectory(e.SourceFile, content.FileName)) { content.FileName = FileUtility.RenameBaseDirectory(content.FileName, e.SourceFile, e.TargetFile); } } } else { foreach (IViewContent content in this.ViewContentCollection) { if ((content.FileName != null) && FileUtility.IsEqualFileName(content.FileName, e.SourceFile)) { content.FileName = e.TargetFile; content.TitleName = Path.GetFileName(e.TargetFile); break; } } } }