本文整理汇总了C#中Glade.XML.GetWidgetPrefix方法的典型用法代码示例。如果您正苦于以下问题:C# Glade.XML.GetWidgetPrefix方法的具体用法?C# Glade.XML.GetWidgetPrefix怎么用?C# Glade.XML.GetWidgetPrefix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Glade.XML
的用法示例。
在下文中一共展示了Glade.XML.GetWidgetPrefix方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RunApp
static int RunApp(string[] args, int n)
{
Project = SteticApp.CreateProject ();
Project.WidgetAdded += OnWidgetAdded;
Project.WidgetRemoved += OnWidgetRemoved;
Project.ModifiedChanged += OnProjectModified;
Project.ProjectReloaded += OnProjectReloaded;
Palette = SteticApp.PaletteWidget;
widgetTree = SteticApp.WidgetTreeWidget;
Signals = SteticApp.SignalsWidget;
propertyTree = SteticApp.PropertiesWidget;
ProjectView = new WindowListWidget ();
UIManager = new Stetic.UIManager (Project);
Glade.XML.CustomHandler = CustomWidgetHandler;
Glade.XML glade = new Glade.XML ("stetic.glade", "MainWindow");
glade.Autoconnect (typeof (SteticMain));
if (ProjectView.Parent is Gtk.Viewport &&
ProjectView.Parent.Parent is Gtk.ScrolledWindow) {
Gtk.Viewport viewport = (Gtk.Viewport)ProjectView.Parent;
Gtk.ScrolledWindow scrolled = (Gtk.ScrolledWindow)viewport.Parent;
viewport.Remove (ProjectView);
scrolled.Remove (viewport);
scrolled.AddWithViewport (ProjectView);
}
foreach (Gtk.Widget w in glade.GetWidgetPrefix ("")) {
Gtk.Window win = w as Gtk.Window;
if (win != null) {
win.AddAccelGroup (UIManager.AccelGroup);
win.ShowAll ();
}
}
MainWindow = (Gtk.Window)Palette.Toplevel;
WidgetNotebook = (Gtk.Notebook) glade ["notebook"];
WidgetNotebook.SwitchPage += OnPageChanged;
ProjectView.ComponentActivated += OnWidgetActivated;
widgetTree.SelectionChanged += OnSelectionChanged;
#if GTK_SHARP_2_6
// This is needed for both our own About dialog and for ones
// the user constructs
Gtk.AboutDialog.SetUrlHook (ActivateUrl);
#endif
if (n < args.Length) {
LoadProject (args [n]);
}
ReadConfiguration ();
foreach (string s in Configuration.WidgetLibraries) {
SteticApp.AddWidgetLibrary (s);
}
SteticApp.UpdateWidgetLibraries (false);
ProjectView.Fill (Project);
Program.Run ();
return 0;
}