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


C# Components.NodeInfo类代码示例

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


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

示例1: BuildNode

		public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
		{
			UnknownSolutionItem entry = (UnknownSolutionItem) dataObject;
			
			if (entry.UnloadedEntry) {
				nodeInfo.Icon = Context.GetIcon (MonoDevelop.Ide.Gui.Stock.Project);
				Xwt.Drawing.Image gicon = Context.GetComposedIcon (nodeInfo.Icon, "fade");
				if (gicon == null) {
					gicon = nodeInfo.Icon.WithAlpha (0.5);
					Context.CacheComposedIcon (nodeInfo.Icon, "fade", gicon);
				}
				nodeInfo.Icon = gicon;
				nodeInfo.Label = GettextCatalog.GetString ("<span foreground='grey'>{0} <span size='small'>(Unavailable)</span></span>", GLib.Markup.EscapeText (entry.Name));
			}
			else if (entry.LoadError.Length > 0) {
				nodeInfo.Icon = Context.GetIcon (Gtk.Stock.DialogError);
				nodeInfo.Label = GettextCatalog.GetString ("{0} <span foreground='red' size='small'>(Load failed)</span>", GLib.Markup.EscapeText (entry.Name));
			} else {
				nodeInfo.Icon = Context.GetIcon (MonoDevelop.Ide.Gui.Stock.Project);
				var gicon = Context.GetComposedIcon (nodeInfo.Icon, "fade");
				if (gicon == null) {
					gicon = nodeInfo.Icon.WithAlpha (0.5);
					Context.CacheComposedIcon (nodeInfo.Icon, "fade", gicon);
				}
				nodeInfo.Icon = gicon;
				nodeInfo.Label = GLib.Markup.EscapeText (entry.Name);
			}
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:28,代码来源:UnknownEntryNodeBuilder.cs

示例2: BuildNode

        public override void BuildNode(ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
        {
            ProtobuildReference reference = (ProtobuildReference)dataObject;

            nodeInfo.Icon = Context.GetIcon(MonoDevelop.Ide.Gui.Stock.Reference);
            nodeInfo.Label = GLib.Markup.EscapeText (reference.Name);
        }
开发者ID:Protobuild,项目名称:Protobuild.IDE.MonoDevelop,代码行数:7,代码来源:ProtobuildReferenceNodeBuilder.cs

示例3: BuildNode

		public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
		{
			var service = (ConnectedServiceNode)dataObject;
			nodeInfo.Label = service.DisplayName;
			nodeInfo.Icon = Context.GetIcon ("md-service");
			nodeInfo.ClosedIcon = Context.GetIcon ("md-service");
		}
开发者ID:kdubau,项目名称:monodevelop,代码行数:7,代码来源:ConnectedServiceNodeBuilder.cs

示例4: BuildNode

		public override void BuildNode(ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
		{
			ProtobuildPackage package = (ProtobuildPackage) dataObject;

			nodeInfo.Icon = Context.GetIcon(MonoDevelop.Ide.Gui.Stock.Reference);

			if (package.IsBinary)
			{
				var overlay = ImageService.GetIcon ("md-command").WithSize (Xwt.IconSize.Small);
				var cached = Context.GetComposedIcon (nodeInfo.Icon, overlay);
				if (cached != null)
					nodeInfo.Icon = cached;
				else {
					var ib = new Xwt.Drawing.ImageBuilder (nodeInfo.Icon.Width, nodeInfo.Icon.Height);
					ib.Context.DrawImage (nodeInfo.Icon, 0, 0);
					ib.Context.DrawImage (overlay, 8, 8, 8, 8);
					var res = ib.ToVectorImage ();
					ib.Dispose ();
					Context.CacheComposedIcon (nodeInfo.Icon, overlay, res);
					nodeInfo.Icon = res;
				}
			}

			nodeInfo.Label = GettextCatalog.GetString(
				"{0} <span foreground='grey'><span size='small'>({1}@{2})</span></span>", 
				GLib.Markup.EscapeText(package.Folder),
				GLib.Markup.EscapeText(package.Uri),
				GLib.Markup.EscapeText(package.GitRef));
		}
开发者ID:Protobuild,项目名称:Protobuild.IDE.MonoDevelop,代码行数:29,代码来源:ProtobuildPackageNodeBuilder.cs

示例5: BuildNode

		public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
		{
			UnknownSolutionItem entry = (UnknownSolutionItem) dataObject;
			
			if (entry is UnloadedSolutionItem) {
				nodeInfo.Icon = Context.GetIcon (MonoDevelop.Ide.Gui.Stock.Project);
				Xwt.Drawing.Image gicon = Context.GetComposedIcon (nodeInfo.Icon, "fade");
				if (gicon == null) {
					gicon = nodeInfo.Icon.WithAlpha (0.5);
					Context.CacheComposedIcon (nodeInfo.Icon, "fade", gicon);
				}
				nodeInfo.Icon = gicon;
				nodeInfo.Label = GettextCatalog.GetString ("{0} <span size='small'>(Unavailable)</span>", GLib.Markup.EscapeText (entry.Name));
				nodeInfo.DisabledStyle = true;
			}
			else if (entry.LoadError.Length > 0) {
				nodeInfo.Icon = Context.GetIcon (MonoDevelop.Ide.Gui.Stock.Project).WithAlpha (0.5);
				nodeInfo.Label = entry.Name;
				nodeInfo.StatusSeverity = TaskSeverity.Error;
				nodeInfo.StatusMessage = GettextCatalog.GetString ("Load failed: ") + entry.LoadError;
				nodeInfo.DisabledStyle = true;
			} else {
				nodeInfo.Icon = Context.GetIcon (MonoDevelop.Ide.Gui.Stock.Project);
				var gicon = Context.GetComposedIcon (nodeInfo.Icon, "fade");
				if (gicon == null) {
					gicon = nodeInfo.Icon.WithAlpha (0.5);
					Context.CacheComposedIcon (nodeInfo.Icon, "fade", gicon);
				}
				nodeInfo.Icon = gicon;
				nodeInfo.Label = GLib.Markup.EscapeText (entry.Name);
			}
		}
开发者ID:kdubau,项目名称:monodevelop,代码行数:32,代码来源:UnknownEntryNodeBuilder.cs

示例6: BuildNode

		public override void BuildNode (ITreeBuilder builder, object dataObject, NodeInfo nodeInfo)
		{
			nodeInfo.Label = AddinCatalog.GetString ("Database Connections");
			nodeInfo.Icon = Context.GetIcon ("md-db-connection");
			
			this.builder = builder;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:7,代码来源:ConnectionContextCollectionNodeBuilder.cs

示例7: BuildNode

        public override void BuildNode(ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
        {
			var externalRef = (ProtobuildExternalRef) dataObject;

			nodeInfo.Label = GLib.Markup.EscapeText(externalRef.Name ?? externalRef.Path);
			nodeInfo.Icon = Context.GetIcon(Stock.Reference);
        }
开发者ID:Protobuild,项目名称:Protobuild.IDE.MonoDevelop,代码行数:7,代码来源:ProtobuildExternalRefNodeBuilder.cs

示例8: BuildNode

		public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
		{
			nodeInfo.Label = GettextCatalog.GetString ("Addin References");
			//TODO: better icons
			nodeInfo.Icon = Context.GetIcon (Stock.OpenReferenceFolder);
			nodeInfo.ClosedIcon = Context.GetIcon (Stock.ClosedReferenceFolder);
		}
开发者ID:sushihangover,项目名称:MonoDevelop.AddinMaker,代码行数:7,代码来源:AddinReferencesNodeBuilder.cs

示例9: BuildNode

		public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
		{
			var project = (Project)dataObject;
			
			nodeInfo.Label = project.Name;
			nodeInfo.Icon = Context.GetIcon (project.StockIcon);
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:7,代码来源:ProjectNodeBuilder.cs

示例10: typeof

        /*public override Type CommandHandlerType
        {
            get { return typeof (ProtobuildProjectFileNodeCommandHandler); }
        }*/

        public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
        {
            base.BuildNode(treeBuilder, dataObject, nodeInfo);

            ProtobuildProjectFile projectFile = (ProtobuildProjectFile)dataObject;

            SolutionConfiguration conf = projectFile.Project.ParentSolution.GetConfiguration(IdeApp.Workspace.ActiveConfiguration);

            var notActive = false;

            if (projectFile.IncludePlatforms != null) {
                if (!projectFile.IncludePlatforms.Contains (conf.Id)) {
                    notActive = true;
                }
            }

            if (projectFile.ExcludePlatforms != null)
            {
                if (projectFile.ExcludePlatforms.Contains(conf.Id))
                {
                    notActive = true;
                }
            }

            if (notActive)
            {
                nodeInfo.DisabledStyle = true;
                nodeInfo.StatusSeverity = TaskSeverity.Information;
                nodeInfo.StatusMessage = GettextCatalog.GetString("File not active for " + conf.Name);
            }
        }
开发者ID:Protobuild,项目名称:Protobuild.IDE.MonoDevelop,代码行数:36,代码来源:ProtobuildProjectFileNodeBuilder.cs

示例11: BuildNode

		public override void BuildNode(ITreeBuilder treeBuilder, object dataObject, NodeInfo n)
		{
			n.Label = GettextCatalog.GetString("References");
			n.Icon = Context.GetIcon(Stock.OpenReferenceFolder.Name);
			n.ClosedIcon = Context.GetIcon(Stock.ClosedReferenceFolder.Name);
			//base.BuildNode(treeBuilder, dataObject, nodeInfo);
		}
开发者ID:DinrusGroup,项目名称:Mono-D,代码行数:7,代码来源:DProjectReferenceFolderNodeBuilder.cs

示例12: BuildNode

		public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
		{
			ProjectReference pref = (ProjectReference) dataObject;
			
			switch (pref.ReferenceType) {
			case ReferenceType.Project:
				nodeInfo.Label = pref.Reference;
				nodeInfo.Icon = Context.GetIcon ("md-reference-project");
				break;
			case ReferenceType.Assembly:
				nodeInfo.Label = Path.GetFileName(pref.Reference);
				nodeInfo.Icon = Context.GetIcon ("md-reference-folder");
				break;
			case ReferenceType.Package:
				nodeInfo.Label = pref.Reference.Split(',')[0];
				nodeInfo.Icon = Context.GetIcon ("md-reference-package");
				break;
			default:
				nodeInfo.Label = pref.Reference;
				nodeInfo.Icon = Context.GetIcon (Stock.Reference);
				break;
			}
			
			nodeInfo.Label = GLib.Markup.EscapeText (nodeInfo.Label);

			if (!pref.IsValid) {
				nodeInfo.Label = "<span color='red'>" + nodeInfo.Label + "</span>";
				nodeInfo.Icon = Context.GetIcon ("md-reference-warning");
			}
		}
开发者ID:alexrp,项目名称:monodevelop,代码行数:30,代码来源:ProjectReferenceNodeBuilder.cs

示例13: BuildNode

		public override void BuildNode(ITreeBuilder treeBuilder, object dataObject, NodeInfo n)
		{
			var pref = (DProjectReference)dataObject;
			switch (pref.ReferenceType)
			{
				case ReferenceType.Project:
					n.Icon = Context.GetIcon("md-reference-project");
					break;
				case ReferenceType.Package:
					n.Icon = Context.GetIcon("md-reference-folder");
					break;
				/*
			case ReferenceType.Assembly:
				label = Path.GetFileName(pref.Reference);
				icon = Context.GetIcon ("md-reference-folder");
				break;
				default:
				label = pref.Reference;
				icon = Context.GetIcon (Stock.Reference);
				break;*/
			}

			n.Label = GLib.Markup.EscapeText(pref.Name);

			if (!pref.IsValid)
			{
				n.Label = "<span color='red'>" + n.Label + "</span>";
				n.Icon = Context.GetIcon("md-reference-warning");
			}
		}
开发者ID:DinrusGroup,项目名称:Mono-D,代码行数:30,代码来源:DPrjRefNode.cs

示例14: BuildNode

 public override void BuildNode(ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
 {
     var node = (DependenciesFolderNode)dataObject;
     nodeInfo.Label = node.GetLabel ();
     nodeInfo.Icon = Context.GetIcon (node.Icon);
     nodeInfo.ClosedIcon = Context.GetIcon (node.ClosedIcon);
 }
开发者ID:twing207,项目名称:monodevelop-dnx-addin,代码行数:7,代码来源:DependenciesFolderNodeBuilder.cs

示例15: BuildNode

/*		public override void GetNodeAttributes (ITreeNavigator parentNode, object dataObject, ref NodeAttributes attributes)
		{
			attributes |= NodeAttributes.UseMarkup;
		}
*/
		public override void BuildNode (ITreeBuilder treeBuilder, object dataObject, NodeInfo nodeInfo)
		{
			UnitTest test = dataObject as UnitTest;
			nodeInfo.Icon = test.StatusIcon;

			var title = RemoveGenericArgument (test.Title);
			title = test.Title;
			if (test.Status == TestStatus.Running) {
				nodeInfo.Label = Ambience.EscapeText (title);
				return;
			} else if (test.Status == TestStatus.Loading) {
				nodeInfo.Label = Ambience.EscapeText (title) + GettextCatalog.GetString (" (Loading)");
				return;
			} else if (test.Status == TestStatus.LoadError) {
				nodeInfo.Label = Ambience.EscapeText (title) + GettextCatalog.GetString (" (Load failed)");
				return;
			} else {
				nodeInfo.Label = Ambience.EscapeText (title);

				UnitTestResult res = test.GetLastResult ();
				if (res != null && treeBuilder.Options ["ShowTestCounters"] && (test is UnitTestGroup)) {
					nodeInfo.Label += string.Format (GettextCatalog.GetString (" ({0} passed, {1} failed, {2} not run)"), res.Passed, res.ErrorsAndFailures, res.TestsNotRun);
				}

				if (treeBuilder.Options ["ShowTestTime"]) {
					nodeInfo.Label += string.Format ("   Time: {0}ms", res.Time.TotalMilliseconds);
				}
			}
		}
开发者ID:powerumc,项目名称:monodevelop_korean,代码行数:34,代码来源:TestNodeBuilder.cs


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