当前位置: 首页>>代码示例>>C#>>正文


C# FileEventArgs类代码示例

本文整理汇总了C#中FileEventArgs的典型用法代码示例。如果您正苦于以下问题:C# FileEventArgs类的具体用法?C# FileEventArgs怎么用?C# FileEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


FileEventArgs类属于命名空间,在下文中一共展示了FileEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FileRemoved

		internal void FileRemoved(object sender, FileEventArgs e)
		{
			for (int i = 0; i < recentFiles.Count; ++i) {
				string file = recentFiles[i].ToString();
				if (e.FileName == file) {
					recentFiles.RemoveAt(i);
					break;
				}
			}
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:10,代码来源:RecentOpen.cs

示例2: HandleFileServiceChange

		static void HandleFileServiceChange (object sender, FileEventArgs e)
		{
			bool foundOneChange = false;
			foreach (var file in e) {
				foreach (var view in openFiles) {
					if (SkipView (view) || !string.Equals (view.ContentName, file.FileName, fileNameComparer))
						continue;
					if (!view.IsDirty && (IdeApp.Workbench.AutoReloadDocuments || file.AutoReload))
						view.SourceEditorWidget.Reload ();
					else
						foundOneChange = true;
				}
			}

			if (foundOneChange)
				CommitViewChange (GetAllChangedFiles ());
		}
开发者ID:wickedshimmy,项目名称:monodevelop,代码行数:17,代码来源:FileRegistry.cs

示例3: files_FileWritten

        void files_FileWritten(object sender, FileEventArgs e)
        {
            Url virtualPath = e.VirtualPath;

            if (!IsResizableImagePath(virtualPath))
                return;

            if(images.Sizes.Count == 0)
                return;

            byte[] image = GetImageBytes(virtualPath);

            foreach (ImageSizeElement size in images.Sizes.AllElements)
            {
                CreateSize(virtualPath, image, size);
            }
        }
开发者ID:brianmatic,项目名称:n2cms,代码行数:17,代码来源:UploadedFilesResizer.cs

示例4: files_FileCopied

        void files_FileCopied(object sender, FileEventArgs e)
        {
            if (IsResizedPath(e.VirtualPath))
                return;

            foreach (ImageSizeElement size in images.Sizes.AllElements)
            {
                Url sourceUrl = e.SourcePath;
                Url destinationUrl = e.VirtualPath;

                string sourcePath = ImagesUtility.GetResizedPath(sourceUrl, size.Name);

                if (!files.FileExists(sourcePath))
                    continue;

                string destinationPath = ImagesUtility.GetResizedPath(destinationUrl, size.Name);
                if(!files.FileExists(destinationPath))
                    files.CopyFile(sourcePath, destinationPath);
            }
        }
开发者ID:AnonymousRetard,项目名称:n2cms,代码行数:20,代码来源:UploadedFilesResizer.cs

示例5: HandleFileServiceChange

		static void HandleFileServiceChange (object sender, FileEventArgs e)
		{
			// The Ide.Document generates a file service changed event this needs to be skipped.
			if (!TypeSystemService.TrackFileChanges)
				return;
			bool foundOneChange = false;
			foreach (var file in e) {
				foreach (var view in openFiles) {
					if (SkipView (view) || !string.Equals (view.ContentName, file.FileName, fileNameComparer))
						continue;
					if (!view.IsDirty/* && (IdeApp.Workbench.AutoReloadDocuments || file.AutoReload)*/)
						view.SourceEditorWidget.Reload ();
					else
						foundOneChange = true;
				}
			}

			if (foundOneChange)
				CommitViewChange (GetAllChangedFiles ());
		}
开发者ID:llucenic,项目名称:monodevelop,代码行数:20,代码来源:FileRegistry.cs

示例6: OnFileRenamed

		protected virtual void OnFileRenamed(FileEventArgs e)
		{
			if (FileRenamed != null) {
				FileRenamed(this, e);
			}
		}
开发者ID:tangxuehua,项目名称:DataStructure,代码行数:6,代码来源:DefaultFileService.cs

示例7: NotifyFileRemoved

		static void NotifyFileRemoved (object sender, FileEventArgs args)
		{
			foreach (FileEventInfo e in args) {
				if (!e.IsDirectory) {
					platformService.RecentFiles.NotifyFileRemoved (e.FileName);
				}
			}
		}
开发者ID:poke,项目名称:monodevelop,代码行数:8,代码来源:DesktopService.cs

示例8: ProbeNppPlugin_FileSaved

 void ProbeNppPlugin_FileSaved(object sender, FileEventArgs e)
 {
     try
     {
         if (!string.IsNullOrWhiteSpace(e.FileName))
         {
             CodeModel.CodeModel.OnFileSaved(e.FileName);
         }
     }
     catch (Exception ex)
     {
         Output.WriteLine(OutputStyle.Error, ex.ToString());
     }
 }
开发者ID:cmrazek,项目名称:ProbeNpp,代码行数:14,代码来源:ProbeNppPlugin.cs

示例9: fileEvents

 void fileEvents(object sender, FileEventArgs e)
 {
     if (FileEvent != null) FileEvent(sender, e);
 }
开发者ID:wykoooo,项目名称:copy-dotnet-library,代码行数:4,代码来源:FileWatcher.cs

示例10: FileRenamed

        public void FileRenamed(object sender, FileEventArgs e)
        {
            if (e.IsDirectory)
                return;

            if (e.FileName == null)
                recentFiles.RenameItem (new Uri (e.SourceFile), new Uri (e.TargetFile));
            else
                recentFiles.RenameItem (new Uri (e.FileName), new Uri (e.TargetFile));
            UpdateLastFile ();
        }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:11,代码来源:RecentOpen.cs

示例11: Plugin_FileActivated

 private void Plugin_FileActivated(object sender, FileEventArgs e)
 {
     try
     {
         OnFileActivated(e.BufferId);
         _fileScannerDefer.OnActivity();
     }
     catch (Exception ex)
     {
         Output.WriteLine(OutputStyle.Error, ex.ToString());
     }
 }
开发者ID:cmrazek,项目名称:ProbeNpp,代码行数:12,代码来源:ProbeNppPlugin.cs

示例12: files_FileDeleted

		void files_FileDeleted(object sender, FileEventArgs e)
		{
			if (!Enabled)
				return;

			if (!IsResizableImagePath(e.VirtualPath))
				return;

            foreach (ImageSizeElement size in images.Sizes.AllElements)
            {
                string resizedPath = ImagesUtility.GetResizedPath(e.VirtualPath, size.Name);

                if (files.FileExists(resizedPath))
                    files.DeleteFile(resizedPath);
            }
        }
开发者ID:JohnsonYuan,项目名称:n2cms,代码行数:16,代码来源:UploadedFilesResizer.cs

示例13: OnWarningAdded

 private void OnWarningAdded(object sender, FileEventArgs args) {
     if (_diskNodes.ContainsKey(args.Filename)) {
         _warningFiles.Add(args.Filename);
     }
 }
开发者ID:GitObjects,项目名称:nodejstools,代码行数:5,代码来源:NodejsProjectNode.cs

示例14: OnErrorRemoved

 private void OnErrorRemoved(object sender, FileEventArgs args) {
     _errorFiles.Remove(args.Filename);
 }
开发者ID:GitObjects,项目名称:nodejstools,代码行数:3,代码来源:NodejsProjectNode.cs

示例15: OnErrorAdded

 private void OnErrorAdded(object sender, FileEventArgs args) {
     if (_diskNodes.ContainsKey(args.Filename)) {
         _errorFiles.Add(args.Filename);
     }
 }
开发者ID:GitObjects,项目名称:nodejstools,代码行数:5,代码来源:NodejsProjectNode.cs


注:本文中的FileEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。