Esempio n. 1
0
 static void OnFileRenamed(FileRenameEventArgs e)
 {
     if (FileRenamed != null)
     {
         FileRenamed(null, e);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Respond to changes in filenames by updating points in the history
 /// to reflect the change.
 /// </summary>
 /// <param name="sender"/>
 /// <param name="e"><see cref="FileRenameEventArgs"/> describing
 /// the file rename.</param>
 static void FileService_FileRenamed(object sender, FileRenameEventArgs e)
 {
     foreach (INavigationPoint p in history)
     {
         if (p.FileName.Equals(e.SourceFile))
         {
             p.FileNameChanged(e.TargetFile);
         }
     }
 }
 internal void FileRenamed(object sender, FileRenameEventArgs e)
 {
     for (int i = 0; i < recentFiles.Count; ++i)
     {
         string file = recentFiles[i].ToString();
         if (e.SourceFile == file)
         {
             recentFiles.RemoveAt(i);
             recentFiles.Insert(i, FileName.Create(e.TargetFile));
             break;
         }
     }
 }
Esempio n. 4
0
 internal void FileRenamed(object sender, FileRenameEventArgs e)
 {
     for (int i = 0; i < lastfile.Count; ++i)
     {
         string file = lastfile[i].ToString();
         if (e.SourceFile == file)
         {
             lastfile.RemoveAt(i);
             lastfile.Insert(i, e.TargetFile);
             break;
         }
     }
 }
Esempio n. 5
0
 static void CheckFileRename(object sender, FileRenameEventArgs e)
 {
     for (int i = 0; i < tasks.Count; ++i)
     {
         Task curTask = tasks[i];
         if (FileUtility.IsEqualFileName(curTask.FileName, e.SourceFile))
         {
             Remove(curTask);
             curTask.FileName = FileUtility.NormalizePath(e.TargetFile);
             Add(curTask);
             --i;
         }
     }
 }
		void FileRenamed(object sender, FileRenameEventArgs e)
		{
			if (!e.IsDirectory) {
				// source and target are populated.
				
				if (NAntBuildFile.IsBuildFile(e.SourceFile) && NAntBuildFile.IsBuildFile(e.TargetFile)) {
					treeView.RenameBuildFile(e.SourceFile, e.TargetFile);
				} else if (NAntBuildFile.IsBuildFile(e.SourceFile)) {
					treeView.RemoveBuildFile(e.SourceFile);
				} else {
					AddBuildFile(e.TargetFile);
				}
			}
		}
		/// <summary>
		/// Respond to changes in filenames by updating points in the history
		/// to reflect the change.
		/// </summary>
		/// <param name="sender"/>
		/// <param name="e"><see cref="FileRenameEventArgs"/> describing 
		/// the file rename.</param>
		static void FileService_FileRenamed(object sender, FileRenameEventArgs e)
		{
			foreach (INavigationPoint p in history) {
				if (p.FileName.Equals(e.SourceFile)) {
					p.FileNameChanged(e.TargetFile);
				}
			}
		}
Esempio n. 8
0
		internal void FileRenamed(object sender, FileRenameEventArgs e)
		{
			for (int i = 0; i < lastfile.Count; ++i) {
				string file = lastfile[i].ToString();
				if (e.SourceFile == file) {
					lastfile.RemoveAt(i);
					lastfile.Insert(i, e.TargetFile);
					break;
				}
			}
		}
 private static void OnFileRenamed(object sender, FileRenameEventArgs e)
 {
     RenameFile(e.SourceFile, e.TargetFile);
 }
 private static void OnFileCopied(object sender, FileRenameEventArgs e)
 {
     AddFile(e.TargetFile);
 }
Esempio n. 11
0
		static void CheckFileRename(object sender, FileRenameEventArgs e)
		{
			for (int i = 0; i < tasks.Count; ++i) {
				Task curTask = tasks[i];
				if (FileUtility.IsEqualFileName(curTask.FileName, e.SourceFile)) {
					Remove(curTask);
					curTask.FileName = FileUtility.NormalizePath(e.TargetFile);
					Add(curTask);
					--i;
				}
			}
		}
Esempio n. 12
0
		static void OnFileCopied(FileRenameEventArgs e)
		{
			if (FileCopied != null) {
				FileCopied(null, e);
			}
		}