當前位置: 首頁>>代碼示例>>C#>>正文


C# Projects.ProjectFileRenamedEventArgs類代碼示例

本文整理匯總了C#中MonoDevelop.Projects.ProjectFileRenamedEventArgs的典型用法代碼示例。如果您正苦於以下問題:C# ProjectFileRenamedEventArgs類的具體用法?C# ProjectFileRenamedEventArgs怎麽用?C# ProjectFileRenamedEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ProjectFileRenamedEventArgs類屬於MonoDevelop.Projects命名空間,在下文中一共展示了ProjectFileRenamedEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: IdeApp_Workspace_FileRenamedInProject

        void IdeApp_Workspace_FileRenamedInProject (object sender, ProjectFileRenamedEventArgs e)
        {
            
            foreach (var file in e) {
               
                if (file.OldName.FileName == file.NewName.FileName) {
                    //a directory filename changed
                    var oldDir = file.OldName.ParentDirectory;
                    var newDir = file.NewName.ParentDirectory;

                    if (!newDir.ToString ().Contains ("Resources")) {
                        return;
                    }

                    while (oldDir.FileName == newDir.FileName) {
                        oldDir = oldDir.ParentDirectory;
                        newDir = newDir.ParentDirectory;
                    }

                    ClearOwnFileErrors (oldDir);
                    CheckDirectoryName (newDir);
                } else {
                    ClearOwnFileErrors (file.OldName);
                    CheckProjectFileName (file.ProjectFile);
                }
            }
        }
開發者ID:taiste,項目名稱:ViewInAndroidStudio,代碼行數:27,代碼來源:StartupHandler.cs

示例2: OnFileRenamedInProject

        protected override void OnFileRenamedInProject(ProjectFileRenamedEventArgs e)
        {
            UpdateParseCache ();

            base.OnFileRenamedInProject (e);
        }
開發者ID:gavin-norman,項目名稱:Mono-D,代碼行數:6,代碼來源:DProject.cs

示例3: HandleRename

		static void HandleRename (ProjectFileRenamedEventArgs e)
		{
			foreach (ProjectFileEventInfo args in e) {
				var file = args.ProjectFile;
				var tool = GetGenerator (file.Generator);
				if (tool == null)
					continue;
			}
		}
開發者ID:riverans,項目名稱:monodevelop,代碼行數:9,代碼來源:CustomToolService.cs

示例4: OnFileRenamed

		void OnFileRenamed (object sender, ProjectFileRenamedEventArgs args)
		{
			foreach (ProjectFileRenamedEventInfo fargs in args) {
				RemoveFile (fargs.OldName);
				FileEntry file = AddFile (fargs.NewName);
				// CheckModifiedFiles won't detect new files, so parsing
				// must be manyally signaled
				QueueParseJob (file);
			}
		}
開發者ID:okrmartin,項目名稱:monodevelop,代碼行數:10,代碼來源:ProjectCodeCompletionDatabase.cs

示例5: OnFileRenamedInProject

		protected override void OnFileRenamedInProject (ProjectFileRenamedEventArgs e)
		{
			base.OnFileRenamedInProject (e);
			if (Loading)
				return;
			
			if (e.ProjectFile.BuildAction == MonoDroidBuildAction.AndroidResource)
				QueueResgenUpdate ();
			//if renaming the file to "AndroidManifest.xml", and the manifest element is not in use, set it as a convenience
			else if (AndroidManifest.IsNullOrEmpty && e.NewName.ToRelative (BaseDirectory) == "AndroidManifest.xml")
				AndroidManifest = e.NewName;
			//track manifest file renames or things will break
			else if (AndroidManifest == e.OldName)
				AndroidManifest = e.NewName;
		}
開發者ID:stewartwhaley,項目名稱:monodevelop,代碼行數:15,代碼來源:MonoDroidProject.cs

示例6: FileRenamed

		static void FileRenamed (object sender, ProjectFileRenamedEventArgs e)
		{
			bool changed = false;
			foreach (ProjectFileRenamedEventInfo args in e) {
				foreach (NavigationHistoryItem point in history) {
					DocumentNavigationPoint dp = point.NavigationPoint as DocumentNavigationPoint;
					changed &= (dp != null && dp.HandleRenameEvent (args.OldName, args.NewName));
				}
			}
			if (changed)
				OnHistoryChanged ();
		}
開發者ID:RainsSoft,項目名稱:playscript-monodevelop,代碼行數:12,代碼來源:NavigationHistoryService.cs

示例7: HandleFileRenamed

 private void HandleFileRenamed(ProjectFileRenamedEventArgs args)
 {
     foreach (var info in args) {
         RemoveFile(new ProjectFile(info.OldName));
         AddFile(new ProjectFile(info.NewName), info.Project);
     }
 }
開發者ID:rafaelsteil,項目名稱:monodevelop-project-linker,代碼行數:7,代碼來源:ProjectLinkerManager.cs

示例8: OnFileRenamedInProject

		/// <summary>
		/// Raises the FileRenamedInProject event.
		/// </summary>
		protected virtual void OnFileRenamedInProject (ProjectFileRenamedEventArgs e)
		{
			if (FileRenamedInProject != null) {
				FileRenamedInProject (this, e);
			}
		}
開發者ID:okrmartin,項目名稱:monodevelop,代碼行數:9,代碼來源:Project.cs

示例9: OnFileRenamedInProject

 		void OnFileRenamedInProject (object s, ProjectFileRenamedEventArgs args)
		{
			if (loading) return;
			
			foreach (ProjectFileRenamedEventInfo e in args) {
				if (e.ProjectFile.BuildAction != BuildAction.Compile)
					continue;
				
				if (RemoveSourceFile (e.OldName))
					AddSourceFile (e.NewName);
			}
		}
開發者ID:Kalnor,項目名稱:monodevelop,代碼行數:12,代碼來源:MonoSolutionItemHandler.cs

示例10: ExecuteFileRenamedAction

        private void ExecuteFileRenamedAction(ProjectFileRenamedEventArgs args)
        {
            if (sourceProject == null) {
                return;
            }

            HandleFileRenamed(args);

            SaveTargetProjects();
        }
開發者ID:rafaelsteil,項目名稱:monodevelop-project-linker,代碼行數:10,代碼來源:ProjectLinkerManager.cs

示例11: OnFileRenamedInProject

 		void OnFileRenamedInProject (object s, ProjectFileRenamedEventArgs e)
		{
			if (loading) return;
			
			if (e.ProjectFile.BuildAction != BuildAction.Compile)
				return;
				
			if (RemoveSourceFile (e.OldName))
				AddSourceFile (e.NewName);
		}
開發者ID:transformersprimeabcxyz,項目名稱:monodevelop-1,代碼行數:10,代碼來源:MonoSolutionItemHandler.cs

示例12: OnFileRenamedInProject

 protected override void OnFileRenamedInProject(ProjectFileRenamedEventArgs e)
 {
     base.OnFileRenamedInProject (e);
     foreach (ProjectFileRenamedEventInfo item in e)
         if (item.ProjectFile.Subtype == Subtype.Code && item.ProjectFile.BuildAction == BuildAction.Compile)
             typescript.ShimHost.UpdateScript (typescript.GetFilePath (item.OldName), null);
     // FIXME: make sure that adding, removing and then adding the same file still works (as "remove" does not really remove it).
     foreach (ProjectFileRenamedEventInfo item in e)
         if (item.ProjectFile.Subtype == Subtype.Code && item.ProjectFile.BuildAction == BuildAction.Compile)
             typescript.ShimHost.AddScript (typescript.GetFilePath (item.NewName), File.ReadAllText (typescript.GetFilePath (item.NewName)));
 }
開發者ID:atsushieno,項目名稱:md-typescript,代碼行數:11,代碼來源:TypeScriptProject.cs

示例13: OnFileRenamedInProject

 protected override void OnFileRenamedInProject(ProjectFileRenamedEventArgs e)
 {
     //e.
     //if (e.OldName == MainSource)
     //    MainSource = e.NewName;
     //base.OnFileRenamedInProject(e);
 }
開發者ID:tjhei,項目名稱:md-haxebinding,代碼行數:7,代碼來源:HaxeProject.cs

示例14: OnRenameFile

		void OnRenameFile (object sender, ProjectFileRenamedEventArgs args)
		{
			foreach (ProjectFileEventInfo e in args) {
				ITreeBuilder tb = Context.GetTreeBuilder (e.ProjectFile);
				if (tb != null) tb.Update ();
			}
		}
開發者ID:nomit007,項目名稱:monodevelop,代碼行數:7,代碼來源:ProjectNodeBuilder.cs

示例15: OnFileRenamedInProject

		internal protected virtual void OnFileRenamedInProject (ProjectFileRenamedEventArgs e)
		{
			next.OnFileRenamedInProject (e);
		}
開發者ID:sushihangover,項目名稱:monodevelop,代碼行數:4,代碼來源:ProjectExtension.cs


注:本文中的MonoDevelop.Projects.ProjectFileRenamedEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。