All pastes #181929 Raw Edit

Something

public text v1 · immutable
#181929 ·published 2006-09-25 14:37 UTC
rendered paste body
// ------------------------------------------------------------------------------
//  <autogenerated>
//      This code was generated by a tool.
//      Mono Runtime Version: 2.0.50727.42
// 
//      Changes to this file may cause incorrect behavior and will be lost if 
//      the code is regenerated.
//  </autogenerated>
// ------------------------------------------------------------------------------

namespace Stetic {
    
    
    internal class Gui {
        
        public static void Build(object obj, System.Type type) {
            Stetic.Gui.Build(obj, type.FullName);
        }
        
        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 = "MainWindow";
                cobj.WindowPosition = ((Gtk.WindowPosition)(4));
                cobj.Events = ((Gdk.EventMask)(0));
                cobj.Name = "MainWindow";
                // Container child MainWindow.Gtk.Container+ContainerChild
                Gtk.Table w1 = new Gtk.Table(((uint)(4)), ((uint)(2)), false);
                w1.Events = ((Gdk.EventMask)(0));
                w1.Name = "table1";
                // Container child table1.Gtk.Table+TableChild
                Gtk.Label w2 = new Gtk.Label();
                w2.LabelProp = "Zahl1";
                w2.Events = ((Gdk.EventMask)(0));
                w2.Name = "label_Zahl1";
                bindings["label_Zahl1"] = w2;
                w1.Add(w2);
                Gtk.Table.TableChild w3 = ((Gtk.Table.TableChild)(w1[w2]));
                w3.YOptions = ((Gtk.AttachOptions)(4));
                w3.XOptions = ((Gtk.AttachOptions)(4));
                // Container child table1.Gtk.Table+TableChild
                Gtk.Entry w4 = new Gtk.Entry();
                w4.IsEditable = true;
                w4.InvisibleChar = '&#9679;';
                w4.CanFocus = true;
                w4.Events = ((Gdk.EventMask)(0));
                w4.Name = "entry1";
                bindings["entry1"] = w4;
                w1.Add(w4);
                Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(w1[w4]));
                w5.LeftAttach = ((uint)(1));
                w5.RightAttach = ((uint)(2));
                w5.YOptions = ((Gtk.AttachOptions)(4));
                w5.XOptions = ((Gtk.AttachOptions)(4));
                // Container child table1.Gtk.Table+TableChild
                Gtk.Entry w6 = new Gtk.Entry();
                w6.IsEditable = true;
                w6.InvisibleChar = '&#9679;';
                w6.CanFocus = true;
                w6.Events = ((Gdk.EventMask)(0));
                w6.Name = "Ergebnis";
                bindings["Ergebnis"] = w6;
                w1.Add(w6);
                Gtk.Table.TableChild w7 = ((Gtk.Table.TableChild)(w1[w6]));
                w7.BottomAttach = ((uint)(4));
                w7.LeftAttach = ((uint)(1));
                w7.RightAttach = ((uint)(2));
                w7.TopAttach = ((uint)(3));
                w7.YOptions = ((Gtk.AttachOptions)(4));
                w7.XOptions = ((Gtk.AttachOptions)(4));
                // Container child table1.Gtk.Table+TableChild
                Gtk.Label w8 = new Gtk.Label();
                w8.LabelProp = "Ergebnis";
                w8.Events = ((Gdk.EventMask)(0));
                w8.Name = "labelErgebnis";
                bindings["labelErgebnis"] = w8;
                w1.Add(w8);
                Gtk.Table.TableChild w9 = ((Gtk.Table.TableChild)(w1[w8]));
                w9.BottomAttach = ((uint)(4));
                w9.TopAttach = ((uint)(3));
                w9.YOptions = ((Gtk.AttachOptions)(4));
                w9.XOptions = ((Gtk.AttachOptions)(4));
                // Container child table1.Gtk.Table+TableChild
                Gtk.Label w10 = new Gtk.Label();
                w10.LabelProp = "Zahl2";
                w10.Events = ((Gdk.EventMask)(0));
                w10.Name = "labelZahl2";
                bindings["labelZahl2"] = w10;
                w1.Add(w10);
                Gtk.Table.TableChild w11 = ((Gtk.Table.TableChild)(w1[w10]));
                w11.BottomAttach = ((uint)(2));
                w11.TopAttach = ((uint)(1));
                w11.YOptions = ((Gtk.AttachOptions)(4));
                w11.XOptions = ((Gtk.AttachOptions)(4));
                // Container child table1.Gtk.Table+TableChild
                Gtk.Entry w12 = new Gtk.Entry();
                w12.IsEditable = true;
                w12.InvisibleChar = '&#9679;';
                w12.CanFocus = true;
                w12.Events = ((Gdk.EventMask)(0));
                w12.Name = "entry22";
                bindings["entry22"] = w12;
                w1.Add(w12);
                Gtk.Table.TableChild w13 = ((Gtk.Table.TableChild)(w1[w12]));
                w13.BottomAttach = ((uint)(2));
                w13.LeftAttach = ((uint)(1));
                w13.RightAttach = ((uint)(2));
                w13.TopAttach = ((uint)(1));
                w13.YOptions = ((Gtk.AttachOptions)(4));
                w13.XOptions = ((Gtk.AttachOptions)(4));
                // Container child table1.Gtk.Table+TableChild
                Gtk.HBox w14 = new Gtk.HBox();
                w14.Events = ((Gdk.EventMask)(0));
                w14.Name = "hbox4";
                // Container child hbox4.Gtk.Box+BoxChild
                Gtk.Button w15 = new Gtk.Button();
                w15.CanFocus = true;
                w15.Events = ((Gdk.EventMask)(0));
                w15.Name = "button8";
                w15.Label = "+";
                bindings["button8"] = w15;
                w14.Add(w15);
                Gtk.Box.BoxChild w16 = ((Gtk.Box.BoxChild)(w14[w15]));
                w16.Position = 0;
                // Container child hbox4.Gtk.Box+BoxChild
                Gtk.Button w17 = new Gtk.Button();
                w17.CanFocus = true;
                w17.Events = ((Gdk.EventMask)(0));
                w17.Name = "button9";
                w17.Label = "/";
                bindings["button9"] = w17;
                w14.Add(w17);
                Gtk.Box.BoxChild w18 = ((Gtk.Box.BoxChild)(w14[w17]));
                w18.Position = 1;
                bindings["hbox4"] = w14;
                w1.Add(w14);
                Gtk.Table.TableChild w19 = ((Gtk.Table.TableChild)(w1[w14]));
                w19.BottomAttach = ((uint)(3));
                w19.LeftAttach = ((uint)(1));
                w19.RightAttach = ((uint)(2));
                w19.TopAttach = ((uint)(2));
                w19.YOptions = ((Gtk.AttachOptions)(4));
                bindings["table1"] = w1;
                cobj.Add(w1);
                cobj.DefaultWidth = 227;
                cobj.DefaultHeight = 120;
                bindings["MainWindow"] = cobj;
                w2.Show();
                w4.Show();
                w6.Show();
                w8.Show();
                w10.Show();
                w12.Show();
                w15.Show();
                w17.Show();
                w14.Show();
                w1.Show();
                cobj.Show();
                cobj.DeleteEvent += ((Gtk.DeleteEventHandler)(System.Delegate.CreateDelegate(typeof(Gtk.DeleteEventHandler), cobj, "OnDeleteEvent")));
            }
            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);
                }
            }
        }
    }
    
    internal class ActionGroups {
        
        public static Gtk.ActionGroup GetActionGroup(System.Type type) {
            return Stetic.ActionGroups.GetActionGroup(type.FullName);
        }
        
        public static Gtk.ActionGroup GetActionGroup(string name) {
            return null;
        }
    }
}