public static void Build(object obj, string id) { System.Collections.Hashtable bindings = new System.Collections.Hashtable(); if ((id == "LabCardCreator.EraseDialog")) { Gtk.Dialog cobj = ((Gtk.Dialog)(obj)); // Widget LabCardCreator.EraseDialog cobj.Title = "Erase card..."; cobj.WindowPosition = ((Gtk.WindowPosition)(4)); cobj.HasSeparator = false; cobj.Events = ((Gdk.EventMask)(256)); cobj.Name = "LabCardCreator.EraseDialog"; cobj.HasDefault = true; cobj.CanDefault = true; // Internal child LabCardCreator.EraseDialog.VBox Gtk.VBox w1 = cobj.VBox; w1.BorderWidth = ((uint)(2)); w1.Events = ((Gdk.EventMask)(256)); w1.Name = "dialog_VBox"; // Container child dialog_VBox.Gtk.Box+BoxChild Gtk.VBox w2 = new Gtk.VBox(); w2.Events = ((Gdk.EventMask)(0)); w2.Name = "vbox1"; // Container child vbox1.Gtk.Box+BoxChild Gtk.HBox w3 = new Gtk.HBox(); w3.Events = ((Gdk.EventMask)(0)); w3.Name = "hbox1"; // Container child hbox1.Gtk.Box+BoxChild Gtk.Image w4 = new Gtk.Image(); w4.Pixbuf = Gtk.IconTheme.Default.LoadIcon("gtk-dialog-warning", 48, 0); w4.Events = ((Gdk.EventMask)(0)); w4.Name = "image3"; w4.WidthRequest = 70; bindings["image3"] = w4; w3.Add(w4); Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(w3[w4])); w5.Position = 0; w5.Expand = false; w5.Fill = false; // Container child hbox1.Gtk.Box+BoxChild Gtk.Label w6 = new Gtk.Label(); w6.LabelProp = "<b>Delete card content and format as Labor Card?</b>"; w6.UseMarkup = true; w6.Justify = ((Gtk.Justification)(2)); w6.Events = ((Gdk.EventMask)(0)); w6.Name = "MsgLabel"; bindings["MsgLabel"] = w6; w3.Add(w6); Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(w3[w6])); w7.Position = 1; w7.Padding = ((uint)(10)); bindings["hbox1"] = w3; w2.Add(w3); Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(w2[w3])); w8.Position = 0; w8.Expand = false; w8.Padding = ((uint)(10)); // Container child vbox1.Gtk.Box+BoxChild Gtk.Expander w9 = new Gtk.Expander(null); Gtk.Tooltips w10 = new Gtk.Tooltips(); w10.SetTip(w9, "Show hexdump of card content", "Show hexdump of card content"); w9.CanFocus = true; w9.Events = ((Gdk.EventMask)(0)); w9.Name = "ContentExpander"; // Container child ContentExpander.Gtk.Container+ContainerChild Gtk.TextView w11 = new Gtk.TextView(); w11.CursorVisible = false; w11.Editable = false; w11.AcceptsTab = false; w11.CanFocus = true; w11.Events = ((Gdk.EventMask)(0)); w11.Name = "ContentView"; bindings["ContentView"] = w11; w9.Add(w11); Gtk.Label w13 = new Gtk.Label(); w13.LabelProp = "Show detailed card content"; w13.UseUnderline = true; w13.Events = ((Gdk.EventMask)(0)); w13.Name = "GtkLabel"; bindings["GtkLabel"] = w13; w9.LabelWidget = w13; bindings["ContentExpander"] = w9; w2.Add(w9); Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(w2[w9])); w14.Position = 1; bindings["vbox1"] = w2; w1.Add(w2); Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(w1[w2])); w15.Position = 0; bindings["dialog_VBox"] = w1; // Internal child LabCardCreator.EraseDialog.ActionArea Gtk.HButtonBox w16 = cobj.ActionArea; w16.LayoutStyle = ((Gtk.ButtonBoxStyle)(4)); w16.Spacing = 6; w16.BorderWidth = ((uint)(5)); w16.Events = ((Gdk.EventMask)(256)); w16.Name = "LabCardCreator.EraseDialog_ActionArea"; // Container child LabCardCreator.EraseDialog_ActionArea.Gtk.ButtonBox+ButtonBoxChild Gtk.Button w17 = new Gtk.Button(); w17.UseStock = true; w17.UseUnderline = true; w17.CanFocus = true; w17.Events = ((Gdk.EventMask)(0)); w17.Name = "CancelButton"; w17.HasDefault = true; w17.CanDefault = true; w17.Label = "gtk-cancel"; bindings["CancelButton"] = w17; cobj.AddActionWidget(w17, -2); Gtk.ButtonBox.ButtonBoxChild w18 = ((Gtk.ButtonBox.ButtonBoxChild)(w16[w17])); w18.Expand = false; w18.Fill = false; // Container child LabCardCreator.EraseDialog_ActionArea.Gtk.ButtonBox+ButtonBoxChild Gtk.Button w19 = new Gtk.Button(); w19.UseStock = true; w19.UseUnderline = true; w19.CanFocus = true; w19.Events = ((Gdk.EventMask)(0)); w19.Name = "DeleteButton"; w19.CanDefault = true; w19.Label = "gtk-delete"; bindings["DeleteButton"] = w19; cobj.AddActionWidget(w19, -3); Gtk.ButtonBox.ButtonBoxChild w20 = ((Gtk.ButtonBox.ButtonBoxChild)(w16[w19])); w20.Position = 1; w20.Expand = false; w20.Fill = false; bindings["LabCardCreator.EraseDialog_ActionArea"] = w16; cobj.DefaultWidth = 458; cobj.DefaultHeight = 161; bindings["LabCardCreator.EraseDialog"] = cobj; w4.Show(); w6.Show(); w3.Show(); w11.Show(); w13.Show(); w9.Show(); w2.Show(); w1.Show(); w17.Show(); w19.Show(); w16.Show(); cobj.Show(); w9.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnExpander"))); } else { if ((id == "LabCardCreator.MainWindow")) { Gtk.Window cobj = ((Gtk.Window)(obj)); // Widget LabCardCreator.MainWindow cobj.Title = "Labor Card Creator"; Gtk.UIManager w1 = new Gtk.UIManager(); Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default"); Gtk.Action w3 = new Gtk.Action("CardCreator", "_CardCreator", null, null); w3.ShortLabel = "_CardCreator"; bindings["CardCreator"] = w3; w2.Add(w3, null); Gtk.Action w4 = new Gtk.Action("Help", "_Help", null, null); w4.ShortLabel = "_Help"; bindings["Help"] = w4; w2.Add(w4, null); Gtk.Action w5 = new Gtk.Action("Quit", "Quit", null, "gtk-quit"); w5.ShortLabel = "Quit"; bindings["Quit"] = w5; w2.Add(w5, null); Gtk.Action w6 = new Gtk.Action("About", "_About...", null, "gtk-about"); w6.ShortLabel = "_About"; bindings["About"] = w6; w2.Add(w6, null); Gtk.Action w7 = new Gtk.Action("ConnectCardTerminal", "Connect Card Terminal...", null, "gtk-connect"); w7.ShortLabel = "Connect Card Terminal"; bindings["ConnectCardTerminal"] = w7; w2.Add(w7, null); Gtk.Action w8 = new Gtk.Action("DisconnectCardTerminal", "Disconnect Card Terminal", null, "gtk-disconnect"); w8.ShortLabel = "Disconnect Card Terminal"; w8.Sensitive = false; bindings["DisconnectCardTerminal"] = w8; w2.Add(w8, null); Gtk.Action w9 = new Gtk.Action("ViewHexdump", "View _Hexdump...", null, "gtk-justify-fill"); w9.ShortLabel = "View _Hexdump"; bindings["ViewHexdump"] = w9; w2.Add(w9, null); Gtk.Action w10 = new Gtk.Action("EraseCard", "Erase Card...", null, "gtk-clear"); w10.ShortLabel = "Erase Card..."; bindings["EraseCard"] = w10; w2.Add(w10, null); Gtk.Action w11 = new Gtk.Action("", "------------------", null, null); w11.ShortLabel = "------------------"; bindings[""] = w11; w2.Add(w11, null); w1.InsertActionGroup(w2, 0); cobj.AddAccelGroup(w1.AccelGroup); cobj.Icon = Gdk.Pixbuf.LoadFromResource("Labor.png"); cobj.WindowPosition = ((Gtk.WindowPosition)(4)); cobj.Events = ((Gdk.EventMask)(0)); cobj.Name = "LabCardCreator.MainWindow"; // Container child LabCardCreator.MainWindow.Gtk.Container+ContainerChild Gtk.VBox w12 = new Gtk.VBox(); w12.Events = ((Gdk.EventMask)(0)); w12.Name = "vbox1"; // Container child vbox1.Gtk.Box+BoxChild w1.AddUiFromString("<ui><menubar name='menubar1'><menu action='CardCreator'><menuitem action='ConnectCardTerminal'/><menuitem action='DisconnectCardTerminal'/><menuitem action='ViewHexdump'/><menuitem action='EraseCard'/><menuitem action='Quit'/><menuitem/></menu><menu action='Help'><menuitem action='About'/></menu></menubar></ui>"); Gtk.MenuBar w13 = ((Gtk.MenuBar)(w1.GetWidget("/menubar1"))); w13.Events = ((Gdk.EventMask)(0)); w13.Name = "menubar1"; bindings["menubar1"] = w13; w12.Add(w13); Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(w12[w13])); w14.Position = 0; w14.Expand = false; w14.Fill = false; // Container child vbox1.Gtk.Box+BoxChild Gtk.Table w15 = new Gtk.Table(((uint)(4)), ((uint)(2)), false); w15.RowSpacing = ((uint)(6)); w15.ColumnSpacing = ((uint)(10)); w15.BorderWidth = ((uint)(6)); w15.Events = ((Gdk.EventMask)(0)); w15.Name = "table2"; // Container child table2.Gtk.Table+TableChild Gtk.Entry w16 = new Gtk.Entry(); Gtk.Tooltips w17 = new Gtk.Tooltips(); w17.SetTip(w16, "Internal Card Number", "Internal Card Number"); w16.Text = "2342"; w16.IsEditable = false; w16.InvisibleChar = '●'; w16.CanFocus = true; w16.Events = ((Gdk.EventMask)(0)); w16.Name = "numberEntry"; w16.Sensitive = false; bindings["numberEntry"] = w16; w15.Add(w16); Gtk.Table.TableChild w18 = ((Gtk.Table.TableChild)(w15[w16])); w18.BottomAttach = ((uint)(3)); w18.LeftAttach = ((uint)(1)); w18.RightAttach = ((uint)(2)); w18.TopAttach = ((uint)(2)); w18.YOptions = ((Gtk.AttachOptions)(4)); w18.XOptions = ((Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild Gtk.Entry w19 = new Gtk.Entry(); w19.IsEditable = true; w19.InvisibleChar = '●'; w19.CanFocus = true; w19.Events = ((Gdk.EventMask)(0)); w19.Name = "nameEntry"; w19.Sensitive = false; bindings["nameEntry"] = w19; w15.Add(w19); Gtk.Table.TableChild w20 = ((Gtk.Table.TableChild)(w15[w19])); w20.BottomAttach = ((uint)(2)); w20.LeftAttach = ((uint)(1)); w20.RightAttach = ((uint)(2)); w20.TopAttach = ((uint)(1)); w20.YOptions = ((Gtk.AttachOptions)(4)); w20.XOptions = ((Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild Gtk.Entry w21 = new Gtk.Entry(); w21.IsEditable = true; w21.WidthChars = 7; w21.MaxLength = 7; w21.InvisibleChar = '●'; w21.CanFocus = true; w21.Events = ((Gdk.EventMask)(0)); w21.Name = "nickEntry"; w21.Sensitive = false; bindings["nickEntry"] = w21; w15.Add(w21); Gtk.Table.TableChild w22 = ((Gtk.Table.TableChild)(w15[w21])); w22.LeftAttach = ((uint)(1)); w22.RightAttach = ((uint)(2)); w22.YOptions = ((Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild Gtk.Label w23 = new Gtk.Label(); w23.LabelProp = "Card Number:"; w23.UseUnderline = true; w23.Xalign = 1F; w23.Events = ((Gdk.EventMask)(0)); w23.Name = "label3"; bindings["label3"] = w23; w15.Add(w23); Gtk.Table.TableChild w24 = ((Gtk.Table.TableChild)(w15[w23])); w24.BottomAttach = ((uint)(3)); w24.TopAttach = ((uint)(2)); w24.YOptions = ((Gtk.AttachOptions)(4)); w24.XOptions = ((Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild Gtk.Label w25 = new Gtk.Label(); w25.LabelProp = "Real N_ame:"; w25.UseUnderline = true; w25.Xalign = 1F; w25.Events = ((Gdk.EventMask)(0)); w25.Name = "label2"; bindings["label2"] = w25; w15.Add(w25); Gtk.Table.TableChild w26 = ((Gtk.Table.TableChild)(w15[w25])); w26.BottomAttach = ((uint)(2)); w26.TopAttach = ((uint)(1)); w26.YOptions = ((Gtk.AttachOptions)(4)); w26.XOptions = ((Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild Gtk.Label w27 = new Gtk.Label(); w27.LabelProp = "_Nick:"; w27.UseUnderline = true; w27.Xalign = 1F; w27.Events = ((Gdk.EventMask)(0)); w27.Name = "label4"; bindings["label4"] = w27; w15.Add(w27); Gtk.Table.TableChild w28 = ((Gtk.Table.TableChild)(w15[w27])); w28.YOptions = ((Gtk.AttachOptions)(4)); w28.XOptions = ((Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild Gtk.Label w29 = new Gtk.Label(); w29.LabelProp = "Permissions:"; w29.UseUnderline = true; w29.Xalign = 1F; w29.Events = ((Gdk.EventMask)(0)); w29.Name = "label1"; bindings["label1"] = w29; w15.Add(w29); Gtk.Table.TableChild w30 = ((Gtk.Table.TableChild)(w15[w29])); w30.BottomAttach = ((uint)(4)); w30.TopAttach = ((uint)(3)); w30.YOptions = ((Gtk.AttachOptions)(4)); w30.XOptions = ((Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild Gtk.HBox w31 = new Gtk.HBox(); w31.Events = ((Gdk.EventMask)(0)); w31.Name = "hbox2"; // Container child hbox2.Gtk.Box+BoxChild Gtk.CheckButton w32 = new Gtk.CheckButton(); w32.Label = "Admin"; w32.DrawIndicator = true; w32.CanFocus = true; w32.Events = ((Gdk.EventMask)(0)); w32.Name = "adminCheck"; w32.Sensitive = false; bindings["adminCheck"] = w32; w31.Add(w32); Gtk.Box.BoxChild w33 = ((Gtk.Box.BoxChild)(w31[w32])); w33.Position = 0; // Container child hbox2.Gtk.Box+BoxChild Gtk.CheckButton w34 = new Gtk.CheckButton(); w34.Label = "Door 0"; w34.Active = true; w34.DrawIndicator = true; w34.CanFocus = true; w34.Events = ((Gdk.EventMask)(0)); w34.Name = "door0Check"; w34.Sensitive = false; bindings["door0Check"] = w34; w31.Add(w34); Gtk.Box.BoxChild w35 = ((Gtk.Box.BoxChild)(w31[w34])); w35.Position = 1; // Container child hbox2.Gtk.Box+BoxChild Gtk.CheckButton w36 = new Gtk.CheckButton(); w36.Label = "Door 1"; w36.Active = true; w36.DrawIndicator = true; w36.CanFocus = true; w36.Events = ((Gdk.EventMask)(0)); w36.Name = "door1Check"; w36.Sensitive = false; bindings["door1Check"] = w36; w31.Add(w36); Gtk.Box.BoxChild w37 = ((Gtk.Box.BoxChild)(w31[w36])); w37.Position = 2; bindings["hbox2"] = w31; w15.Add(w31); Gtk.Table.TableChild w38 = ((Gtk.Table.TableChild)(w15[w31])); w38.BottomAttach = ((uint)(4)); w38.LeftAttach = ((uint)(1)); w38.RightAttach = ((uint)(2)); w38.TopAttach = ((uint)(3)); w38.YOptions = ((Gtk.AttachOptions)(4)); w38.XOptions = ((Gtk.AttachOptions)(4)); bindings["table2"] = w15; w12.Add(w15); Gtk.Box.BoxChild w39 = ((Gtk.Box.BoxChild)(w12[w15])); w39.Position = 1; w39.Expand = false; w39.Fill = false; // Container child vbox1.Gtk.Box+BoxChild Gtk.Statusbar w40 = new Gtk.Statusbar(); w40.HasResizeGrip = false; w40.Events = ((Gdk.EventMask)(0)); w40.Name = "Statusbar"; bindings["Statusbar"] = w40; w12.Add(w40); Gtk.Box.BoxChild w41 = ((Gtk.Box.BoxChild)(w12[w40])); w41.PackType = ((Gtk.PackType)(1)); w41.Position = 2; w41.Expand = false; w41.Fill = false; // Container child vbox1.Gtk.Box+BoxChild Gtk.HBox w42 = new Gtk.HBox(); w42.Events = ((Gdk.EventMask)(0)); w42.Name = "hbox3"; // Container child hbox3.Gtk.Box+BoxChild Gtk.Image w43 = new Gtk.Image(); w43.Pixbuf = Gdk.Pixbuf.LoadFromResource("Labor.png"); w43.Events = ((Gdk.EventMask)(0)); w43.Name = "image11"; bindings["image11"] = w43; w42.Add(w43); Gtk.Box.BoxChild w44 = ((Gtk.Box.BoxChild)(w42[w43])); w44.Position = 0; w44.Expand = false; w44.Fill = false; w44.Padding = ((uint)(30)); // Container child hbox3.Gtk.Box+BoxChild Gtk.HBox w45 = new Gtk.HBox(); w45.Events = ((Gdk.EventMask)(0)); w45.Name = "hbox1"; // Container child hbox1.Gtk.Box+BoxChild Gtk.HButtonBox w46 = new Gtk.HButtonBox(); w46.Spacing = 20; w46.BorderWidth = ((uint)(11)); w46.Events = ((Gdk.EventMask)(0)); w46.Name = "hbuttonbox1"; // Container child hbuttonbox1.Gtk.ButtonBox+ButtonBoxChild Gtk.Button w47 = new Gtk.Button(); w47.UseUnderline = true; w47.CanFocus = true; w47.Events = ((Gdk.EventMask)(0)); w47.Name = "writeButton"; w47.Sensitive = false; w47.HasDefault = true; w47.CanDefault = true; // Container child writeButton.Gtk.Container+ContainerChild Gtk.Alignment w48 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F); w48.Events = ((Gdk.EventMask)(0)); w48.Name = "GtkAlignment"; // Container child GtkAlignment.Gtk.Container+ContainerChild Gtk.HBox w49 = new Gtk.HBox(); w49.Spacing = 2; w49.Events = ((Gdk.EventMask)(0)); w49.Name = "GtkHBox"; // Container child GtkHBox.Gtk.Container+ContainerChild Gtk.Image w50 = new Gtk.Image(); w50.Pixbuf = Gtk.IconTheme.Default.LoadIcon("stock_creditcard", 16, 0); w50.Events = ((Gdk.EventMask)(0)); w50.Name = "image1"; bindings["image1"] = w50; w49.Add(w50); // Container child GtkHBox.Gtk.Container+ContainerChild Gtk.Label w52 = new Gtk.Label(); w52.LabelProp = "_Write to card"; w52.UseUnderline = true; w52.Events = ((Gdk.EventMask)(0)); w52.Name = "GtkLabel"; bindings["GtkLabel"] = w52; w49.Add(w52); bindings["GtkHBox"] = w49; w48.Add(w49); bindings["GtkAlignment"] = w48; w47.Add(w48); bindings["writeButton"] = w47; w46.Add(w47); Gtk.ButtonBox.ButtonBoxChild w56 = ((Gtk.ButtonBox.ButtonBoxChild)(w46[w47])); w56.Expand = false; w56.Fill = false; bindings["hbuttonbox1"] = w46; w45.Add(w46); Gtk.Box.BoxChild w57 = ((Gtk.Box.BoxChild)(w45[w46])); w57.Position = 0; bindings["hbox1"] = w45; w42.Add(w45); Gtk.Box.BoxChild w58 = ((Gtk.Box.BoxChild)(w42[w45])); w58.Position = 1; bindings["hbox3"] = w42; w12.Add(w42); Gtk.Box.BoxChild w59 = ((Gtk.Box.BoxChild)(w12[w42])); w59.PackType = ((Gtk.PackType)(1)); w59.Position = 3; w59.Expand = false; w59.Fill = false; bindings["vbox1"] = w12; cobj.Add(w12); cobj.DefaultWidth = 516; cobj.DefaultHeight = 270; bindings["LabCardCreator.MainWindow"] = cobj; w13.Show(); w16.Show(); w19.Show(); w21.Show(); w23.Show(); w25.Show(); w27.Show(); w29.Show(); w32.Show(); w34.Show(); w36.Show(); w31.Show(); w15.Show(); w40.Show(); w43.Show(); w50.Show(); w52.Show(); w49.Show(); w48.Show(); w47.Show(); w46.Show(); w45.Show(); w42.Show(); w12.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, "OnQuitActivated"))); w6.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnAboutActivated"))); w7.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnConnectActivated"))); w8.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnDisconnectActivated"))); w9.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnViewHexdumpActivated"))); w10.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnEraseActivated"))); w47.Clicked += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnWriteBtnClicked"))); } } 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); } } }