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


C# Glade.XML.GetWidgetPrefix方法代码示例

本文整理汇总了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;
        }
开发者ID:mono,项目名称:stetic,代码行数:65,代码来源:Stetic.cs


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