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


C# NodeAttributes类代码示例

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


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

示例1: GetNodeAttributes

		public override void GetNodeAttributes (ITreeNavigator parentNode, object dataObject, ref NodeAttributes attributes)
		{
			Project p = parentNode.DataItem as Project;
			
			if (p is CProject)
				attributes |= NodeAttributes.Hidden;
		}
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:7,代码来源:ProjectResourcesExtension.cs

示例2: GetNodeAttributes

		/// <summary>
		/// Gets the attributes of the given node. In this case, sets the hidden attribute if the node matches the Connected Services folder in the project root
		/// </summary>
		public override void GetNodeAttributes (ITreeNavigator parentNode, object dataObject, ref NodeAttributes attributes)
		{
			var folder = (ProjectFolder)dataObject;

			if (parentNode != null && parentNode.DataItem is DotNetProject && folder.Path.FileName == ConnectedServices.ProjectStateFolderName)
			{
				attributes |= NodeAttributes.Hidden;
			}
		}
开发者ID:PlayScriptRedux,项目名称:monodevelop,代码行数:12,代码来源:ConnectedServicesFolderNodeHiderExtension.cs

示例3: GetNodeAttributes

		public override void GetNodeAttributes (ITreeNavigator parentNode, object dataObject, ref NodeAttributes attributes)
		{
			Solution sol = (Solution) dataObject;
			foreach (DotNetProject p in sol.GetAllSolutionItems<DotNetProject> ()) {
				if (p.GetAddinData () != null)
					return;
			}
			attributes |= NodeAttributes.Hidden;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:9,代码来源:SolutionNodeBuilder.cs

示例4: GetNodeAttributes

		public override void GetNodeAttributes (ITreeNavigator treeNavigator, object dataObject, ref NodeAttributes attributes)
		{
			ProjectFile file = (ProjectFile) dataObject;

			attributes |= NodeAttributes.AllowRename;

			if (!file.Visible && !treeNavigator.Options ["ShowAllFiles"])
				attributes |= NodeAttributes.Hidden;
		}
开发者ID:llucenic,项目名称:monodevelop,代码行数:9,代码来源:ProjectFileNodeBuilder.cs

示例5: GetNodeAttributes

		public override void GetNodeAttributes (ITreeNavigator parentNode, object dataObject, ref NodeAttributes attributes)
		{
			var fromPackagesFolderNode = parentNode.DataItem as ProjectReferencesFromPackagesFolderNode;
			if (fromPackagesFolderNode != null)
				return;

			var projectReference = (ProjectReference)dataObject;
			if (projectReference.IsReferenceFromPackage ()) {
				attributes |= NodeAttributes.Hidden;
			}
		}
开发者ID:sushihangover,项目名称:monodevelop,代码行数:11,代码来源:ProjectReferenceNodeBuilderExtension.cs

示例6: GetNodeAttributes

		public override void GetNodeAttributes (ITreeNavigator treeNavigator, object dataObject, ref NodeAttributes attributes)
		{
			ProjectFile file = (ProjectFile) dataObject;
			if (file.DependsOnFile != null) {
				attributes = NodeAttributes.None;
			} else {
				attributes |= NodeAttributes.AllowRename;
			}
			if (!file.Visible && !treeNavigator.Options ["ShowAllFiles"])
				attributes |= NodeAttributes.Hidden;
		}
开发者ID:techsaint,项目名称:monodevelop,代码行数:11,代码来源:ProjectFileNodeBuilder.cs

示例7: GetNodeAttributes

		public override void GetNodeAttributes (ITreeNavigator treeNavigator, object dataObject, ref NodeAttributes attributes)
		{
			if (treeNavigator.Options ["ShowAllFiles"])
				return;

			ProjectFolder folder = dataObject as ProjectFolder;
			if (folder != null && folder.Project is DotNetProject) {
				GtkDesignInfo info = GtkDesignInfo.FromProject (folder.Project);
				if (info.GtkGuiFolder == folder.Path)
					attributes |= NodeAttributes.Hidden;
			}
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:12,代码来源:ProjectFolderNodeBuilderExtension.cs

示例8: GetNodeAttributes

        public override void GetNodeAttributes(ITreeNavigator treeNavigator, object dataObject, ref NodeAttributes attributes)
        {
            if (treeNavigator.Options ["ShowAllFiles"])
                return;

            ProjectFolder folder = dataObject as ProjectFolder;
            if (folder != null && folder.Project is DotNetProject && folder.Project.ExtendedProperties["QyotoDesignInfo"] != null) {
                QyotoDesignInfo info = QyotoDesignInfo.FromProject(folder.Project);
                if (info.QtGuiFolder == folder.Path)
                    attributes |= NodeAttributes.Hidden;
            }
        }
开发者ID:codebutler,项目名称:qyotodevelop,代码行数:12,代码来源:ProjectFolderNodeBuilder.cs

示例9: GetNodeAttributes

		public override void GetNodeAttributes (ITreeNavigator treeNavigator, object dataObject, ref NodeAttributes attributes)
		{
			if (dataObject is GuiProjectFolder)
				return;
			
			ProjectFolder folder = dataObject as ProjectFolder;
			if (folder != null && folder.Project is DotNetProject) {
				GtkDesignInfo info = GtkDesignInfo.FromProject (folder.Project);
				if (info.SteticFolder == folder.Path)
					attributes |= NodeAttributes.Hidden;
			}
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:12,代码来源:ProjectFolderNodeBuilderExtension.cs

示例10: GetNodeAttributes

		public override void GetNodeAttributes (ITreeNavigator treeNavigator, object dataObject, ref NodeAttributes attributes)
		{
			if (treeNavigator.Options ["ShowAllFiles"])
				return;
			
			ProjectFile pf = (ProjectFile) dataObject;
			GtkDesignInfo info = GtkDesignInfo.FromProject (pf.Project);
			//Designer files in the designer folder like IconFactory.gtkx should be always visible
			if (info.HideGtkxFiles && 
			    pf.FilePath.Extension == ".gtkx" && 
			    !pf.FilePath.IsChildPathOf (info.SteticFolder))
				attributes |= NodeAttributes.Hidden;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:13,代码来源:ProjectFileNodeBuilderExtension.cs

示例11: GetNodeAttributes

		public override void GetNodeAttributes (ITreeNavigator parentNode, object dataObject, ref NodeAttributes attributes)
		{
			var file = (ProjectFile) dataObject;

			if ((file.Flags & ProjectItemFlags.Hidden) != 0) {
				attributes |= NodeAttributes.Hidden;
				return;
			}

			attributes |= NodeAttributes.AllowRename;

			if (!file.Visible && !parentNode.Options ["ShowAllFiles"])
				attributes |= NodeAttributes.Hidden;
		}
开发者ID:zenek-y,项目名称:monodevelop,代码行数:14,代码来源:ProjectFileNodeBuilder.cs

示例12: GetNodeAttributes

		public override void GetNodeAttributes (ITreeNavigator parentNode, object dataObject, ref NodeAttributes attributes)
		{
			base.GetNodeAttributes (parentNode, dataObject, ref attributes);
			if (dataObject is ProjectFile) {
				string fname = ((ProjectFile)dataObject).Name;
				if (fname.EndsWith (".addin.xml", StringComparison.Ordinal) || fname.EndsWith (".addin", StringComparison.Ordinal)) {
					if (!(parentNode.DataItem is AddinData)) {
						DotNetProject dp = (DotNetProject) parentNode.GetParentDataItem (typeof(DotNetProject), true);
						if (dp != null && dp.GetAddinData () != null) {
							// Hide the manifest
							attributes |= NodeAttributes.Hidden;
						}
					}
				}
			}
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:16,代码来源:ProjectFolderNodeBuilderExtension.cs

示例13: GetNodeAttributes

		public override void GetNodeAttributes (ITreeNavigator parentNode, object dataObject, ref NodeAttributes attributes)
		{
			if (dataObject is AddinProjectReference) {
				attributes |= NodeAttributes.Hidden;
				return;
			}
			ProjectReference pr = (ProjectReference) dataObject;
			DotNetProject parent = pr.OwnerProject as DotNetProject;
			if (AddinAuthoringService.IsProjectIncludedByAddin (parent, pr)) {
				attributes |= NodeAttributes.Hidden;
			}
			else if (parent.GetAddinData () != null && pr.ReferenceType == ReferenceType.Project) {
				DotNetProject tp = parent.ParentSolution.FindProjectByName (pr.Reference) as DotNetProject;
				if (tp != null && tp.GetAddinData () != null)
					attributes |= NodeAttributes.Hidden;
			}
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:17,代码来源:ReferenceNodeBuilder.cs

示例14: GetNodeAttributes

		/// <summary>Get the attributes for the current node.</summary>
		/// <param name="treeNavigator">ITreeNavigator containing the tree navigator.</param>
		/// <param name="dataObject">An object containing the value of the current node.</param>
		/// <param name="attributes">A NodeAttributes reference containing all the attribute for the current node.</param>
		public override void GetNodeAttributes (ITreeNavigator treeNavigator, object dataObject, ref NodeAttributes attributes)
		{
			if (treeNavigator.Options ["ShowAllFiles"])
				return;
			
			ProjectFolder folder = dataObject as ProjectFolder;
			DotNetProject project = folder.Project as DotNetProject;
			if (project == null)
				return;
			
			foreach (var item in WebReferencesService.GetWebReferenceItems (project)) {
				if (folder.Path == item.BasePath.ParentDirectory.CanonicalPath) {
					attributes |= NodeAttributes.Hidden;
					break;
				}
			}
		}
开发者ID:llucenic,项目名称:monodevelop,代码行数:21,代码来源:ProjectFolderNodeBuilderExtension.cs

示例15: UpdateNode

			void UpdateNode (NodeBuilder[] chain, NodeAttributes ats, object dataObject)
			{
				bool isNew = false;

				var ni = (NodeInfo)store.GetValue (currentIter, ExtensibleTreeView.NodeInfoColumn);
				if (ni == null || ni.IsShared) {
					ni = new NodeInfo ();
					isNew = true;
				}
				else
					ni.Reset ();

				GetNodeInfo (ni, pad, this, chain, dataObject);

				if (isNew)
					store.SetValue (currentIter, ExtensibleTreeView.NodeInfoColumn, ni);
				else
					store.EmitRowChanged (store.GetPath (currentIter), currentIter);
			}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:19,代码来源:TreeBuilder.cs


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