本文整理汇总了C#中ITreeNavigator.MoveToObject方法的典型用法代码示例。如果您正苦于以下问题:C# ITreeNavigator.MoveToObject方法的具体用法?C# ITreeNavigator.MoveToObject怎么用?C# ITreeNavigator.MoveToObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITreeNavigator
的用法示例。
在下文中一共展示了ITreeNavigator.MoveToObject方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Fill
public void Fill (Extension ext, ITreeNavigator nav)
{
labelName.Markup = "<small>Extension</small>\n<big><b>" + GLib.Markup.EscapeText (Util.GetDisplayName (ext)) + "</b></big>";
object parent = ext.GetExtendedObject ();
if (parent is ExtensionPoint) {
ExtensionPoint ep = (ExtensionPoint) parent;
string txt = "<small>Extension Point</small>\n<b>" + GLib.Markup.EscapeText (Util.GetDisplayName (ep)) + "</b>";
if (!string.IsNullOrEmpty (ep.Description))
txt += "\n" + GLib.Markup.EscapeText (ep.Description);
Gtk.Label lab = new Gtk.Label ();
lab.Xalign = lab.Yalign = 0;
lab.Markup = txt;
lab.WidthRequest = 400;
lab.Wrap = true;
Gtk.Image img = new Gtk.Image (ImageService.GetPixbuf ("md-extension-point", Gtk.IconSize.Menu));
img.Yalign = 0;
Gtk.HBox box = new Gtk.HBox (false, 6);
box.PackStart (img, false, false, 0);
box.PackStart (lab, true, true, 0);
buttonExt.Add (box);
buttonExt.ShowAll ();
buttonExt.Clicked += delegate {
if (nav.MoveToObject (ext)) {
nav.MoveToParent (typeof(Solution));
nav.Expanded = true;
if (nav.MoveToObject (ep.ParentAddinDescription)) {
nav.Expanded = true;
if (nav.MoveToObject (ep))
nav.Selected = true;
}
}
};
}
}