EventArgs with a file name.
Inheritance: System.EventArgs
 void FileSaved(object sender, FileNameEventArgs e)
 {
     if (options.CompileOnSave && TypeScriptFileExtensions.IsTypeScriptFileName(e.FileName)) {
         var action = new CompileTypeScriptOnSaveFileAction();
         action.Compile(e.FileName);
     }
 }
		void OnFileSaved(object sender, FileNameEventArgs e)
		{
			if (ProjectService.OpenSolution != null) {
				foreach (IProject p in ProjectService.OpenSolution.Projects) {
					if (p.FindFile(e.FileName) != null || FileUtility.IsEqualFileName(p.FileName, e.FileName)) {
						lock (unmodifiedProjects) {
							unmodifiedProjects.Remove(p);
						}
					}
				}
			}
		}
		void FileSaved(object sender, FileNameEventArgs e)
		{
			if (!TypeScriptFileExtensions.IsTypeScriptFileName(e.FileName))
				return;
			
			TypeScriptProject project = TypeScriptService.GetProjectForFile(e.FileName);
			if (project == null)
				return;
			
			if (project.CompileOnSave) {
				var action = new CompileTypeScriptOnSaveFileAction();
				TypeScriptContext context = TypeScriptService.ContextProvider.GetContext(e.FileName);
				action.Compile(e.FileName, project, context);
			}
		}
		void FileSaved(object sender, FileNameEventArgs e)
		{
			LoggingService.Debug("FileSaved.");
			if (NAntBuildFile.IsBuildFile(e.FileName)) {
				treeView.UpdateBuildFile(e.FileName);
			}
		}
Esempio n. 5
0
		public static void RaiseFileSaved(FileNameEventArgs e)
		{
			if (FileSaved != null) {
				FileSaved(null, e);
			}
		}
Esempio n. 6
0
		static void OnFileLoaded(FileNameEventArgs e)
		{
			if (FileLoaded != null) {
				FileLoaded(null, e);
			}
		}
		void FileUtilityFileSaved(object sender, FileNameEventArgs e)
		{
			fileUtilityFileSavedEventArgs = e;
		}
		public void PackageFilesViewWriteMethodFiresFileUtilityFileSavedEvent()
		{
			try {
				fileUtilityFileSavedEventArgs = null;
				FileUtility.FileSaved += FileUtilityFileSaved;
				
				string fileName = @"d:\projects\test\setup.wxs";
				WixDocument document = new WixDocument();
				document.FileName = fileName;
				packageFilesView.Write(document);
				
				Assert.AreEqual(fileName, fileUtilityFileSavedEventArgs.FileName.ToString());
			} finally {
				FileUtility.FileSaved -= FileUtilityFileSaved;
			}
		}
Esempio n. 9
0
		static void OnFileSaved(object sender, FileNameEventArgs e)
		{
			Solution solution = ProjectService.OpenSolution;
			if (solution == null) return;
			IProject project = solution.FindProjectContainingFile(e.FileName);
			if (project == null) return;
			FileProjectItem item = project.FindFile(e.FileName);
			if (item == null) return;
			if (!string.IsNullOrEmpty(item.CustomTool)) {
				RunCustomTool(item, false);
			}
		}
		void FileSaved(object sender, FileNameEventArgs e)
		{
			string fileName = e.FileName;
			if (!CanBeVersionControlledFile(fileName)) return;
			ClearStatusCacheAndEnqueueFile(fileName);
		}
 private static void OnFileSaved(object sender, FileNameEventArgs e)
 {
     ClearCachedStatusAndEnqueueParents(e.FileName);
 }