本文整理汇总了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);
}
}
示例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);
}
示例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");
}
示例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));
}
示例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);
}
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
示例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");
}
}
示例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");
}
}
示例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);
}
示例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);
}
}
}