本文整理汇总了C#中Gtk.UIManager.InsertActionGroup方法的典型用法代码示例。如果您正苦于以下问题:C# Gtk.UIManager.InsertActionGroup方法的具体用法?C# Gtk.UIManager.InsertActionGroup怎么用?C# Gtk.UIManager.InsertActionGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.UIManager
的用法示例。
在下文中一共展示了Gtk.UIManager.InsertActionGroup方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Build
protected virtual void Build()
{
Stetic.Gui.Initialize();
// Widget MainWindow
Gtk.UIManager w1 = new Gtk.UIManager();
Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default");
this.Datei = new Gtk.Action("Datei", Mono.Unix.Catalog.GetString("_Datei"), null, null);
this.Datei.ShortLabel = Mono.Unix.Catalog.GetString("_Datei");
w2.Add(this.Datei, null);
this.Aktionen = new Gtk.Action("Aktionen", Mono.Unix.Catalog.GetString("_Aktionen"), null, null);
this.Aktionen.ShortLabel = Mono.Unix.Catalog.GetString("_Aktionen");
w2.Add(this.Aktionen, null);
this.Hilfe = new Gtk.Action("Hilfe", Mono.Unix.Catalog.GetString("_Hilfe"), null, null);
this.Hilfe.ShortLabel = Mono.Unix.Catalog.GetString("_Hilfe");
w2.Add(this.Hilfe, "<Control>question");
this.Revert = new Gtk.Action("Revert", Mono.Unix.Catalog.GetString("_Revert"), null, "gtk-undo");
this.Revert.ShortLabel = Mono.Unix.Catalog.GetString("_Revert");
w2.Add(this.Revert, null);
this.LA = new Gtk.Action("LA", Mono.Unix.Catalog.GetString("_LA"), null, "gtk-delete");
this.LA.ShortLabel = Mono.Unix.Catalog.GetString("_LA");
w2.Add(this.LA, null);
this.SLA = new Gtk.Action("SLA", Mono.Unix.Catalog.GetString("_SLA"), null, "gtk-delete");
this.SLA.ShortLabel = Mono.Unix.Catalog.GetString("_SLA");
w2.Add(this.SLA, null);
this.Beobachten = new Gtk.Action("Beobachten", Mono.Unix.Catalog.GetString("_Beobachten"), null, "gtk-find");
this.Beobachten.ShortLabel = Mono.Unix.Catalog.GetString("_Beobachten");
w2.Add(this.Beobachten, null);
this.VHinweis = new Gtk.Action("VHinweis", Mono.Unix.Catalog.GetString("_VHinweis"), null, "gtk-dialog-error");
this.VHinweis.ShortLabel = Mono.Unix.Catalog.GetString("_VHinweis");
w2.Add(this.VHinweis, null);
this.home = new Gtk.Action("home", null, null, "gtk-home");
w2.Add(this.home, null);
this.spellCheck = new Gtk.Action("spellCheck", null, null, "gtk-spell-check");
w2.Add(this.spellCheck, null);
this.quit = new Gtk.Action("quit", null, null, "gtk-quit");
w2.Add(this.quit, null);
this.dialogQuestion = new Gtk.Action("dialogQuestion", null, null, "gtk-dialog-question");
w2.Add(this.dialogQuestion, null);
this.Beenden = new Gtk.Action("Beenden", Mono.Unix.Catalog.GetString("Beenden"), null, null);
this.Beenden.ShortLabel = Mono.Unix.Catalog.GetString("Beenden");
w2.Add(this.Beenden, "<Control>q");
this.LA1 = new Gtk.Action("LA1", Mono.Unix.Catalog.GetString("LA+"), null, null);
this.LA1.ShortLabel = Mono.Unix.Catalog.GetString("LA+");
w2.Add(this.LA1, "<Alt>l");
this.SLA1 = new Gtk.Action("SLA1", Mono.Unix.Catalog.GetString("SLA+"), null, null);
this.SLA1.ShortLabel = Mono.Unix.Catalog.GetString("SLA+");
w2.Add(this.SLA1, "<Alt>s");
this.Vandal = new Gtk.Action("Vandal", Mono.Unix.Catalog.GetString("Vandal+"), null, null);
this.Vandal.ShortLabel = Mono.Unix.Catalog.GetString("Vandal+");
w2.Add(this.Vandal, "<Alt>v");
this.ber = new Gtk.Action("ber", Mono.Unix.Catalog.GetString("Über"), null, null);
this.ber.ShortLabel = Mono.Unix.Catalog.GetString("Über");
w2.Add(this.ber, null);
this.Artikel = new Gtk.Action("Artikel", Mono.Unix.Catalog.GetString("_Artikel"), null, null);
this.Artikel.ShortLabel = Mono.Unix.Catalog.GetString("_Artikel");
w2.Add(this.Artikel, null);
this.LokalSpeichern = new Gtk.Action("LokalSpeichern", Mono.Unix.Catalog.GetString("_Lokal Speichern"), null, "gtk-save");
this.LokalSpeichern.ShortLabel = Mono.Unix.Catalog.GetString("_Lokal Speichern");
w2.Add(this.LokalSpeichern, null);
this.OnlineSpeichern = new Gtk.Action("OnlineSpeichern", Mono.Unix.Catalog.GetString("_Online Speichern"), null, "gtk-network");
this.OnlineSpeichern.ShortLabel = Mono.Unix.Catalog.GetString("_Online Speichern");
w2.Add(this.OnlineSpeichern, null);
this.Aktualisieren = new Gtk.Action("Aktualisieren", Mono.Unix.Catalog.GetString("_Aktualisieren"), null, "gtk-refresh");
this.Aktualisieren.ShortLabel = Mono.Unix.Catalog.GetString("_Aktualisieren");
w2.Add(this.Aktualisieren, null);
this.Bearbeiten = new Gtk.Action("Bearbeiten", Mono.Unix.Catalog.GetString("_Bearbeiten"), null, null);
this.Bearbeiten.ShortLabel = Mono.Unix.Catalog.GetString("_Bearbeiten");
w2.Add(this.Bearbeiten, null);
this.Einstellungen = new Gtk.Action("Einstellungen", Mono.Unix.Catalog.GetString("_Einstellungen"), null, null);
this.Einstellungen.ShortLabel = Mono.Unix.Catalog.GetString("_Einstellungen");
w2.Add(this.Einstellungen, "<Control>o");
this.add = new Gtk.Action("add", null, null, "gtk-add");
w2.Add(this.add, null);
this.remove = new Gtk.Action("remove", null, null, "gtk-remove");
w2.Add(this.remove, null);
this.clear = new Gtk.Action("clear", null, null, "gtk-clear");
w2.Add(this.clear, null);
w1.InsertActionGroup(w2, 0);
this.AddAccelGroup(w1.AccelGroup);
this.Name = "MainWindow";
this.Title = Mono.Unix.Catalog.GetString("Wikifighter");
this.Icon = Gtk.IconTheme.Default.LoadIcon("stock_smiley-18", 16, 0);
// Container child MainWindow.Gtk.Container+ContainerChild
this.main_vbox = new Gtk.VBox();
this.main_vbox.Name = "main_vbox";
// Container child main_vbox.Gtk.Box+BoxChild
w1.AddUiFromString("<ui><menubar name='menubar'><menu action='Datei'><menuitem action='Beenden'/></menu><menu action='Bearbeiten'><menuitem action='Einstellungen'/></menu><menu action='Aktionen'><menuitem action='LA1'/><menuitem action='SLA1'/><menuitem action='Vandal'/></menu><menu action='Hilfe'><menuitem action='ber'/></menu></menubar></ui>");
this.menubar = ((Gtk.MenuBar)(w1.GetWidget("/menubar")));
this.menubar.Name = "menubar";
this.main_vbox.Add(this.menubar);
Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.main_vbox[this.menubar]));
w3.Position = 0;
w3.Expand = false;
w3.Fill = false;
// Container child main_vbox.Gtk.Box+BoxChild
this.browserbox = new Gtk.VBox();
this.browserbox.Name = "browserbox";
// Container child browserbox.Gtk.Box+BoxChild
w1.AddUiFromString("<ui><toolbar name='geckotoolbar'><toolitem action='Revert'/><toolitem action='SLA'/><toolitem action='Beobachten'/><toolitem action='VHinweis'/><toolitem action='spellCheck'/><toolitem action='dialogQuestion'/><toolitem action='home'/><toolitem action='quit'/></toolbar></ui>");
this.geckotoolbar = ((Gtk.Toolbar)(w1.GetWidget("/geckotoolbar")));
//.........这里部分代码省略.........
示例2: Build
protected virtual void Build()
{
Stetic.Gui.Initialize(this);
// Widget LinuxGUITest.WiimoteInformation
Stetic.BinContainer w1 = Stetic.BinContainer.Attach(this);
Gtk.UIManager w2 = new Gtk.UIManager();
Gtk.ActionGroup w3 = new Gtk.ActionGroup("Default");
this.WiiMoteAction = new Gtk.Action("WiiMoteAction", Mono.Unix.Catalog.GetString("WiiMote"), null, null);
this.WiiMoteAction.ShortLabel = Mono.Unix.Catalog.GetString("Tools");
w3.Add(this.WiiMoteAction, null);
this.DisconnectAction = new Gtk.Action("DisconnectAction", Mono.Unix.Catalog.GetString("Disconnect"), null, null);
this.DisconnectAction.HideIfEmpty = false;
this.DisconnectAction.ShortLabel = Mono.Unix.Catalog.GetString("Disconnect");
w3.Add(this.DisconnectAction, null);
this.PlaySoundAction = new Gtk.Action("PlaySoundAction", Mono.Unix.Catalog.GetString("Play sound"), null, null);
this.PlaySoundAction.ShortLabel = Mono.Unix.Catalog.GetString("Play sound");
w3.Add(this.PlaySoundAction, null);
this.DumpMemoryAction = new Gtk.Action("DumpMemoryAction", Mono.Unix.Catalog.GetString("Dump memory..."), null, null);
this.DumpMemoryAction.ShortLabel = Mono.Unix.Catalog.GetString("Dump memory");
w3.Add(this.DumpMemoryAction, null);
this.DisconnectAction1 = new Gtk.Action("DisconnectAction1", Mono.Unix.Catalog.GetString("Disconnect"), null, null);
this.DisconnectAction1.ShortLabel = Mono.Unix.Catalog.GetString("Disconnect");
w3.Add(this.DisconnectAction1, null);
this.CalibrateAction = new Gtk.Action("CalibrateAction", Mono.Unix.Catalog.GetString("Calibrate..."), null, null);
this.CalibrateAction.ShortLabel = Mono.Unix.Catalog.GetString("Calibrate...");
w3.Add(this.CalibrateAction, null);
w2.InsertActionGroup(w3, 0);
this.Name = "LinuxGUITest.WiimoteInformation";
// Container child LinuxGUITest.WiimoteInformation.Gtk.Container+ContainerChild
this.vbox1 = new Gtk.VBox();
this.vbox1.Name = "vbox1";
this.vbox1.Spacing = 6;
// Container child vbox1.Gtk.Box+BoxChild
w2.AddUiFromString("<ui><menubar name='menubar1'><menu action='WiiMoteAction'><menuitem action='DisconnectAction1'/><menuitem action='DumpMemoryAction'/><menuitem action='CalibrateAction'/></menu></menubar></ui>");
this.menubar1 = ((Gtk.MenuBar)(w2.GetWidget("/menubar1")));
this.menubar1.Name = "menubar1";
this.vbox1.Add(this.menubar1);
Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox1[this.menubar1]));
w4.Position = 0;
w4.Expand = false;
w4.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
this.hbox5 = new Gtk.HBox();
this.hbox5.Name = "hbox5";
this.hbox5.Spacing = 6;
// Container child hbox5.Gtk.Box+BoxChild
this.lblReportingMode = new Gtk.Label();
this.lblReportingMode.Name = "lblReportingMode";
this.lblReportingMode.LabelProp = Mono.Unix.Catalog.GetString("Reporting Mode");
this.hbox5.Add(this.lblReportingMode);
Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.hbox5[this.lblReportingMode]));
w5.Position = 0;
w5.Expand = false;
w5.Fill = false;
// Container child hbox5.Gtk.Box+BoxChild
this.comboboxReportingMode = Gtk.ComboBox.NewText();
this.comboboxReportingMode.Name = "comboboxReportingMode";
this.hbox5.Add(this.comboboxReportingMode);
Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.hbox5[this.comboboxReportingMode]));
w6.Position = 1;
this.vbox1.Add(this.hbox5);
Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox5]));
w7.Position = 1;
w7.Expand = false;
w7.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
this.hbox4 = new Gtk.HBox();
this.hbox4.Name = "hbox4";
this.hbox4.Spacing = 6;
// Container child hbox4.Gtk.Box+BoxChild
this.lblButtons = new Gtk.Label();
this.lblButtons.Name = "lblButtons";
this.lblButtons.LabelProp = Mono.Unix.Catalog.GetString("Buttons");
this.hbox4.Add(this.lblButtons);
Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.hbox4[this.lblButtons]));
w8.Position = 0;
w8.Expand = false;
w8.Fill = false;
// Container child hbox4.Gtk.Box+BoxChild
this.entryButtons = new Gtk.Entry();
this.entryButtons.CanFocus = true;
this.entryButtons.Name = "entryButtons";
this.entryButtons.IsEditable = false;
this.entryButtons.InvisibleChar = '●';
this.hbox4.Add(this.entryButtons);
Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.hbox4[this.entryButtons]));
w9.Position = 1;
this.vbox1.Add(this.hbox4);
Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox4]));
w10.Position = 2;
w10.Expand = false;
w10.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
this.frame1 = new Gtk.Frame();
this.frame1.Name = "frame1";
this.frame1.ShadowType = ((Gtk.ShadowType)(0));
// Container child frame1.Gtk.Container+ContainerChild
this.GtkAlignment = new Gtk.Alignment(0F, 0F, 1F, 1F);
this.GtkAlignment.Name = "GtkAlignment";
this.GtkAlignment.LeftPadding = ((uint)(12));
//.........这里部分代码省略.........
示例3: Build
protected virtual void Build()
{
Stetic.Gui.Initialize(this);
// Widget LinuxGUITest.BalanceBoardInformation
Stetic.BinContainer w1 = Stetic.BinContainer.Attach(this);
Gtk.UIManager w2 = new Gtk.UIManager();
Gtk.ActionGroup w3 = new Gtk.ActionGroup("Default");
this.BalanceBoardAction = new Gtk.Action("BalanceBoardAction", Mono.Unix.Catalog.GetString("BalanceBoard"), null, null);
this.BalanceBoardAction.ShortLabel = Mono.Unix.Catalog.GetString("BalanceBoard");
w3.Add(this.BalanceBoardAction, null);
this.DisconnectAction = new Gtk.Action("DisconnectAction", Mono.Unix.Catalog.GetString("Disconnect"), null, null);
this.DisconnectAction.ShortLabel = Mono.Unix.Catalog.GetString("Disconnect");
w3.Add(this.DisconnectAction, null);
w2.InsertActionGroup(w3, 0);
this.Name = "LinuxGUITest.BalanceBoardInformation";
// Container child LinuxGUITest.BalanceBoardInformation.Gtk.Container+ContainerChild
this.vbox1 = new Gtk.VBox();
this.vbox1.Name = "vbox1";
this.vbox1.Spacing = 6;
// Container child vbox1.Gtk.Box+BoxChild
w2.AddUiFromString("<ui><menubar name='menubar1'><menu action='BalanceBoardAction'><menuitem action='DisconnectAction'/></menu></menubar></ui>");
this.menubar1 = ((Gtk.MenuBar)(w2.GetWidget("/menubar1")));
this.menubar1.Name = "menubar1";
this.vbox1.Add(this.menubar1);
Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox1[this.menubar1]));
w4.Position = 0;
w4.Expand = false;
w4.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
this.hseparator2 = new Gtk.HSeparator();
this.hseparator2.Name = "hseparator2";
this.vbox1.Add(this.hseparator2);
Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.vbox1[this.hseparator2]));
w5.Position = 1;
w5.Expand = false;
w5.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
this.hbox4 = new Gtk.HBox();
this.hbox4.Name = "hbox4";
this.hbox4.Spacing = 6;
// Container child hbox4.Gtk.Box+BoxChild
this.checkboxLed = new Gtk.CheckButton();
this.checkboxLed.CanFocus = true;
this.checkboxLed.Name = "checkboxLed";
this.checkboxLed.Label = Mono.Unix.Catalog.GetString("Led");
this.checkboxLed.DrawIndicator = true;
this.checkboxLed.UseUnderline = true;
this.hbox4.Add(this.checkboxLed);
Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.hbox4[this.checkboxLed]));
w6.Position = 0;
// Container child hbox4.Gtk.Box+BoxChild
this.lblButton = new Gtk.Label();
this.lblButton.Name = "lblButton";
this.lblButton.LabelProp = Mono.Unix.Catalog.GetString("Button");
this.hbox4.Add(this.lblButton);
Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.hbox4[this.lblButton]));
w7.Position = 1;
w7.Expand = false;
w7.Fill = false;
// Container child hbox4.Gtk.Box+BoxChild
this.entryButton = new Gtk.Entry();
this.entryButton.CanFocus = true;
this.entryButton.Name = "entryButton";
this.entryButton.IsEditable = false;
this.entryButton.InvisibleChar = '●';
this.hbox4.Add(this.entryButton);
Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.hbox4[this.entryButton]));
w8.Position = 2;
this.vbox1.Add(this.hbox4);
Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox4]));
w9.Position = 2;
w9.Expand = false;
w9.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
this.frame1 = new Gtk.Frame();
this.frame1.Name = "frame1";
this.frame1.ShadowType = ((Gtk.ShadowType)(0));
// Container child frame1.Gtk.Container+ContainerChild
this.GtkAlignment = new Gtk.Alignment(0F, 0F, 1F, 1F);
this.GtkAlignment.Name = "GtkAlignment";
this.GtkAlignment.LeftPadding = ((uint)(12));
// Container child GtkAlignment.Gtk.Container+ContainerChild
this.vbox3 = new Gtk.VBox();
this.vbox3.Name = "vbox3";
this.vbox3.Spacing = 6;
// Container child vbox3.Gtk.Box+BoxChild
this.table4 = new Gtk.Table(((uint)(2)), ((uint)(2)), false);
this.table4.Name = "table4";
this.table4.RowSpacing = ((uint)(6));
this.table4.ColumnSpacing = ((uint)(6));
// Container child table4.Gtk.Table+TableChild
this.entryBottomLeft = new Gtk.Entry();
this.entryBottomLeft.CanFocus = true;
this.entryBottomLeft.Name = "entryBottomLeft";
this.entryBottomLeft.IsEditable = false;
this.entryBottomLeft.InvisibleChar = '●';
this.table4.Add(this.entryBottomLeft);
Gtk.Table.TableChild w10 = ((Gtk.Table.TableChild)(this.table4[this.entryBottomLeft]));
w10.TopAttach = ((uint)(1));
w10.BottomAttach = ((uint)(2));
//.........这里部分代码省略.........
示例4: Build
//.........这里部分代码省略.........
w2.Add(w8, null);
Gtk.Action w9 = new Gtk.Action("Cut", "Cut", null, "gtk-cut");
w9.ShortLabel = "Cut";
bindings["Cut"] = w9;
w2.Add(w9, null);
Gtk.Action w10 = new Gtk.Action("Copy", "Copy", null, "gtk-copy");
w10.ShortLabel = "Copy";
bindings["Copy"] = w10;
w2.Add(w10, null);
Gtk.Action w11 = new Gtk.Action("Paste", "Paste", null, "gtk-paste");
w11.ShortLabel = "Paste";
bindings["Paste"] = w11;
w2.Add(w11, null);
Gtk.Action w12 = new Gtk.Action("Help", "Help", null, null);
w12.ShortLabel = "Help";
bindings["Help"] = w12;
w2.Add(w12, null);
Gtk.Action w13 = new Gtk.Action("About", "About", null, "gnome-stock-about");
w13.ShortLabel = "About";
bindings["About"] = w13;
w2.Add(w13, null);
Gtk.Action w14 = new Gtk.Action("ImportDictionary", "Import Dictionary", null, "gnome-stock-book-blue");
w14.ShortLabel = "Import Dictionary";
bindings["ImportDictionary"] = w14;
w2.Add(w14, null);
Gtk.Action w15 = new Gtk.Action("Preferences", "Preferences", null, "gtk-preferences");
w15.ShortLabel = "Preferences";
bindings["Preferences"] = w15;
w2.Add(w15, null);
Gtk.Action w16 = new Gtk.Action("Close", "Close", null, "gtk-close");
w16.ShortLabel = "Close";
bindings["Close"] = w16;
w2.Add(w16, null);
w1.InsertActionGroup(w2, 0);
cobj.AddAccelGroup(w1.AccelGroup);
cobj.Icon = Gtk.IconTheme.Default.LoadIcon("gtk-properties", 16, 0);
cobj.WindowPosition = ((Gtk.WindowPosition)(1));
cobj.DefaultWidth = 60;
cobj.Events = ((Gdk.EventMask)(0));
cobj.Name = "SharpTranslator.MainWindow";
// Container child SharpTranslator.MainWindow.Gtk.Container+ContainerChild
Gtk.VBox w17 = new Gtk.VBox();
w17.Events = ((Gdk.EventMask)(0));
w17.Name = "vbox1";
// Container child vbox1.Gtk.Box+BoxChild
w1.AddUiFromString("<ui><menubar name='menubar1'><menu action='File'><menuitem action='LearnWords'/><menuitem action='AddLanguage'/><menuitem action='ImportDictionary'/><menuitem action='Close'/></menu><menu action='Edit'><menuitem action='Cut'/><menuitem action='Copy'/><menuitem action='Paste'/><menuitem action='Preferences'/></menu><menu action='Help'><menuitem action='About'/></menu></menubar></ui>");
Gtk.MenuBar w18 = ((Gtk.MenuBar)(w1.GetWidget("/menubar1")));
w18.Events = ((Gdk.EventMask)(0));
w18.Name = "menubar1";
bindings["menubar1"] = w18;
w17.Add(w18);
Gtk.Box.BoxChild w19 = ((Gtk.Box.BoxChild)(w17[w18]));
w19.Position = 0;
w19.Expand = false;
w19.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
w1.AddUiFromString("<ui><toolbar name='toolbar1'><toolitem action='Learn'/></toolbar></ui>");
Gtk.Toolbar w20 = ((Gtk.Toolbar)(w1.GetWidget("/toolbar1")));
w20.ShowArrow = false;
w20.Tooltips = false;
w20.ToolbarStyle = ((Gtk.ToolbarStyle)(2));
w20.IconSize = ((Gtk.IconSize)(2));
w20.Events = ((Gdk.EventMask)(0));
w20.Name = "toolbar1";
bindings["toolbar1"] = w20;
w17.Add(w20);
示例5: Build
protected virtual void Build()
{
Stetic.Gui.Initialize(this);
// Widget MonoTwitts.Ui.MainWindow
Gtk.UIManager w1 = new Gtk.UIManager();
Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default");
this.MenuAction = new Gtk.Action("MenuAction", Mono.Unix.Catalog.GetString("Menu"), null, null);
this.MenuAction.ShortLabel = Mono.Unix.Catalog.GetString("Menu");
w2.Add(this.MenuAction, "<Control>m");
this.HelpAction = new Gtk.Action("HelpAction", Mono.Unix.Catalog.GetString("Help"), null, null);
this.HelpAction.ShortLabel = Mono.Unix.Catalog.GetString("Help");
w2.Add(this.HelpAction, "<Control>h");
this.AboutAction = new Gtk.Action("AboutAction", Mono.Unix.Catalog.GetString("About"), null, "gtk-about");
this.AboutAction.ShortLabel = Mono.Unix.Catalog.GetString("About");
w2.Add(this.AboutAction, null);
this.FriendsAction = new Gtk.RadioAction("FriendsAction", Mono.Unix.Catalog.GetString("Friends"), null, null, 0);
this.FriendsAction.Group = new GLib.SList(System.IntPtr.Zero);
this.FriendsAction.ShortLabel = Mono.Unix.Catalog.GetString("Friends");
w2.Add(this.FriendsAction, null);
this.PublicAction = new Gtk.RadioAction("PublicAction", Mono.Unix.Catalog.GetString("Public"), null, null, 0);
this.PublicAction.Group = this.FriendsAction.Group;
this.PublicAction.ShortLabel = Mono.Unix.Catalog.GetString("Public");
w2.Add(this.PublicAction, null);
this.DirectAction = new Gtk.RadioAction("DirectAction", Mono.Unix.Catalog.GetString("Direct"), null, null, 0);
this.DirectAction.Group = this.PublicAction.Group;
this.DirectAction.ShortLabel = Mono.Unix.Catalog.GetString("Direct");
w2.Add(this.DirectAction, null);
this.ResponsesAction = new Gtk.RadioAction("ResponsesAction", Mono.Unix.Catalog.GetString("@ Responses"), null, null, 0);
this.ResponsesAction.Group = this.PublicAction.Group;
this.ResponsesAction.ShortLabel = Mono.Unix.Catalog.GetString("@ Responses");
w2.Add(this.ResponsesAction, null);
this.PreferencesAction = new Gtk.Action("PreferencesAction", Mono.Unix.Catalog.GetString("Preferences"), null, "gtk-preferences");
this.PreferencesAction.ShortLabel = Mono.Unix.Catalog.GetString("Preferences");
w2.Add(this.PreferencesAction, null);
this.RefreshAction = new Gtk.Action("RefreshAction", Mono.Unix.Catalog.GetString("Refresh"), null, "gtk-refresh");
this.RefreshAction.ShortLabel = Mono.Unix.Catalog.GetString("Refresh");
w2.Add(this.RefreshAction, null);
this.QuitAction = new Gtk.Action("QuitAction", Mono.Unix.Catalog.GetString("Quit"), null, "gtk-quit");
this.QuitAction.ShortLabel = Mono.Unix.Catalog.GetString("Quit");
w2.Add(this.QuitAction, null);
w1.InsertActionGroup(w2, 0);
this.AddAccelGroup(w1.AccelGroup);
this.Name = "MonoTwitts.Ui.MainWindow";
this.Title = Mono.Unix.Catalog.GetString("Mono Twitt");
this.WindowPosition = ((Gtk.WindowPosition)(4));
// Container child MonoTwitts.Ui.MainWindow.Gtk.Container+ContainerChild
this.vbox1 = new Gtk.VBox();
this.vbox1.Name = "vbox1";
this.vbox1.Spacing = 6;
// Container child vbox1.Gtk.Box+BoxChild
w1.AddUiFromString("<ui><menubar name='menubar'><menu action='MenuAction'><menuitem action='RefreshAction'/><separator/><menuitem action='FriendsAction'/><menuitem action='PublicAction'/><menuitem action='DirectAction'/><menuitem action='ResponsesAction'/><separator/><menuitem action='PreferencesAction'/><separator/><menuitem action='QuitAction'/></menu><menu action='HelpAction'><menuitem action='AboutAction'/></menu></menubar></ui>");
this.menubar = ((Gtk.MenuBar)(w1.GetWidget("/menubar")));
this.menubar.Name = "menubar";
this.vbox1.Add(this.menubar);
Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox1[this.menubar]));
w3.Position = 0;
w3.Expand = false;
w3.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
this.scrolledwindow = new Gtk.ScrolledWindow();
this.scrolledwindow.CanFocus = true;
this.scrolledwindow.Name = "scrolledwindow";
this.scrolledwindow.ShadowType = ((Gtk.ShadowType)(4));
this.scrolledwindow.BorderWidth = ((uint)(5));
this.vbox1.Add(this.scrolledwindow);
Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox1[this.scrolledwindow]));
w4.Position = 1;
this.Add(this.vbox1);
if ((this.Child != null)) {
this.Child.ShowAll();
}
this.DefaultWidth = 413;
this.DefaultHeight = 455;
this.Show();
this.DeleteEvent += new Gtk.DeleteEventHandler(this.OnDeleteEvent);
this.AboutAction.Activated += new System.EventHandler(this.OnAboutActionActivated);
this.RefreshAction.Activated += new System.EventHandler(this.OnRefreshActionActivated);
}
示例6: Build
protected virtual void Build()
{
Stetic.Gui.Initialize();
// Widget OpenGridServices.Manager.MainWindow
Gtk.UIManager w1 = new Gtk.UIManager();
Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default");
this.Grid = new Gtk.Action("Grid", Mono.Unix.Catalog.GetString("Grid"), null, null);
this.Grid.HideIfEmpty = false;
this.Grid.ShortLabel = Mono.Unix.Catalog.GetString("Grid");
w2.Add(this.Grid, "<Alt><Mod2>g");
this.User = new Gtk.Action("User", Mono.Unix.Catalog.GetString("User"), null, null);
this.User.HideIfEmpty = false;
this.User.ShortLabel = Mono.Unix.Catalog.GetString("User");
w2.Add(this.User, null);
this.Asset = new Gtk.Action("Asset", Mono.Unix.Catalog.GetString("Asset"), null, null);
this.Asset.HideIfEmpty = false;
this.Asset.ShortLabel = Mono.Unix.Catalog.GetString("Asset");
w2.Add(this.Asset, null);
this.Region = new Gtk.Action("Region", Mono.Unix.Catalog.GetString("Region"), null, null);
this.Region.ShortLabel = Mono.Unix.Catalog.GetString("Region");
w2.Add(this.Region, null);
this.Services = new Gtk.Action("Services", Mono.Unix.Catalog.GetString("Services"), null, null);
this.Services.ShortLabel = Mono.Unix.Catalog.GetString("Services");
w2.Add(this.Services, null);
this.ConnectToGridserver = new Gtk.Action("ConnectToGridserver", Mono.Unix.Catalog.GetString("Connect to gridserver..."), null, "gtk-connect");
this.ConnectToGridserver.HideIfEmpty = false;
this.ConnectToGridserver.ShortLabel = Mono.Unix.Catalog.GetString("Connect to gridserver");
w2.Add(this.ConnectToGridserver, null);
this.RestartWholeGrid = new Gtk.Action("RestartWholeGrid", Mono.Unix.Catalog.GetString("Restart whole grid"), null, "gtk-refresh");
this.RestartWholeGrid.ShortLabel = Mono.Unix.Catalog.GetString("Restart whole grid");
w2.Add(this.RestartWholeGrid, null);
this.ShutdownWholeGrid = new Gtk.Action("ShutdownWholeGrid", Mono.Unix.Catalog.GetString("Shutdown whole grid"), null, "gtk-stop");
this.ShutdownWholeGrid.ShortLabel = Mono.Unix.Catalog.GetString("Shutdown whole grid");
w2.Add(this.ShutdownWholeGrid, null);
this.ExitGridManager = new Gtk.Action("ExitGridManager", Mono.Unix.Catalog.GetString("Exit grid manager"), null, "gtk-close");
this.ExitGridManager.ShortLabel = Mono.Unix.Catalog.GetString("Exit grid manager");
w2.Add(this.ExitGridManager, null);
this.ConnectToUserserver = new Gtk.Action("ConnectToUserserver", Mono.Unix.Catalog.GetString("Connect to userserver"), null, "gtk-connect");
this.ConnectToUserserver.ShortLabel = Mono.Unix.Catalog.GetString("Connect to userserver");
w2.Add(this.ConnectToUserserver, null);
this.AccountManagment = new Gtk.Action("AccountManagment", Mono.Unix.Catalog.GetString("Account managment"), null, "gtk-properties");
this.AccountManagment.ShortLabel = Mono.Unix.Catalog.GetString("Account managment");
w2.Add(this.AccountManagment, null);
this.GlobalNotice = new Gtk.Action("GlobalNotice", Mono.Unix.Catalog.GetString("Global notice"), null, "gtk-network");
this.GlobalNotice.ShortLabel = Mono.Unix.Catalog.GetString("Global notice");
w2.Add(this.GlobalNotice, null);
this.DisableAllLogins = new Gtk.Action("DisableAllLogins", Mono.Unix.Catalog.GetString("Disable all logins"), null, "gtk-no");
this.DisableAllLogins.ShortLabel = Mono.Unix.Catalog.GetString("Disable all logins");
w2.Add(this.DisableAllLogins, null);
this.DisableNonGodUsersOnly = new Gtk.Action("DisableNonGodUsersOnly", Mono.Unix.Catalog.GetString("Disable non-god users only"), null, "gtk-no");
this.DisableNonGodUsersOnly.ShortLabel = Mono.Unix.Catalog.GetString("Disable non-god users only");
w2.Add(this.DisableNonGodUsersOnly, null);
this.ShutdownUserServer = new Gtk.Action("ShutdownUserServer", Mono.Unix.Catalog.GetString("Shutdown user server"), null, "gtk-stop");
this.ShutdownUserServer.ShortLabel = Mono.Unix.Catalog.GetString("Shutdown user server");
w2.Add(this.ShutdownUserServer, null);
this.ShutdownGridserverOnly = new Gtk.Action("ShutdownGridserverOnly", Mono.Unix.Catalog.GetString("Shutdown gridserver only"), null, "gtk-stop");
this.ShutdownGridserverOnly.ShortLabel = Mono.Unix.Catalog.GetString("Shutdown gridserver only");
w2.Add(this.ShutdownGridserverOnly, null);
this.RestartGridserverOnly = new Gtk.Action("RestartGridserverOnly", Mono.Unix.Catalog.GetString("Restart gridserver only"), null, "gtk-refresh");
this.RestartGridserverOnly.ShortLabel = Mono.Unix.Catalog.GetString("Restart gridserver only");
w2.Add(this.RestartGridserverOnly, null);
this.DefaultLocalGridUserserver = new Gtk.Action("DefaultLocalGridUserserver", Mono.Unix.Catalog.GetString("Default local grid userserver"), null, null);
this.DefaultLocalGridUserserver.ShortLabel = Mono.Unix.Catalog.GetString("Default local grid userserver");
w2.Add(this.DefaultLocalGridUserserver, null);
this.CustomUserserver = new Gtk.Action("CustomUserserver", Mono.Unix.Catalog.GetString("Custom userserver..."), null, null);
this.CustomUserserver.ShortLabel = Mono.Unix.Catalog.GetString("Custom userserver");
w2.Add(this.CustomUserserver, null);
this.RemoteGridDefaultUserserver = new Gtk.Action("RemoteGridDefaultUserserver", Mono.Unix.Catalog.GetString("Remote grid default userserver..."), null, null);
this.RemoteGridDefaultUserserver.ShortLabel = Mono.Unix.Catalog.GetString("Remote grid default userserver");
w2.Add(this.RemoteGridDefaultUserserver, null);
this.DisconnectFromGridServer = new Gtk.Action("DisconnectFromGridServer", Mono.Unix.Catalog.GetString("Disconnect from grid server"), null, "gtk-disconnect");
this.DisconnectFromGridServer.ShortLabel = Mono.Unix.Catalog.GetString("Disconnect from grid server");
this.DisconnectFromGridServer.Visible = false;
w2.Add(this.DisconnectFromGridServer, null);
this.UploadAsset = new Gtk.Action("UploadAsset", Mono.Unix.Catalog.GetString("Upload asset"), null, null);
this.UploadAsset.ShortLabel = Mono.Unix.Catalog.GetString("Upload asset");
w2.Add(this.UploadAsset, null);
this.AssetManagement = new Gtk.Action("AssetManagement", Mono.Unix.Catalog.GetString("Asset management"), null, null);
this.AssetManagement.ShortLabel = Mono.Unix.Catalog.GetString("Asset management");
w2.Add(this.AssetManagement, null);
this.ConnectToAssetServer = new Gtk.Action("ConnectToAssetServer", Mono.Unix.Catalog.GetString("Connect to asset server"), null, null);
this.ConnectToAssetServer.ShortLabel = Mono.Unix.Catalog.GetString("Connect to asset server");
w2.Add(this.ConnectToAssetServer, null);
this.ConnectToDefaultAssetServerForGrid = new Gtk.Action("ConnectToDefaultAssetServerForGrid", Mono.Unix.Catalog.GetString("Connect to default asset server for grid"), null, null);
this.ConnectToDefaultAssetServerForGrid.ShortLabel = Mono.Unix.Catalog.GetString("Connect to default asset server for grid");
w2.Add(this.ConnectToDefaultAssetServerForGrid, null);
this.DefaultForLocalGrid = new Gtk.Action("DefaultForLocalGrid", Mono.Unix.Catalog.GetString("Default for local grid"), null, null);
this.DefaultForLocalGrid.ShortLabel = Mono.Unix.Catalog.GetString("Default for local grid");
w2.Add(this.DefaultForLocalGrid, null);
this.DefaultForRemoteGrid = new Gtk.Action("DefaultForRemoteGrid", Mono.Unix.Catalog.GetString("Default for remote grid..."), null, null);
this.DefaultForRemoteGrid.ShortLabel = Mono.Unix.Catalog.GetString("Default for remote grid...");
w2.Add(this.DefaultForRemoteGrid, null);
this.CustomAssetServer = new Gtk.Action("CustomAssetServer", Mono.Unix.Catalog.GetString("Custom asset server..."), null, null);
this.CustomAssetServer.ShortLabel = Mono.Unix.Catalog.GetString("Custom asset server...");
w2.Add(this.CustomAssetServer, null);
w1.InsertActionGroup(w2, 0);
this.AddAccelGroup(w1.AccelGroup);
this.WidthRequest = 800;
this.HeightRequest = 600;
this.Name = "OpenGridServices.Manager.MainWindow";
//.........这里部分代码省略.........
示例7: Build
public static void Build(object obj, string id)
{
System.Collections.Hashtable bindings = new System.Collections.Hashtable();
if ((id == "igaeditorgtk.MainForm")) {
Gtk.Window cobj = ((Gtk.Window)(obj));
// Widget igaeditorgtk.MainForm
cobj.Title = "IGA Ad Cache Editor (GTK) by micolous";
Gtk.UIManager w1 = new Gtk.UIManager();
Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default");
Gtk.Action w3 = new Gtk.Action("Application", "_Application", null, null);
w3.ShortLabel = "_Application";
bindings["Application"] = w3;
w2.Add(w3, null);
Gtk.Action w4 = new Gtk.Action("ImportAdpack", "_Import Adpack", null, null);
w4.ShortLabel = "_Import Adpack";
bindings["ImportAdpack"] = w4;
w2.Add(w4, null);
Gtk.Action w5 = new Gtk.Action("ExportAdpack", "_Export Adpack", null, null);
w5.ShortLabel = "_Export Adpack";
bindings["ExportAdpack"] = w5;
w2.Add(w5, null);
Gtk.Action w6 = new Gtk.Action("", "-", null, null);
w6.ShortLabel = "-";
bindings[""] = w6;
w2.Add(w6, null);
Gtk.Action w7 = new Gtk.Action("Reload", "_Reload", null, "gtk-refresh");
w7.ShortLabel = "_Reload";
bindings["Reload"] = w7;
w2.Add(w7, null);
Gtk.Action w8 = new Gtk.Action("VaccumShrinkDatabase", "_Vaccum/Shrink Database", null, null);
w8.ShortLabel = "_Vaccum/Shrink Database";
bindings["VaccumShrinkDatabase"] = w8;
w2.Add(w8, null);
Gtk.Action w9 = new Gtk.Action("CloseDatabase", "_Close Database", null, "gtk-close");
w9.ShortLabel = "_Close Database";
bindings["CloseDatabase"] = w9;
w2.Add(w9, null);
Gtk.Action w10 = new Gtk.Action("Exit", "E_xit", null, "gtk-quit");
w10.ShortLabel = "E_xit";
bindings["Exit"] = w10;
w2.Add(w10, null);
Gtk.Action w11 = new Gtk.Action("Debug", "_Debug", null, null);
w11.ShortLabel = "_Debug";
bindings["Debug"] = w11;
w2.Add(w11, null);
Gtk.Action w12 = new Gtk.Action("Help", "_Help", null, null);
w12.ShortLabel = "_Help";
bindings["Help"] = w12;
w2.Add(w12, null);
Gtk.Action w13 = new Gtk.Action("About", "_About", null, "gtk-about");
w13.ShortLabel = "_About";
bindings["About"] = w13;
w2.Add(w13, null);
Gtk.Action w14 = new Gtk.Action("ExecuteSQL", "_Execute SQL", null, null);
w14.ShortLabel = "_Execute SQL";
bindings["ExecuteSQL"] = w14;
w2.Add(w14, null);
w1.InsertActionGroup(w2, 0);
cobj.AddAccelGroup(w1.AccelGroup);
cobj.WindowPosition = ((Gtk.WindowPosition)(4));
cobj.Events = ((Gdk.EventMask)(0));
cobj.Name = "igaeditorgtk.MainForm";
// Container child igaeditorgtk.MainForm.Gtk.Container+ContainerChild
Gtk.VBox w15 = new Gtk.VBox();
w15.Events = ((Gdk.EventMask)(0));
w15.Name = "vbox1";
// Container child vbox1.Gtk.Box+BoxChild
w1.AddUiFromString("<ui><menubar name='menubar1'><menu action='Application'><menuitem action='ImportAdpack'/><menuitem action='ExportAdpack'/><separator/><menuitem action='Reload'/><menuitem action='VaccumShrinkDatabase'/><menuitem action='CloseDatabase'/><separator/><menuitem action='Exit'/></menu><menu action='Debug'><menuitem action='ExecuteSQL'/></menu><menu action='Help'><menuitem action='About'/><separator/></menu></menubar></ui>");
Gtk.MenuBar w16 = ((Gtk.MenuBar)(w1.GetWidget("/menubar1")));
w16.Events = ((Gdk.EventMask)(0));
w16.Name = "menubar1";
bindings["menubar1"] = w16;
w15.Add(w16);
Gtk.Box.BoxChild w17 = ((Gtk.Box.BoxChild)(w15[w16]));
w17.Position = 0;
w17.Expand = false;
w17.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
Gtk.Frame w18 = new Gtk.Frame();
w18.ShadowType = ((Gtk.ShadowType)(0));
w18.LabelXalign = 0F;
w18.Events = ((Gdk.EventMask)(0));
w18.Name = "frame1";
// Container child frame1.Gtk.Container+ContainerChild
Gtk.Alignment w19 = new Gtk.Alignment(0F, 0F, 1F, 1F);
w19.LeftPadding = ((uint)(12));
w19.Events = ((Gdk.EventMask)(0));
w19.Name = "GtkAlignment6";
// Container child GtkAlignment6.Gtk.Container+ContainerChild
Gtk.ScrolledWindow w20 = new Gtk.ScrolledWindow();
w20.VscrollbarPolicy = ((Gtk.PolicyType)(1));
w20.HscrollbarPolicy = ((Gtk.PolicyType)(2));
w20.CanFocus = true;
w20.Events = ((Gdk.EventMask)(0));
w20.Name = "scrolledwindow1";
// Container child scrolledwindow1.Gtk.Container+ContainerChild
Gtk.TreeView w21 = new Gtk.TreeView();
w21.EnableSearch = false;
w21.CanFocus = true;
w21.Events = ((Gdk.EventMask)(0));
//.........这里部分代码省略.........
示例8: Build
public static void Build(object obj, string id)
{
System.Collections.Hashtable bindings = new System.Collections.Hashtable();
if ((id == "MainWindow")) {
Gtk.Window cobj = ((Gtk.Window)(obj));
// Widget MainWindow
cobj.Title = "GNFOViewer";
Gtk.UIManager w1 = new Gtk.UIManager();
Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default");
Gtk.Action w3 = new Gtk.Action("File", "_File", null, null);
w3.ShortLabel = "_File";
bindings["File"] = w3;
w2.Add(w3, "<Alt>f");
Gtk.Action w4 = new Gtk.Action("Tools", "_Tools", null, null);
w4.ShortLabel = "_Tools";
bindings["Tools"] = w4;
w2.Add(w4, "<Alt>t");
Gtk.Action w5 = new Gtk.Action("Open", "Open", null, "gtk-open");
w5.ShortLabel = "Open";
bindings["Open"] = w5;
w2.Add(w5, "<Control>o");
Gtk.Action w6 = new Gtk.Action("Quit", "Quit", null, "gtk-quit");
w6.ShortLabel = "Quit";
bindings["Quit"] = w6;
w2.Add(w6, "<Control>q");
Gtk.Action w7 = new Gtk.Action("Invert", "Invert", null, "gtk-refresh");
w7.ShortLabel = "Invert";
bindings["Invert"] = w7;
w2.Add(w7, "<Control>i");
w1.InsertActionGroup(w2, 0);
cobj.AddAccelGroup(w1.AccelGroup);
cobj.Icon = Gtk.IconTheme.Default.LoadIcon("stock_smiley-26", 16, 0);
cobj.WindowPosition = ((Gtk.WindowPosition)(3));
cobj.DefaultWidth = 640;
cobj.DefaultHeight = 480;
cobj.Events = ((Gdk.EventMask)(0));
cobj.Name = "MainWindow";
// Container child MainWindow.Gtk.Container+ContainerChild
Gtk.VBox w8 = new Gtk.VBox();
w8.Events = ((Gdk.EventMask)(0));
w8.Name = "vbox1";
// Container child vbox1.Gtk.Box+BoxChild
w1.AddUiFromString("<ui><menubar name='menubar1'><menu action='File'><menuitem action='Open'/><menuitem action='Quit'/></menu><menu action='Tools'><menuitem action='Invert'/></menu></menubar></ui>");
Gtk.MenuBar w9 = ((Gtk.MenuBar)(w1.GetWidget("/menubar1")));
w9.Events = ((Gdk.EventMask)(0));
w9.Name = "menubar1";
bindings["menubar1"] = w9;
w8.Add(w9);
Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(w8[w9]));
w10.Position = 0;
w10.Expand = false;
w10.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
Gtk.ScrolledWindow w11 = new Gtk.ScrolledWindow();
w11.VscrollbarPolicy = ((Gtk.PolicyType)(1));
w11.HscrollbarPolicy = ((Gtk.PolicyType)(1));
w11.CanFocus = true;
w11.Events = ((Gdk.EventMask)(0));
w11.Name = "scrolledwindow1";
// Container child scrolledwindow1.Gtk.Container+ContainerChild
Gtk.TextView w12 = new Gtk.TextView();
w12.CursorVisible = false;
w12.Editable = false;
w12.CanFocus = true;
w12.Events = ((Gdk.EventMask)(0));
w12.Name = "textview1";
bindings["textview1"] = w12;
w11.Add(w12);
bindings["scrolledwindow1"] = w11;
w8.Add(w11);
Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(w8[w11]));
w14.Position = 1;
bindings["vbox1"] = w8;
cobj.Add(w8);
bindings["MainWindow"] = cobj;
w9.Show();
w12.Show();
w11.Show();
w8.Show();
cobj.Show();
cobj.DeleteEvent += ((Gtk.DeleteEventHandler)(System.Delegate.CreateDelegate(typeof(Gtk.DeleteEventHandler), cobj, "OnDeleteEvent")));
w5.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnOpenActivated")));
w6.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnQuitActivated")));
w7.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnInvertActivated")));
}
System.Reflection.FieldInfo[] fields = obj.GetType().GetFields(((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic) | System.Reflection.BindingFlags.Instance));
for (int n = 0; (n < fields.Length); n = (n + 1)) {
System.Reflection.FieldInfo field = fields[n];
object widget = bindings[field.Name];
if (((widget != null) && field.FieldType.IsInstanceOfType(widget))) {
field.SetValue(obj, widget);
}
}
}
示例9: Build
protected virtual void Build() {
Stetic.Gui.Initialize(this);
// Widget mapping.frmSimulation
Gtk.UIManager w1 = new Gtk.UIManager();
Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default");
this.File = new Gtk.Action("File", Mono.Unix.Catalog.GetString("File"), null, null);
this.File.ShortLabel = Mono.Unix.Catalog.GetString("File");
w2.Add(this.File, null);
this.Close = new Gtk.Action("Close", Mono.Unix.Catalog.GetString("Close"), null, null);
this.Close.ShortLabel = Mono.Unix.Catalog.GetString("Close");
w2.Add(this.Close, null);
w1.InsertActionGroup(w2, 0);
this.AddAccelGroup(w1.AccelGroup);
this.Name = "mapping.frmSimulation";
this.Title = Mono.Unix.Catalog.GetString("Simulation");
this.WindowPosition = ((Gtk.WindowPosition)(4));
// Container child mapping.frmSimulation.Gtk.Container+ContainerChild
this.vbox1 = new Gtk.VBox();
this.vbox1.Name = "vbox1";
this.vbox1.Spacing = 6;
// Container child vbox1.Gtk.Box+BoxChild
w1.AddUiFromString("<ui><menubar name='menubar1'><menu action='File'><menuitem action='Close'/></menu></menubar></ui>");
this.menubar1 = ((Gtk.MenuBar)(w1.GetWidget("/menubar1")));
this.menubar1.Name = "menubar1";
this.vbox1.Add(this.menubar1);
Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox1[this.menubar1]));
w3.Position = 0;
w3.Expand = false;
w3.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
this.hbox1 = new Gtk.HBox();
this.hbox1.Name = "hbox1";
this.hbox1.Spacing = 6;
// Container child hbox1.Gtk.Box+BoxChild
this.vbox2 = new Gtk.VBox();
this.vbox2.Name = "vbox2";
this.vbox2.Spacing = 6;
// Container child vbox2.Gtk.Box+BoxChild
this.hbox2 = new Gtk.HBox();
this.hbox2.Name = "hbox2";
this.hbox2.Spacing = 6;
// Container child hbox2.Gtk.Box+BoxChild
this.vbox3 = new Gtk.VBox();
this.vbox3.Name = "vbox3";
this.vbox3.Spacing = 6;
// Container child vbox3.Gtk.Box+BoxChild
this.cmdReset = new Gtk.Button();
this.cmdReset.CanFocus = true;
this.cmdReset.Name = "cmdReset";
this.cmdReset.UseUnderline = true;
this.cmdReset.Label = Mono.Unix.Catalog.GetString("Reset");
this.vbox3.Add(this.cmdReset);
Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox3[this.cmdReset]));
w4.Position = 0;
w4.Expand = false;
w4.Fill = false;
// Container child vbox3.Gtk.Box+BoxChild
this.cmdRun = new Gtk.Button();
this.cmdRun.CanFocus = true;
this.cmdRun.Name = "cmdRun";
this.cmdRun.UseUnderline = true;
this.cmdRun.Label = Mono.Unix.Catalog.GetString("Run");
this.vbox3.Add(this.cmdRun);
Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.vbox3[this.cmdRun]));
w5.Position = 1;
w5.Expand = false;
w5.Fill = false;
// Container child vbox3.Gtk.Box+BoxChild
this.cmdOptimise = new Gtk.Button();
this.cmdOptimise.CanFocus = true;
this.cmdOptimise.Name = "cmdOptimise";
this.cmdOptimise.UseUnderline = true;
this.cmdOptimise.Label = Mono.Unix.Catalog.GetString("Optimise");
this.vbox3.Add(this.cmdOptimise);
Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.vbox3[this.cmdOptimise]));
w6.Position = 2;
w6.Expand = false;
w6.Fill = false;
this.hbox2.Add(this.vbox3);
Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.hbox2[this.vbox3]));
w7.Position = 0;
w7.Expand = false;
w7.Fill = false;
// Container child hbox2.Gtk.Box+BoxChild
this.vbox4 = new Gtk.VBox();
this.vbox4.Name = "vbox4";
this.vbox4.Spacing = 6;
// Container child vbox4.Gtk.Box+BoxChild
this.cmdStep = new Gtk.Button();
this.cmdStep.CanFocus = true;
this.cmdStep.Name = "cmdStep";
this.cmdStep.UseUnderline = true;
this.cmdStep.Label = Mono.Unix.Catalog.GetString("Step");
this.vbox4.Add(this.cmdStep);
Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.vbox4[this.cmdStep]));
w8.Position = 0;
w8.Expand = false;
w8.Fill = false;
// Container child vbox4.Gtk.Box+BoxChild
this.cmdStop = new Gtk.Button();
//.........这里部分代码省略.........
示例10: Build
protected virtual void Build()
{
Stetic.Gui.Initialize(this);
// Widget Embroidr.UI.MainWindow
Gtk.UIManager w1 = new Gtk.UIManager();
Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default");
this.FileAction = new Gtk.Action("FileAction", Mono.Unix.Catalog.GetString("File"), null, null);
this.FileAction.ShortLabel = Mono.Unix.Catalog.GetString("File");
w2.Add(this.FileAction, null);
this.findAction = new Gtk.Action("findAction", null, null, "gtk-find");
w2.Add(this.findAction, null);
this.FindAction = new Gtk.Action("FindAction", Mono.Unix.Catalog.GetString("Find"), null, null);
this.FindAction.ShortLabel = Mono.Unix.Catalog.GetString("Find");
w2.Add(this.FindAction, null);
this.saveAction = new Gtk.Action("saveAction", null, null, "gtk-save");
w2.Add(this.saveAction, null);
w1.InsertActionGroup(w2, 0);
this.AddAccelGroup(w1.AccelGroup);
this.Name = "Embroidr.UI.MainWindow";
this.Title = Mono.Unix.Catalog.GetString("Embroidr");
this.Icon = Stetic.IconLoader.LoadIcon(this, "stock_insert_special_character", Gtk.IconSize.Menu, 16);
this.WindowPosition = ((Gtk.WindowPosition)(2));
// Container child Embroidr.UI.MainWindow.Gtk.Container+ContainerChild
this.vbox1 = new Gtk.VBox();
this.vbox1.Name = "vbox1";
// Container child vbox1.Gtk.Box+BoxChild
w1.AddUiFromString("<ui><menubar name='menubar2'><menu action='FileAction'><menuitem action='FindAction'/></menu></menubar></ui>");
this.menubar2 = ((Gtk.MenuBar)(w1.GetWidget("/menubar2")));
this.menubar2.Name = "menubar2";
this.vbox1.Add(this.menubar2);
Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox1[this.menubar2]));
w3.Position = 0;
w3.Expand = false;
w3.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
w1.AddUiFromString("<ui><toolbar name='toolbar3'><toolitem action='findAction'/><toolitem action='saveAction'/></toolbar></ui>");
this.toolbar3 = ((Gtk.Toolbar)(w1.GetWidget("/toolbar3")));
this.toolbar3.Name = "toolbar3";
this.toolbar3.ShowArrow = false;
this.toolbar3.ToolbarStyle = ((Gtk.ToolbarStyle)(0));
this.vbox1.Add(this.toolbar3);
Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox1[this.toolbar3]));
w4.Position = 1;
w4.Expand = false;
w4.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
this.hpaned2 = new Gtk.HPaned();
this.hpaned2.CanFocus = true;
this.hpaned2.Name = "hpaned2";
this.hpaned2.Position = 160;
// Container child hpaned2.Gtk.Paned+PanedChild
this.vbox2 = new Gtk.VBox();
this.vbox2.Name = "vbox2";
this.vbox2.Spacing = 6;
// Container child vbox2.Gtk.Box+BoxChild
this.GtkScrolledWindow1 = new Gtk.ScrolledWindow();
this.GtkScrolledWindow1.Name = "GtkScrolledWindow1";
this.GtkScrolledWindow1.ShadowType = ((Gtk.ShadowType)(1));
// Container child GtkScrolledWindow1.Gtk.Container+ContainerChild
this.pesTree = new Gtk.TreeView();
this.pesTree.CanFocus = true;
this.pesTree.Name = "pesTree";
this.pesTree.HeadersClickable = true;
this.GtkScrolledWindow1.Add(this.pesTree);
this.vbox2.Add(this.GtkScrolledWindow1);
Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.vbox2[this.GtkScrolledWindow1]));
w6.Position = 0;
this.hpaned2.Add(this.vbox2);
Gtk.Paned.PanedChild w7 = ((Gtk.Paned.PanedChild)(this.hpaned2[this.vbox2]));
w7.Resize = false;
// Container child hpaned2.Gtk.Paned+PanedChild
this.GtkScrolledWindow = new Gtk.ScrolledWindow();
this.GtkScrolledWindow.Name = "GtkScrolledWindow";
this.GtkScrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
// Container child GtkScrolledWindow.Gtk.Container+ContainerChild
this.pesView = new Gtk.NodeView();
this.pesView.CanFocus = true;
this.pesView.Name = "pesView";
this.pesView.HeadersClickable = true;
this.GtkScrolledWindow.Add(this.pesView);
this.hpaned2.Add(this.GtkScrolledWindow);
this.vbox1.Add(this.hpaned2);
Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.vbox1[this.hpaned2]));
w10.Position = 2;
// Container child vbox1.Gtk.Box+BoxChild
this.pixbufSize = new Gtk.HScale(null);
this.pixbufSize.CanFocus = true;
this.pixbufSize.Name = "pixbufSize";
this.pixbufSize.Adjustment.Lower = 16;
this.pixbufSize.Adjustment.Upper = 255;
this.pixbufSize.Adjustment.PageIncrement = 10;
this.pixbufSize.Adjustment.StepIncrement = 1;
this.pixbufSize.Adjustment.Value = 90;
this.pixbufSize.DrawValue = true;
this.pixbufSize.Digits = 0;
this.pixbufSize.ValuePos = ((Gtk.PositionType)(2));
this.vbox1.Add(this.pixbufSize);
Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(this.vbox1[this.pixbufSize]));
w11.Position = 3;
w11.Expand = false;
//.........这里部分代码省略.........
示例11: Build
protected virtual void Build() {
Stetic.Gui.Initialize();
// Widget Monodoc.Editor.EditorWindow
Gtk.UIManager w1 = new Gtk.UIManager();
Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default");
this.File = new Gtk.Action("File", Mono.Unix.Catalog.GetString("_File"), null, null);
this.File.ShortLabel = Mono.Unix.Catalog.GetString("_File");
w2.Add(this.File, null);
this.Quit = new Gtk.Action("Quit", Mono.Unix.Catalog.GetString("_Quit"), null, "gtk-quit");
this.Quit.ShortLabel = Mono.Unix.Catalog.GetString("_Quit");
w2.Add(this.Quit, null);
this.Open = new Gtk.Action("Open", Mono.Unix.Catalog.GetString("_Open"), Mono.Unix.Catalog.GetString("Open file"), "gtk-open");
this.Open.ShortLabel = Mono.Unix.Catalog.GetString("_Open");
w2.Add(this.Open, null);
this.Save = new Gtk.Action("Save", Mono.Unix.Catalog.GetString("_Save"), Mono.Unix.Catalog.GetString("Save file"), "gtk-save");
this.Save.Sensitive = false;
this.Save.ShortLabel = Mono.Unix.Catalog.GetString("_Save");
w2.Add(this.Save, null);
this.SaveAs = new Gtk.Action("SaveAs", Mono.Unix.Catalog.GetString("Save _As"), null, "gtk-save-as");
this.SaveAs.Sensitive = false;
this.SaveAs.ShortLabel = Mono.Unix.Catalog.GetString("Save _As");
w2.Add(this.SaveAs, null);
this.CloseFile = new Gtk.Action("CloseFile", Mono.Unix.Catalog.GetString("_Close File"), null, "gtk-close");
this.CloseFile.ShortLabel = Mono.Unix.Catalog.GetString("_Close File");
w2.Add(this.CloseFile, null);
this.Edit = new Gtk.Action("Edit", Mono.Unix.Catalog.GetString("_Edit"), null, null);
this.Edit.ShortLabel = Mono.Unix.Catalog.GetString("_Edit");
w2.Add(this.Edit, null);
this.Cut = new Gtk.Action("Cut", Mono.Unix.Catalog.GetString("Cu_t"), null, "gtk-cut");
this.Cut.Sensitive = false;
this.Cut.ShortLabel = Mono.Unix.Catalog.GetString("Cu_t");
w2.Add(this.Cut, null);
this.Copy = new Gtk.Action("Copy", Mono.Unix.Catalog.GetString("_Copy"), Mono.Unix.Catalog.GetString("Copy selection"), "gtk-copy");
this.Copy.ShortLabel = Mono.Unix.Catalog.GetString("_Copy");
w2.Add(this.Copy, null);
this.Paste = new Gtk.Action("Paste", Mono.Unix.Catalog.GetString("_Paste"), null, "gtk-paste");
this.Paste.Sensitive = false;
this.Paste.ShortLabel = Mono.Unix.Catalog.GetString("_Paste");
w2.Add(this.Paste, null);
this.Help = new Gtk.Action("Help", Mono.Unix.Catalog.GetString("_Help"), null, null);
this.Help.ShortLabel = Mono.Unix.Catalog.GetString("_Help");
w2.Add(this.Help, null);
this.About = new Gtk.Action("About", Mono.Unix.Catalog.GetString("_About"), null, "gtk-about");
this.About.ShortLabel = Mono.Unix.Catalog.GetString("_About");
w2.Add(this.About, null);
this.Undo = new Gtk.Action("Undo", Mono.Unix.Catalog.GetString("_Undo"), Mono.Unix.Catalog.GetString("Undo last action"), "gtk-undo");
this.Undo.Sensitive = false;
this.Undo.ShortLabel = Mono.Unix.Catalog.GetString("_Undo");
w2.Add(this.Undo, "<Control>z");
this.Redo = new Gtk.Action("Redo", Mono.Unix.Catalog.GetString("_Redo"), Mono.Unix.Catalog.GetString("Redo last undone action"), "gtk-redo");
this.Redo.Sensitive = false;
this.Redo.ShortLabel = Mono.Unix.Catalog.GetString("_Redo");
w2.Add(this.Redo, "<Control>x");
w1.InsertActionGroup(w2, 0);
this.AddAccelGroup(w1.AccelGroup);
this.Name = "Monodoc.Editor.EditorWindow";
this.Title = Mono.Unix.Catalog.GetString("Monodoc Documentation Editor");
this.Icon = Gdk.Pixbuf.LoadFromResource("monodoc.png");
this.WindowPosition = ((Gtk.WindowPosition)(1));
// Container child Monodoc.Editor.EditorWindow.Gtk.Container+ContainerChild
this.vbox1 = new Gtk.VBox();
this.vbox1.Name = "vbox1";
// Container child vbox1.Gtk.Box+BoxChild
w1.AddUiFromString("<ui><menubar name='menubar1'><menu action='File'><menuitem action='Open'/><separator/><menuitem action='Save'/><menuitem action='SaveAs'/><separator/><menuitem action='CloseFile'/><separator/><menuitem action='Quit'/></menu><menu action='Edit'><menuitem action='Undo'/><menuitem action='Redo'/><separator/><menuitem action='Cut'/><menuitem action='Copy'/><menuitem action='Paste'/></menu><menu action='Help'><menuitem action='About'/></menu></menubar></ui>");
this.menubar1 = ((Gtk.MenuBar)(w1.GetWidget("/menubar1")));
this.menubar1.Name = "menubar1";
this.vbox1.Add(this.menubar1);
Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox1[this.menubar1]));
w3.Position = 0;
w3.Expand = false;
w3.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
w1.AddUiFromString("<ui><toolbar name='toolbar1'><toolitem action='Open'/><toolitem action='Save'/><separator/><toolitem action='Undo'/><toolitem action='Redo'/><separator/><toolitem action='Cut'/><toolitem action='Copy'/><toolitem action='Paste'/></toolbar></ui>");
this.toolbar1 = ((Gtk.Toolbar)(w1.GetWidget("/toolbar1")));
this.toolbar1.Name = "toolbar1";
this.toolbar1.ShowArrow = false;
this.toolbar1.ToolbarStyle = ((Gtk.ToolbarStyle)(0));
this.vbox1.Add(this.toolbar1);
Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox1[this.toolbar1]));
w4.Position = 1;
w4.Expand = false;
w4.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
this.edit_container = new Gtk.VBox();
this.edit_container.Name = "edit_container";
this.edit_container.Spacing = 6;
this.vbox1.Add(this.edit_container);
Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.vbox1[this.edit_container]));
w5.Position = 2;
// Container child vbox1.Gtk.Box+BoxChild
this.status_bar = new Gtk.Statusbar();
this.status_bar.Name = "status_bar";
this.status_bar.Spacing = 6;
this.status_bar.HasResizeGrip = false;
// Container child status_bar.Gtk.Box+BoxChild
this.progress_bar = new Gtk.ProgressBar();
this.progress_bar.Name = "progress_bar";
this.status_bar.Add(this.progress_bar);
Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.status_bar[this.progress_bar]));
w6.Position = 1;
//.........这里部分代码省略.........
示例12: Build
//.........这里部分代码省略.........
w2.Add(w4, null);
Gtk.ToggleAction w5 = new Gtk.ToggleAction("PauseSimulation", "Pause simulation", null, "gtk-media-pause");
w5.ShortLabel = "Pause simulation";
bindings["PauseSimulation"] = w5;
w2.Add(w5, null);
Gtk.Action w6 = new Gtk.Action("StopSimulation", "Stop simulation", null, "gtk-media-stop");
w6.ShortLabel = "Stop simulation";
bindings["StopSimulation"] = w6;
w2.Add(w6, null);
Gtk.Action w7 = new Gtk.Action("Exit", "Exit", null, "gtk-close");
w7.ShortLabel = "Exit";
bindings["Exit"] = w7;
w2.Add(w7, null);
Gtk.Action w8 = new Gtk.Action("Configuration", "Configuration", null, null);
w8.ShortLabel = "Configuration";
bindings["Configuration"] = w8;
w2.Add(w8, null);
Gtk.Action w9 = new Gtk.Action("IntroVariables", "Intro variables", null, "gtk-properties");
w9.ShortLabel = "Intro variables";
bindings["IntroVariables"] = w9;
w2.Add(w9, null);
Gtk.Action w10 = new Gtk.Action("Help", "Help", null, null);
w10.ShortLabel = "Help";
bindings["Help"] = w10;
w2.Add(w10, null);
Gtk.Action w11 = new Gtk.Action("Help1", "Help", null, "gtk-help");
w11.ShortLabel = "Help";
bindings["Help1"] = w11;
w2.Add(w11, null);
Gtk.Action w12 = new Gtk.Action("AboutAuthors", "About Authors", null, "gtk-info");
w12.ShortLabel = "About Authors";
bindings["AboutAuthors"] = w12;
w2.Add(w12, null);
w1.InsertActionGroup(w2, 0);
cobj.AddAccelGroup(w1.AccelGroup);
cobj.Icon = Gtk.IconTheme.Default.LoadIcon("stock_internet", 16, 0);
cobj.WindowPosition = ((Gtk.WindowPosition)(4));
cobj.Events = ((Gdk.EventMask)(0));
cobj.Name = "sink.sinkgtk";
// Container child sink.sinkgtk.Gtk.Container+ContainerChild
Gtk.VBox w13 = new Gtk.VBox();
w13.Events = ((Gdk.EventMask)(0));
w13.Name = "vbox1";
// Container child vbox1.Gtk.Box+BoxChild
w1.AddUiFromString("<ui><menubar name='menubar1'><menu action='Simulation'><menuitem action='NewSimulation'/><menuitem action='PauseSimulation'/><menuitem action='StopSimulation'/><menuitem action='Exit'/></menu><menu action='Configuration'><menuitem action='IntroVariables'/></menu><menu action='Help'><menuitem action='Help1'/><menuitem action='AboutAuthors'/></menu></menubar></ui>");
Gtk.MenuBar w14 = ((Gtk.MenuBar)(w1.GetWidget("/menubar1")));
w14.Events = ((Gdk.EventMask)(0));
w14.Name = "menubar1";
bindings["menubar1"] = w14;
w13.Add(w14);
Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(w13[w14]));
w15.Position = 0;
w15.Expand = false;
w15.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
Gtk.Statusbar w16 = new Gtk.Statusbar();
w16.Events = ((Gdk.EventMask)(0));
w16.Name = "statusbar1";
bindings["statusbar1"] = w16;
w13.Add(w16);
Gtk.Box.BoxChild w17 = ((Gtk.Box.BoxChild)(w13[w16]));
w17.Position = 1;
w17.Expand = false;
w17.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
Gtk.DrawingArea w18 = new Gtk.DrawingArea();
示例13: Build
protected virtual void Build()
{
Stetic.Gui.Initialize();
// Widget MainWindow
Gtk.UIManager w1 = new Gtk.UIManager();
Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default");
this.File = new Gtk.Action("File", Mono.Unix.Catalog.GetString("File"), null, null);
this.File.ShortLabel = Mono.Unix.Catalog.GetString("File");
w2.Add(this.File, null);
this.Open = new Gtk.Action("Open", Mono.Unix.Catalog.GetString("Open"), null, null);
this.Open.ShortLabel = Mono.Unix.Catalog.GetString("Open");
w2.Add(this.Open, null);
this.SaveAs = new Gtk.Action("SaveAs", Mono.Unix.Catalog.GetString("Save As"), null, null);
this.SaveAs.ShortLabel = Mono.Unix.Catalog.GetString("Save As");
w2.Add(this.SaveAs, null);
this.Exit = new Gtk.Action("Exit", Mono.Unix.Catalog.GetString("Exit"), null, null);
this.Exit.ShortLabel = Mono.Unix.Catalog.GetString("Exit");
w2.Add(this.Exit, null);
w1.InsertActionGroup(w2, 0);
Gtk.ActionGroup w3 = new Gtk.ActionGroup("New Action Group");
w1.InsertActionGroup(w3, 1);
this.AddAccelGroup(w1.AccelGroup);
this.Name = "MainWindow";
this.Title = Mono.Unix.Catalog.GetString("Persona");
this.WindowPosition = ((Gtk.WindowPosition)(4));
// Container child MainWindow.Gtk.Container+ContainerChild
this.vbox1 = new Gtk.VBox();
this.vbox1.Name = "vbox1";
this.vbox1.Spacing = 6;
// Container child vbox1.Gtk.Box+BoxChild
w1.AddUiFromString("<ui><menubar name='menubar1'><menu action='File'><menuitem action='Open'/><menuitem action='SaveAs'/><menuitem action='Exit'/></menu></menubar></ui>");
this.menubar1 = ((Gtk.MenuBar)(w1.GetWidget("/menubar1")));
this.menubar1.Name = "menubar1";
this.vbox1.Add(this.menubar1);
Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox1[this.menubar1]));
w4.Position = 0;
w4.Expand = false;
w4.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
this.hbox1 = new Gtk.HBox();
this.hbox1.Name = "hbox1";
this.hbox1.Spacing = 6;
// Container child hbox1.Gtk.Box+BoxChild
this.txtEntry = new Gtk.Entry();
this.txtEntry.CanFocus = true;
this.txtEntry.Name = "txtEntry";
this.txtEntry.IsEditable = true;
this.txtEntry.InvisibleChar = '●';
this.hbox1.Add(this.txtEntry);
Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.hbox1[this.txtEntry]));
w5.Position = 0;
// Container child hbox1.Gtk.Box+BoxChild
this.cmdEntry = new Gtk.Button();
this.cmdEntry.CanFocus = true;
this.cmdEntry.Name = "cmdEntry";
this.cmdEntry.UseUnderline = true;
this.cmdEntry.Label = Mono.Unix.Catalog.GetString("OK");
this.hbox1.Add(this.cmdEntry);
Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.hbox1[this.cmdEntry]));
w6.Position = 1;
w6.Expand = false;
w6.Fill = false;
this.vbox1.Add(this.hbox1);
Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox1]));
w7.Position = 1;
w7.Expand = false;
w7.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
this.txtConversation = new Gtk.TextView();
this.txtConversation.CanFocus = true;
this.txtConversation.Name = "txtConversation";
this.vbox1.Add(this.txtConversation);
Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.vbox1[this.txtConversation]));
w8.Position = 2;
this.Add(this.vbox1);
if ((this.Child != null)) {
this.Child.ShowAll();
}
this.DefaultWidth = 632;
this.DefaultHeight = 524;
this.Show();
this.DeleteEvent += new Gtk.DeleteEventHandler(this.OnDeleteEvent);
this.cmdEntry.Clicked += new System.EventHandler(this.OnCmdEntryClicked);
}
示例14: Build
protected virtual void Build()
{
Stetic.Gui.Initialize(this);
// Widget gadpime.ClientNewWindow
Gtk.UIManager w1 = new Gtk.UIManager();
Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default");
this.FicheroAction = new Gtk.Action("FicheroAction", Mono.Unix.Catalog.GetString("Fichero"), null, null);
this.FicheroAction.ShortLabel = Mono.Unix.Catalog.GetString("Fichero");
w2.Add(this.FicheroAction, null);
this.GuardarAction = new Gtk.Action("GuardarAction", Mono.Unix.Catalog.GetString("Guardar"), null, "gtk-save");
this.GuardarAction.ShortLabel = Mono.Unix.Catalog.GetString("Guardar");
w2.Add(this.GuardarAction, null);
this.CerrarAction = new Gtk.Action("CerrarAction", Mono.Unix.Catalog.GetString("Cerrar"), null, "gtk-stop");
this.CerrarAction.ShortLabel = Mono.Unix.Catalog.GetString("Cerrar");
w2.Add(this.CerrarAction, null);
w1.InsertActionGroup(w2, 0);
this.AddAccelGroup(w1.AccelGroup);
this.Name = "gadpime.ClientNewWindow";
this.Title = Mono.Unix.Catalog.GetString("Client");
this.WindowPosition = ((Gtk.WindowPosition)(2));
// Container child gadpime.ClientNewWindow.Gtk.Container+ContainerChild
this.vbox2 = new Gtk.VBox();
this.vbox2.Name = "vbox2";
this.vbox2.Spacing = 6;
// Container child vbox2.Gtk.Box+BoxChild
w1.AddUiFromString("<ui><menubar name='menubar1'><menu action='FicheroAction'><menuitem action='GuardarAction'/><menuitem action='CerrarAction'/></menu></menubar></ui>");
this.menubar1 = ((Gtk.MenuBar)(w1.GetWidget("/menubar1")));
this.menubar1.Name = "menubar1";
this.vbox2.Add(this.menubar1);
Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox2[this.menubar1]));
w3.Position = 0;
w3.Expand = false;
w3.Fill = false;
// Container child vbox2.Gtk.Box+BoxChild
this.table1 = new Gtk.Table(((uint)(3)), ((uint)(2)), false);
this.table1.Name = "table1";
this.table1.RowSpacing = ((uint)(6));
this.table1.ColumnSpacing = ((uint)(6));
// Container child table1.Gtk.Table+TableChild
this.EntryClientName = new Gtk.Entry();
this.EntryClientName.CanFocus = true;
this.EntryClientName.Name = "EntryClientName";
this.EntryClientName.IsEditable = true;
this.EntryClientName.InvisibleChar = '●';
this.table1.Add(this.EntryClientName);
Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.table1[this.EntryClientName]));
w4.LeftAttach = ((uint)(1));
w4.RightAttach = ((uint)(2));
w4.YOptions = ((Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild
this.EntryClientSurname1 = new Gtk.Entry();
this.EntryClientSurname1.CanFocus = true;
this.EntryClientSurname1.Name = "EntryClientSurname1";
this.EntryClientSurname1.IsEditable = true;
this.EntryClientSurname1.InvisibleChar = '●';
this.table1.Add(this.EntryClientSurname1);
Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(this.table1[this.EntryClientSurname1]));
w5.TopAttach = ((uint)(1));
w5.BottomAttach = ((uint)(2));
w5.LeftAttach = ((uint)(1));
w5.RightAttach = ((uint)(2));
w5.YOptions = ((Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild
this.EntryClientSurname2 = new Gtk.Entry();
this.EntryClientSurname2.CanFocus = true;
this.EntryClientSurname2.Name = "EntryClientSurname2";
this.EntryClientSurname2.IsEditable = true;
this.EntryClientSurname2.InvisibleChar = '●';
this.table1.Add(this.EntryClientSurname2);
Gtk.Table.TableChild w6 = ((Gtk.Table.TableChild)(this.table1[this.EntryClientSurname2]));
w6.TopAttach = ((uint)(2));
w6.BottomAttach = ((uint)(3));
w6.LeftAttach = ((uint)(1));
w6.RightAttach = ((uint)(2));
w6.YOptions = ((Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild
this.LabelClientName = new Gtk.Label();
this.LabelClientName.Name = "LabelClientName";
this.LabelClientName.LabelProp = Mono.Unix.Catalog.GetString("Nom");
this.table1.Add(this.LabelClientName);
Gtk.Table.TableChild w7 = ((Gtk.Table.TableChild)(this.table1[this.LabelClientName]));
w7.XOptions = ((Gtk.AttachOptions)(4));
w7.YOptions = ((Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild
this.LabelClientSurname1 = new Gtk.Label();
this.LabelClientSurname1.Name = "LabelClientSurname1";
this.LabelClientSurname1.LabelProp = Mono.Unix.Catalog.GetString("Cognom1");
this.table1.Add(this.LabelClientSurname1);
Gtk.Table.TableChild w8 = ((Gtk.Table.TableChild)(this.table1[this.LabelClientSurname1]));
w8.TopAttach = ((uint)(1));
w8.BottomAttach = ((uint)(2));
w8.XOptions = ((Gtk.AttachOptions)(4));
w8.YOptions = ((Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild
this.LabelClientSurname2 = new Gtk.Label();
this.LabelClientSurname2.Name = "LabelClientSurname2";
this.LabelClientSurname2.LabelProp = Mono.Unix.Catalog.GetString("Cognom2");
this.table1.Add(this.LabelClientSurname2);
Gtk.Table.TableChild w9 = ((Gtk.Table.TableChild)(this.table1[this.LabelClientSurname2]));
w9.TopAttach = ((uint)(2));
//.........这里部分代码省略.........
示例15: Build
protected virtual void Build() {
Stetic.Gui.Initialize(this);
// Widget MainWindow
Gtk.UIManager w1 = new Gtk.UIManager();
Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default");
this.File = new Gtk.Action("File", Mono.Unix.Catalog.GetString("File"), null, null);
this.File.ShortLabel = Mono.Unix.Catalog.GetString("File");
w2.Add(this.File, null);
this.Exit = new Gtk.Action("Exit", Mono.Unix.Catalog.GetString("Exit"), null, null);
this.Exit.ShortLabel = Mono.Unix.Catalog.GetString("Exit");
w2.Add(this.Exit, null);
this.Run = new Gtk.Action("Run", Mono.Unix.Catalog.GetString("Run"), null, null);
this.Run.ShortLabel = Mono.Unix.Catalog.GetString("Run");
w2.Add(this.Run, null);
this.MotionModel = new Gtk.Action("MotionModel", Mono.Unix.Catalog.GetString("Motion Model"), null, null);
this.MotionModel.ShortLabel = Mono.Unix.Catalog.GetString("Motion Model");
w2.Add(this.MotionModel, null);
this.SingleStereoRayModel = new Gtk.Action("SingleStereoRayModel", Mono.Unix.Catalog.GetString("Single Stereo Ray Model"), null, null);
this.SingleStereoRayModel.ShortLabel = Mono.Unix.Catalog.GetString("Single Stereo Ray Model");
w2.Add(this.SingleStereoRayModel, null);
this.StereoRaysAtVariousRanges = new Gtk.Action("StereoRaysAtVariousRanges", Mono.Unix.Catalog.GetString("Stereo Rays at various ranges"), null, null);
this.StereoRaysAtVariousRanges.ShortLabel = Mono.Unix.Catalog.GetString("Stereo Rays at various ranges");
w2.Add(this.StereoRaysAtVariousRanges, null);
this.GaussianFunction = new Gtk.Action("GaussianFunction", Mono.Unix.Catalog.GetString("Gaussian Function"), null, null);
this.GaussianFunction.ShortLabel = Mono.Unix.Catalog.GetString("Gaussian Function");
w2.Add(this.GaussianFunction, null);
this.SensorModelLookupGraphs = new Gtk.Action("SensorModelLookupGraphs", Mono.Unix.Catalog.GetString("Sensor Model lookup graphs"), null, null);
this.SensorModelLookupGraphs.ShortLabel = Mono.Unix.Catalog.GetString("Sensor Model lookup graphs");
w2.Add(this.SensorModelLookupGraphs, null);
this.PathPlanner = new Gtk.Action("PathPlanner", Mono.Unix.Catalog.GetString("Path Planner"), null, null);
this.PathPlanner.ShortLabel = Mono.Unix.Catalog.GetString("Path Planner");
w2.Add(this.PathPlanner, null);
w1.InsertActionGroup(w2, 0);
this.AddAccelGroup(w1.AccelGroup);
this.Name = "MainWindow";
this.Title = Mono.Unix.Catalog.GetString("Sentience test programs");
this.WindowPosition = ((Gtk.WindowPosition)(4));
// Container child MainWindow.Gtk.Container+ContainerChild
this.vbox1 = new Gtk.VBox();
this.vbox1.Name = "vbox1";
this.vbox1.Spacing = 6;
// Container child vbox1.Gtk.Box+BoxChild
w1.AddUiFromString("<ui><menubar name='menubar1'><menu action='File'><menuitem action='Exit'/></menu><menu action='Run'><menuitem action='MotionModel'/><menuitem action='SingleStereoRayModel'/><menuitem action='StereoRaysAtVariousRanges'/><menuitem action='GaussianFunction'/><menuitem action='SensorModelLookupGraphs'/><menuitem action='PathPlanner'/></menu></menubar></ui>");
this.menubar1 = ((Gtk.MenuBar)(w1.GetWidget("/menubar1")));
this.menubar1.Name = "menubar1";
this.vbox1.Add(this.menubar1);
Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox1[this.menubar1]));
w3.Position = 0;
w3.Expand = false;
w3.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild
this.imgOutput = new Gtk.Image();
this.imgOutput.Name = "imgOutput";
this.vbox1.Add(this.imgOutput);
Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox1[this.imgOutput]));
w4.Position = 1;
w4.Expand = false;
w4.Fill = false;
this.Add(this.vbox1);
if ((this.Child != null)) {
this.Child.ShowAll();
}
this.DefaultWidth = 622;
this.DefaultHeight = 485;
this.Show();
this.DeleteEvent += new Gtk.DeleteEventHandler(this.OnDeleteEvent);
this.MotionModel.Activated += new System.EventHandler(this.OnMotionModelActivated);
this.SingleStereoRayModel.Activated += new System.EventHandler(this.OnSingleStereoRayModelActivated);
this.StereoRaysAtVariousRanges.Activated += new System.EventHandler(this.OnStereoRaysAtVariousRangesActivated);
this.GaussianFunction.Activated += new System.EventHandler(this.OnGaussianFunctionActivated);
this.SensorModelLookupGraphs.Activated += new System.EventHandler(this.OnSensorModelLookupGraphsActivated);
this.PathPlanner.Activated += new System.EventHandler(this.OnPathPlannerActivated);
}