本文整理汇总了C#中Glade.XML.GetWidgetPrefix方法的典型用法代码示例。如果您正苦于以下问题:C# XML.GetWidgetPrefix方法的具体用法?C# XML.GetWidgetPrefix怎么用?C# XML.GetWidgetPrefix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Glade.XML
的用法示例。
在下文中一共展示了XML.GetWidgetPrefix方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
public static void Main (string[] args)
{
if (args.Length < 2) {
Console.WriteLine ("Use: ./glade-viewer.exe \"fname\" \"root\"");
return;
}
Application.Init ();
string fname = args [0];
string root = args [1];
Glade.XML gxml = new Glade.XML (fname, root, null);
Widget wid = gxml [root];
wid.Show ();
Console.WriteLine ("The filename: {0}", gxml.Filename);
Console.WriteLine ("A relative filename: {0}", gxml.RelativeFile ("image.png"));
Console.WriteLine ("The name of the root widget: {0}", Glade.XML.GetWidgetName (wid));
Console.WriteLine ("It is {0} that it was created using a Glade.XML object",
Glade.XML.GetWidgetTree (wid) != null);
Console.WriteLine ("\nList of created widgets:");
foreach (Widget w in gxml.GetWidgetPrefix ("")) {
Console.WriteLine ("{0} {1}",
w.GetType (),
Glade.XML.GetWidgetName (w));
}
Application.Run ();
}