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


C# Gtk.Alignment.Show方法代码示例

本文整理汇总了C#中Gtk.Alignment.Show方法的典型用法代码示例。如果您正苦于以下问题:C# Gtk.Alignment.Show方法的具体用法?C# Gtk.Alignment.Show怎么用?C# Gtk.Alignment.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Gtk.Alignment的用法示例。


在下文中一共展示了Gtk.Alignment.Show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateMainLayout

		protected virtual Gtk.Widget CreateMainLayout ()
		{
			mainBox = new Gtk.VBox ();
			mainBox.Show ();
			alignment = new RootWindowAlignment (this);
			mainBox.PackStart (alignment, true, true, 0);
			alignment.Show ();
			return mainBox;
		}
开发者ID:m13253,项目名称:xwt,代码行数:9,代码来源:WindowBackend.cs

示例2: WindowBackend

 public WindowBackend()
 {
     Window = new Gtk.Window ("");
     mainBox = new Gtk.VBox ();
     Window.Add (mainBox);
     mainBox.Show ();
     alignment = new Gtk.Alignment (0, 0, 1, 1);
     mainBox.PackStart (alignment, true, true, 0);
     alignment.Show ();
 }
开发者ID:carlosalberto,项目名称:xwt,代码行数:10,代码来源:WindowBackend.cs

示例3: MakeImageButton

		public static Gtk.Button MakeImageButton (Gtk.Image image, string label)
		{
			Gtk.HBox box = new Gtk.HBox (false, 2);
			box.PackStart (image, false, false, 0);
			box.PackEnd (new Gtk.Label (label), false, false, 0);
			box.ShowAll ();

			Gtk.Button button = new Gtk.Button ();

			Gtk.Alignment align = new Gtk.Alignment (0.5f, 0.5f, 0.0f, 0.0f);
			align.Add (box);
			align.Show ();

			button.Add (align);
			return button;
		}			
开发者ID:ArsenShnurkov,项目名称:beagle-1,代码行数:16,代码来源:GtkUtils.cs

示例4: Header

        public Header(string text)
            : base()
        {
            base.SetSizeRequest (-1, 30);

            Gtk.Alignment alignment = new Gtk.Alignment (0, 0, 1, 1);
            alignment.TopPadding = 1;
            alignment.LeftPadding = 5;
            alignment.RightPadding = 0;
            alignment.BottomPadding = 1;
            base.Add (alignment);

            //Select ();

            Gtk.HBox box = new Gtk.HBox ();
            alignment.Add (box);

            label = new Gtk.Label ();
            label.Ypad = 3;
            //	label.Xpad = 3;
            //base.Add (label);
            box.PackStart (label, true, true, 0);
            label.SetAlignment (0f, 0.5f);
            label.Justify = Gtk.Justification.Left;

            label.Markup = "<b>" + text + "</b>";

            closeButton = new Gtk.Button ();
            closeButton.Add (new Gtk.Image ("gtk-close", Gtk.IconSize.Menu));
            closeButton.Relief = Gtk.ReliefStyle.None;
            box.PackEnd (closeButton, false, false, 0);
            closeButton.ShowAll ();

            label.Show ();
            box.Show ();
            alignment.Show ();

            closeButton.Clicked += closeButton_Clicked;
        }
开发者ID:codebutler,项目名称:meshwork,代码行数:39,代码来源:Header.cs

示例5: Build

 public static void Build(object obj, string id)
 {
     System.Collections.Hashtable bindings = new System.Collections.Hashtable();
     if ((id == "administrator.EditCreateUser")) {
         Gtk.Window cobj = ((Gtk.Window)(obj));
         // Widget administrator.EditCreateUser
         cobj.Title = "EditCreateUser";
         cobj.WindowPosition = ((Gtk.WindowPosition)(4));
         cobj.Events = ((Gdk.EventMask)(0));
         cobj.Name = "administrator.EditCreateUser";
         cobj.DefaultWidth = 400;
         cobj.DefaultHeight = 300;
         bindings["administrator.EditCreateUser"] = cobj;
         cobj.Show();
     }
     else {
         if ((id == "administrator.LoginWindow")) {
             Gtk.Window cobj = ((Gtk.Window)(obj));
             // Widget administrator.LoginWindow
             cobj.Title = "Boxerp Server Administrator";
             cobj.WindowPosition = ((Gtk.WindowPosition)(1));
             cobj.Modal = true;
             cobj.Resizable = false;
             cobj.AllowGrow = false;
             cobj.Events = ((Gdk.EventMask)(0));
             cobj.Name = "administrator.LoginWindow";
             // Container child administrator.LoginWindow.Gtk.Container+ContainerChild
             Gtk.VBox w1 = new Gtk.VBox();
             w1.BorderWidth = ((uint)(5));
             w1.Events = ((Gdk.EventMask)(0));
             w1.Name = "vbox1";
             // Container child vbox1.Gtk.Box+BoxChild
             Gtk.HBox w2 = new Gtk.HBox();
             w2.Events = ((Gdk.EventMask)(0));
             w2.Name = "hbox1";
             // Container child hbox1.Gtk.Box+BoxChild
             Gtk.Label w3 = new Gtk.Label();
             w3.LabelProp = "Login:";
             w3.Events = ((Gdk.EventMask)(0));
             w3.Name = "label1";
             w3.WidthRequest = 150;
             bindings["label1"] = w3;
             w2.Add(w3);
             Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(w2[w3]));
             w4.Position = 0;
             // Container child hbox1.Gtk.Box+BoxChild
             Gtk.Entry w5 = new Gtk.Entry();
             w5.Text = "demo";
             w5.IsEditable = true;
             w5.MaxLength = 100;
             w5.InvisibleChar = '●';
             w5.CanFocus = true;
             w5.Events = ((Gdk.EventMask)(0));
             w5.Name = "entryLogin";
             w5.WidthRequest = 200;
             bindings["entryLogin"] = w5;
             w2.Add(w5);
             Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(w2[w5]));
             w6.Position = 1;
             w6.Expand = false;
             w6.Fill = false;
             bindings["hbox1"] = w2;
             w1.Add(w2);
             Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(w1[w2]));
             w7.Position = 0;
             w7.Expand = false;
             w7.Fill = false;
             // Container child vbox1.Gtk.Box+BoxChild
             Gtk.HBox w8 = new Gtk.HBox();
             w8.Events = ((Gdk.EventMask)(0));
             w8.Name = "hbox2";
             w8.WidthRequest = 150;
             // Container child hbox2.Gtk.Box+BoxChild
             Gtk.Label w9 = new Gtk.Label();
             w9.LabelProp = "Password:";
             w9.Events = ((Gdk.EventMask)(0));
             w9.Name = "label2";
             bindings["label2"] = w9;
             w8.Add(w9);
             Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(w8[w9]));
             w10.Position = 0;
             w10.Fill = false;
             // Container child hbox2.Gtk.Box+BoxChild
             Gtk.Entry w11 = new Gtk.Entry();
             w11.Text = "pass";
             w11.IsEditable = true;
             w11.Visibility = false;
             w11.InvisibleChar = '●';
             w11.CanFocus = true;
             w11.Events = ((Gdk.EventMask)(0));
             w11.Name = "entryPassword";
             w11.WidthRequest = 200;
             bindings["entryPassword"] = w11;
             w8.Add(w11);
             Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(w8[w11]));
             w12.Position = 1;
             w12.Expand = false;
             w12.Fill = false;
             bindings["hbox2"] = w8;
             w1.Add(w8);
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:boxerp-svn,代码行数:101,代码来源:generated.cs

示例6: HoverImageButton

 public HoverImageButton()
 {
     Gtk.Alignment al = new Gtk.Alignment (0.5f, 0.5f, 0f, 0f);
     al.Show ();
     CanFocus = true;
     VisibleWindow = false;
     image = new ImageView();
     image.Show();
     al.Add ((Gtk.Widget)Toolkit.CurrentEngine.GetNativeWidget (image));
     Add(al);
 }
开发者ID:RandallFlagg,项目名称:xwt,代码行数:11,代码来源:SearchTextEntryBackend.cs

示例7: SetPadding

        public void SetPadding(double left, double right, double top, double bottom)
        {
            if (Widget is HeaderBox) {
                HeaderBox hb = (HeaderBox) Widget;
                hb.SetPadding ((int)top, (int)bottom, (int)left, (int)right);
                return;
            }

            if (left == 0 && right == 0 && top == 0 && bottom == 0 && paddingAlign == null)
                return;

            if (paddingAlign == null) {
                paddingAlign = new Gtk.Alignment (0, 0, 1, 1);
                paddingAlign.Show ();
                var c = Widget.Child;
                if (c != null) {
                    Widget.Remove (c);
                    paddingAlign.Add (c);
                }
                Widget.Add (paddingAlign);
            }
            UreatePaddingAlign (top, bottom, left, right);
        }
开发者ID:antmicro,项目名称:xwt,代码行数:23,代码来源:FrameBackend.cs

示例8: SetFrameType

        public void SetFrameType(FrameType type)
        {
            Frame f = (Frame) Frontend;

            switch (type) {
            case FrameType.Custom:
                if (!(Widget is HeaderBox)) {
                    HeaderBox box = new HeaderBox ();
                    box.Show ();
                    box.BackgroundColor = UsingCustomBackgroundColor ? (Color?)BackgroundColor : null;
                    #pragma warning disable 618
                    box.SetMargins ((int)f.BorderWidthTop, (int)f.BorderWidthBottom, (int)f.BorderWidthLeft, (int)f.BorderWidthRight);
                    #pragma warning restore 618
                    box.SetPadding ((int)f.Padding.Top, (int)f.Padding.Bottom, (int)f.Padding.Left, (int)f.Padding.Right);
                    if (borderColor != null)
                        box.SetBorderColor (borderColor.Value);
                    var c = paddingAlign != null ? paddingAlign.Child : Widget.Child;
                    if (c != null) {
                        ((Gtk.Container)c.Parent).Remove (c);
                        box.Add (c);
                    }
                    Widget = box;
                    if (paddingAlign != null) {
                        paddingAlign.Destroy ();
                        paddingAlign = null;
                    }
                }
                break;
            case FrameType.WidgetBox:
                if (!(Widget is Gtk.Frame)) {
                    var c = Widget.Child;
                    if (c != null)
                        Widget.Remove (c);
                    Gtk.Frame gf = new Gtk.Frame ();
                    if (!string.IsNullOrEmpty (label))
                        gf.Label = label;
                    if (f.Padding.HorizontalSpacing != 0 || f.Padding.VerticalSpacing != 0) {
                        paddingAlign = new Gtk.Alignment (0, 0, 1, 1);
                        paddingAlign.Show ();
                        UreatePaddingAlign (f.Padding.Top, f.Padding.Bottom, f.Padding.Left, f.Padding.Right);
                        if (c != null)
                            paddingAlign.Add (c);
                        gf.Add (paddingAlign);
                    } else {
                        if (c != null)
                            gf.Add (c);
                    }
                    gf.Show ();
                    Widget = gf;
                }
                break;
            }
        }
开发者ID:antmicro,项目名称:xwt,代码行数:53,代码来源:FrameBackend.cs

示例9: Build

 public static void Build(object obj, string id)
 {
     System.Collections.Hashtable bindings = new System.Collections.Hashtable();
     if ((id == "SharpTranslator.ReversibleCombos")) {
         Gtk.Bin cobj = ((Gtk.Bin)(obj));
         // Widget SharpTranslator.ReversibleCombos
         BinContainer.Attach(cobj);
         cobj.Events = ((Gdk.EventMask)(256));
         cobj.Name = "SharpTranslator.ReversibleCombos";
         // Container child SharpTranslator.ReversibleCombos.Gtk.Container+ContainerChild
         Gtk.HBox w1 = new Gtk.HBox();
         w1.Spacing = 5;
         w1.BorderWidth = ((uint)(5));
         w1.Events = ((Gdk.EventMask)(0));
         w1.Name = "hbox1";
         // Container child hbox1.Gtk.Box+BoxChild
         Gtk.Label w2 = new Gtk.Label();
         w2.LabelProp = "Source:";
         w2.Events = ((Gdk.EventMask)(0));
         w2.Name = "labelSource";
         bindings["labelSource"] = w2;
         w1.Add(w2);
         Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(w1[w2]));
         w3.Position = 0;
         w3.Expand = false;
         w3.Fill = false;
         // Container child hbox1.Gtk.Box+BoxChild
         Gtk.ComboBox w4 = Gtk.ComboBox.NewText();
         w4.Events = ((Gdk.EventMask)(0));
         w4.Name = "comboSource";
         bindings["comboSource"] = w4;
         w1.Add(w4);
         Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(w1[w4]));
         w5.Position = 1;
         w5.Expand = false;
         w5.Fill = false;
         // Container child hbox1.Gtk.Box+BoxChild
         Gtk.VSeparator w6 = new Gtk.VSeparator();
         w6.Events = ((Gdk.EventMask)(0));
         w6.Name = "vseparator1";
         bindings["vseparator1"] = w6;
         w1.Add(w6);
         Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(w1[w6]));
         w7.Position = 2;
         w7.Expand = false;
         w7.Fill = false;
         // Container child hbox1.Gtk.Box+BoxChild
         Gtk.CheckButton w8 = new Gtk.CheckButton();
         w8.Label = "reverse";
         w8.DrawIndicator = true;
         w8.BorderWidth = ((uint)(5));
         w8.CanFocus = true;
         w8.Events = ((Gdk.EventMask)(0));
         w8.Name = "checkbuttonReverse";
         bindings["checkbuttonReverse"] = w8;
         w1.Add(w8);
         Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(w1[w8]));
         w9.Position = 3;
         w9.Expand = false;
         // Container child hbox1.Gtk.Box+BoxChild
         Gtk.VSeparator w10 = new Gtk.VSeparator();
         w10.Events = ((Gdk.EventMask)(0));
         w10.Name = "vseparator2";
         bindings["vseparator2"] = w10;
         w1.Add(w10);
         Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(w1[w10]));
         w11.Position = 4;
         w11.Expand = false;
         w11.Fill = false;
         // Container child hbox1.Gtk.Box+BoxChild
         Gtk.Label w12 = new Gtk.Label();
         w12.LabelProp = "Target:";
         w12.Events = ((Gdk.EventMask)(0));
         w12.Name = "labelTarget";
         bindings["labelTarget"] = w12;
         w1.Add(w12);
         Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(w1[w12]));
         w13.Position = 5;
         w13.Expand = false;
         w13.Fill = false;
         // Container child hbox1.Gtk.Box+BoxChild
         Gtk.ComboBox w14 = Gtk.ComboBox.NewText();
         w14.Events = ((Gdk.EventMask)(0));
         w14.Name = "comboTarget";
         bindings["comboTarget"] = w14;
         w1.Add(w14);
         Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(w1[w14]));
         w15.Position = 6;
         w15.Expand = false;
         w15.Fill = false;
         bindings["hbox1"] = w1;
         cobj.Add(w1);
         bindings["SharpTranslator.ReversibleCombos"] = cobj;
         w2.Show();
         w4.Show();
         w6.Show();
         w8.Show();
         w10.Show();
         w12.Show();
         w14.Show();
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:sharptranslator-svn,代码行数:101,代码来源:generated.cs

示例10: Build


//.........这里部分代码省略.........
         // Container child GtkAlignment1.Gtk.Container+ContainerChild
         Gtk.HBox w21 = new Gtk.HBox();
         w21.Spacing = 2;
         w21.Events = ((Gdk.EventMask)(0));
         w21.Name = "GtkHBox1";
         // Container child GtkHBox1.Gtk.Container+ContainerChild
         Gtk.Image w22 = new Gtk.Image();
         w22.Pixbuf = Gtk.IconTheme.Default.LoadIcon("gtk-yes", 16, 0);
         w22.Events = ((Gdk.EventMask)(0));
         w22.Name = "image3";
         bindings["image3"] = w22;
         w21.Add(w22);
         // Container child GtkHBox1.Gtk.Container+ContainerChild
         Gtk.Label w24 = new Gtk.Label();
         w24.LabelProp = "Yes";
         w24.Events = ((Gdk.EventMask)(0));
         w24.Name = "GtkLabel1";
         bindings["GtkLabel1"] = w24;
         w21.Add(w24);
         bindings["GtkHBox1"] = w21;
         w20.Add(w21);
         bindings["GtkAlignment1"] = w20;
         w19.Add(w20);
         bindings["button24"] = w19;
         cobj.AddActionWidget(w19, -8);
         Gtk.ButtonBox.ButtonBoxChild w28 = ((Gtk.ButtonBox.ButtonBoxChild)(w8[w19]));
         w28.Position = 1;
         w28.Expand = false;
         w28.Fill = false;
         bindings["Boxerp.Client.GtkSharp.Lib.QuestionDialog_ActionArea"] = w8;
         cobj.DefaultWidth = 400;
         cobj.DefaultHeight = 99;
         bindings["Boxerp.Client.GtkSharp.Lib.QuestionDialog"] = cobj;
         w3.Show();
         w5.Show();
         w2.Show();
         w1.Show();
         w12.Show();
         w14.Show();
         w11.Show();
         w10.Show();
         w9.Show();
         w22.Show();
         w24.Show();
         w21.Show();
         w20.Show();
         w19.Show();
         w8.Show();
         cobj.Show();
         w9.Clicked += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnNo")));
         w19.Clicked += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnYes")));
     }
     else {
         if ((id == "Boxerp.Client.GtkSharp.Lib.SimpleListView")) {
             Gtk.Bin cobj = ((Gtk.Bin)(obj));
             // Widget Boxerp.Client.GtkSharp.Lib.SimpleListView
             BinContainer.Attach(cobj);
             cobj.Events = ((Gdk.EventMask)(256));
             cobj.Name = "Boxerp.Client.GtkSharp.Lib.SimpleListView";
             // Container child Boxerp.Client.GtkSharp.Lib.SimpleListView.Gtk.Container+ContainerChild
             Gtk.TreeView w1 = new Gtk.TreeView();
             w1.CanFocus = true;
             w1.Events = ((Gdk.EventMask)(0));
             w1.Name = "treeview";
             bindings["treeview"] = w1;
             cobj.Add(w1);
开发者ID:BackupTheBerlios,项目名称:boxerp-svn,代码行数:67,代码来源:generated.cs

示例11: Build

 public static void Build(object obj, string id)
 {
     System.Collections.Hashtable bindings = new System.Collections.Hashtable();
     if ((id == "Sosp.EarthOMeter.MainWindow")) {
         Gtk.Window cobj = ((Gtk.Window)(obj));
         // Widget Sosp.EarthOMeter.MainWindow
         cobj.Title = "EarthOMeter";
         Gtk.UIManager w1 = new Gtk.UIManager();
         Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default");
         Gtk.Action w3 = new Gtk.Action("paste", null, "Entfernungen aus Zwischenablage laden", "gtk-paste");
         bindings["paste"] = w3;
         w2.Add(w3, "<Control><Mod2>v");
         Gtk.Action w4 = new Gtk.Action("open", null, "Entfernungen aus KML Datei laden", "gtk-open");
         bindings["open"] = w4;
         w2.Add(w4, null);
         Gtk.Action w5 = new Gtk.Action("Bearbeiten", "Bearbeiten", null, null);
         w5.ShortLabel = "Bearbeiten";
         bindings["Bearbeiten"] = w5;
         w2.Add(w5, null);
         Gtk.Action w6 = new Gtk.Action("Hilfe", "Hilfe", null, null);
         w6.ShortLabel = "Hilfe";
         bindings["Hilfe"] = w6;
         w2.Add(w6, null);
         Gtk.Action w7 = new Gtk.Action("Info", "Info", null, "gtk-about");
         w7.ShortLabel = "Info";
         bindings["Info"] = w7;
         w2.Add(w7, null);
         w1.InsertActionGroup(w2, 0);
         cobj.AddAccelGroup(w1.AccelGroup);
         cobj.Icon = Gdk.Pixbuf.LoadFromResource("Icon22x22.png");
         cobj.WindowPosition = ((Gtk.WindowPosition)(4));
         cobj.Events = ((Gdk.EventMask)(0));
         cobj.Name = "Sosp.EarthOMeter.MainWindow";
         // Container child Sosp.EarthOMeter.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='menubar2'><menu action='Bearbeiten'><menuitem action='open'/><menuitem action='paste'/></menu><menu action='Hilfe'><menuitem action='Info'/></menu></menubar></ui>");
         Gtk.MenuBar w9 = ((Gtk.MenuBar)(w1.GetWidget("/menubar2")));
         w9.Events = ((Gdk.EventMask)(0));
         w9.Name = "menubar2";
         bindings["menubar2"] = 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
         w1.AddUiFromString("<ui><toolbar name='toolbar1'><toolitem action='open'/><toolitem action='paste'/></toolbar></ui>");
         Gtk.Toolbar w11 = ((Gtk.Toolbar)(w1.GetWidget("/toolbar1")));
         w11.ShowArrow = false;
         w11.ToolbarStyle = ((Gtk.ToolbarStyle)(0));
         w11.IconSize = ((Gtk.IconSize)(2));
         w11.Events = ((Gdk.EventMask)(0));
         w11.Name = "toolbar1";
         bindings["toolbar1"] = w11;
         w8.Add(w11);
         Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(w8[w11]));
         w12.Position = 1;
         w12.Expand = false;
         w12.Fill = false;
         // Container child vbox1.Gtk.Box+BoxChild
         Gtk.TreeView w13 = new Gtk.TreeView();
         w13.CanFocus = true;
         w13.Events = ((Gdk.EventMask)(0));
         w13.Name = "treeview1";
         bindings["treeview1"] = w13;
         w8.Add(w13);
         Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(w8[w13]));
         w14.Position = 2;
         // Container child vbox1.Gtk.Box+BoxChild
         Gtk.Statusbar w15 = new Gtk.Statusbar();
         w15.Events = ((Gdk.EventMask)(0));
         w15.Name = "statusbar1";
         bindings["statusbar1"] = w15;
         w8.Add(w15);
         Gtk.Box.BoxChild w16 = ((Gtk.Box.BoxChild)(w8[w15]));
         w16.Position = 3;
         w16.Expand = false;
         w16.Fill = false;
         bindings["vbox1"] = w8;
         cobj.Add(w8);
         cobj.DefaultWidth = 527;
         cobj.DefaultHeight = 300;
         bindings["Sosp.EarthOMeter.MainWindow"] = cobj;
         w9.Show();
         w11.Show();
         w13.Show();
         w15.Show();
         w8.Show();
         cobj.Show();
         cobj.DeleteEvent += ((Gtk.DeleteEventHandler)(System.Delegate.CreateDelegate(typeof(Gtk.DeleteEventHandler), cobj, "OnDeleteEvent")));
         w3.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "pasteActivated")));
         w4.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "openActivated")));
         w7.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "infoActivated")));
     }
     else {
         if ((id == "Sosp.EarthOMeter.About")) {
             Gtk.Window cobj = ((Gtk.Window)(obj));
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:earthometer-svn,代码行数:101,代码来源:generated.cs

示例12: Build

		protected virtual void Build ()
		{
			Gtk.Window cobj = (Gtk.Window) null;
			// Widget Sya.reclutamiento
			cobj.Title = "Datos del Aspirante - Reclutamiento de Personal";
			Gtk.UIManager w1 = new Gtk.UIManager ();
			Gtk.ActionGroup w2 = new Gtk.ActionGroup ("Default");
			Gtk.Action w3 = new Gtk.Action ("goBack", null, null, "gtk-go-back");
			this.goBack = w3;
			w2.Add (w3, null);
			Gtk.Action w4 = new Gtk.Action ("goForward", null, null, "gtk-go-forward");
			this.goForward = w4;
			w2.Add (w4, null);
			Gtk.Action w5 = new Gtk.Action ("gotoLast", null, null, "gtk-goto-last");
			this.gotoLast = w5;
			w2.Add (w5, null);
			Gtk.Action w6 = new Gtk.Action ("print", null, null, "gtk-print");
			this.print = w6;
			w2.Add (w6, null);
			Gtk.Action w7 = new Gtk.Action ("save", null, null, "gtk-save");
			this.save = w7;
			w2.Add (w7, null);
			Gtk.Action w8 = new Gtk.Action ("quit", null, null, "gtk-quit");
			this.quit = w8;
			w2.Add (w8, null);
			Gtk.Action w9 = new Gtk.Action ("quit1", null, null, "gtk-quit");
			this.quit1 = w9;
			w2.Add (w9, null);
			Gtk.Action w10 = new Gtk.Action ("save1", null, null, "gtk-save");
			this.save1 = w10;
			w2.Add (w10, null);
			Gtk.Action w11 = new Gtk.Action ("quit2", null, null, "gtk-quit");
			this.quit2 = w11;
			w2.Add (w11, null);
			Gtk.Action w12 = new Gtk.Action ("about", null, null, "gtk-about");
			this.about = w12;
			w2.Add (w12, null);
			Gtk.Action w13 = new Gtk.Action ("gotoFirst", null, null, "gtk-goto-first");
			this.gotoFirst = w13;
			w2.Add (w13, null);
			Gtk.Action w14 = new Gtk.Action ("goBack1", null, null, "gtk-media-rewind");
			this.goBack1 = w14;
			w2.Add (w14, null);
			Gtk.Action w15 = new Gtk.Action ("goForward1", null, null, "gtk-media-forward");
			this.goForward1 = w15;
			w2.Add (w15, null);
			Gtk.Action w16 = new Gtk.Action ("gotoLast1", null, null, "gtk-goto-last");
			this.gotoLast1 = w16;
			w2.Add (w16, null);
			Gtk.Action w17 = new Gtk.Action ("save2", null, null, "gtk-save");
			this.save2 = w17;
			w2.Add (w17, null);
			Gtk.Action w18 = new Gtk.Action ("print1", null, null, "gtk-print");
			this.print1 = w18;
			w2.Add (w18, null);
			Gtk.Action w19 = new Gtk.Action ("quit3", null, null, "gtk-quit");
			this.quit3 = w19;
			w2.Add (w19, null);
			Gtk.Action w20 = new Gtk.Action ("dialogInfo", null, null, "gtk-dialog-info");
			this.dialogInfo = w20;
			w2.Add (w20, null);
			Gtk.Action w21 = new Gtk.Action ("about1", null, null, "gtk-about");
			this.about1 = w21;
			w2.Add (w21, null);
			Gtk.Action w22 = new Gtk.Action ("goBack2", null, null, "gtk-go-back");
			this.goBack2 = w22;
			w2.Add (w22, null);
			Gtk.Action w23 = new Gtk.Action ("goForward2", null, null, "gtk-go-forward");
			this.goForward2 = w23;
			w2.Add (w23, null);
			Gtk.Action w24 = new Gtk.Action ("printPreview", null, null, "gtk-print-preview");
			this.printPreview = w24;
			w2.Add (w24, null);
			w1.InsertActionGroup (w2, 0);
			cobj.AddAccelGroup (w1.AccelGroup);
			cobj.WindowPosition = ((Gtk.WindowPosition) (4));
			cobj.Modal = true;
			cobj.Gravity = ((Gdk.Gravity) (5));
			cobj.Name = "Sya.reclutamiento";
			// Container child Sya.reclutamiento.Gtk.Container+ContainerChild
			Gtk.ScrolledWindow w25 = new Gtk.ScrolledWindow ();
			w25.VscrollbarPolicy = ((Gtk.PolicyType) (1));
			w25.HscrollbarPolicy = ((Gtk.PolicyType) (1));
			w25.CanFocus = true;
			w25.Name = "scrolledwindow2";
			// Container child scrolledwindow2.Gtk.Container+ContainerChild
			Gtk.Viewport w26 = new Gtk.Viewport ();
			w26.ShadowType = ((Gtk.ShadowType) (0));
			w26.Name = "GtkViewport";
			// Container child GtkViewport.Gtk.Container+ContainerChild
			Gtk.VBox w27 = new Gtk.VBox ();
			w27.Name = "vbox1";
			// Container child vbox1.Gtk.Box+BoxChild
			Gtk.HBox w28 = new Gtk.HBox ();
			w28.Name = "hbox2";
			// Container child hbox2.Gtk.Box+BoxChild
			w1.AddUiFromString ("<ui><toolbar name='toolbar1'><toolitem action='gotoFirst'/><toolitem action='goBack1'/><toolitem action='goForward1'/><toolitem action='gotoLast1'/><toolitem action='save2'/><toolitem action='printPreview'/><toolitem action='print1'/><toolitem action='quit3'/><toolitem action='dialogInfo'/><toolitem action='about1'/><toolitem action='goBack2'/><toolitem action='goForward2'/></toolbar></ui>");
			Gtk.Toolbar w29 = ((Gtk.Toolbar) (w1.GetWidget ("/toolbar1")));
			w29.ShowArrow = false;
			w29.Tooltips = true;
//.........这里部分代码省略.........
开发者ID:mono,项目名称:gert,代码行数:101,代码来源:test.cs

示例13: Build


//.........这里部分代码省略.........
         w59.Events = ((Gdk.EventMask)(0));
         w59.Name = "image3";
         bindings["image3"] = w59;
         w58.Add(w59);
         // Container child GtkHBox.Gtk.Container+ContainerChild
         Gtk.Label w61 = new Gtk.Label();
         w61.LabelProp = "_Export";
         w61.UseUnderline = true;
         w61.Events = ((Gdk.EventMask)(0));
         w61.Name = "GtkLabel";
         bindings["GtkLabel"] = w61;
         w58.Add(w61);
         bindings["GtkHBox"] = w58;
         w57.Add(w58);
         bindings["GtkAlignment"] = w57;
         w56.Add(w57);
         bindings["button16"] = w56;
         w27.Add(w56);
         Gtk.Box.BoxChild w65 = ((Gtk.Box.BoxChild)(w27[w56]));
         w65.Position = 6;
         w65.Expand = false;
         w65.Fill = false;
         bindings["hbox1"] = w27;
         w15.Add(w27);
         Gtk.Box.BoxChild w66 = ((Gtk.Box.BoxChild)(w15[w27]));
         w66.Position = 2;
         w66.Expand = false;
         w66.Fill = false;
         bindings["vbox1"] = w15;
         cobj.Add(w15);
         cobj.DefaultWidth = 566;
         cobj.DefaultHeight = 300;
         bindings["igaeditorgtk.MainForm"] = cobj;
         w16.Show();
         w21.Show();
         w20.Show();
         w19.Show();
         w25.Show();
         w18.Show();
         w28.Show();
         w30.Show();
         w32.Show();
         w34.Show();
         w39.Show();
         w41.Show();
         w38.Show();
         w37.Show();
         w36.Show();
         w49.Show();
         w51.Show();
         w48.Show();
         w47.Show();
         w46.Show();
         w59.Show();
         w61.Show();
         w58.Show();
         w57.Show();
         w56.Show();
         w27.Show();
         w15.Show();
         cobj.Show();
         cobj.DeleteEvent += ((Gtk.DeleteEventHandler)(System.Delegate.CreateDelegate(typeof(Gtk.DeleteEventHandler), cobj, "OnDeleteEvent")));
         w7.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnReloadActivated")));
         w8.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnVaccumShrinkDatabaseActivated")));
         w9.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnCloseDatabaseActivated")));
         w10.Activated += ((System.EventHandler)(System.Delegate.CreateDelegate(typeof(System.EventHandler), cobj, "OnExitActivated")));
开发者ID:micolous,项目名称:igaeditor,代码行数:67,代码来源:generated.cs

示例14: MakeHotkeysPane

		// Page 2
		// List of Hotkey options
		public Gtk.Widget MakeHotkeysPane ()
		{
			Gtk.Label label;
			Gtk.CheckButton check;
			Gtk.Alignment align;
			Gtk.Entry entry;
			IPropertyEditorBool keybind_peditor;
			IPropertyEditor peditor;

			Gtk.VBox hotkeys_list = new Gtk.VBox (false, 12);
			hotkeys_list.BorderWidth = 12;
			hotkeys_list.Show ();


			// Hotkeys...

			check = MakeCheckButton (Catalog.GetString ("Listen for _Hotkeys"));
			hotkeys_list.PackStart (check, false, false, 0);

			keybind_peditor =
			        Services.Factory.CreatePropertyEditorToggleButton (Preferences.ENABLE_KEYBINDINGS,
			                                        check);
			SetupPropertyEditor (keybind_peditor);

			label = MakeTipLabel (
			                Catalog.GetString ("Hotkeys allow you to quickly access " +
			                                   "your notes from anywhere with a keypress. " +
			                                   "Example Hotkeys: " +
			                                   "<b>&lt;Control&gt;&lt;Shift&gt;F11</b>, " +
			                                   "<b>&lt;Alt&gt;N</b>"));
			hotkeys_list.PackStart (label, false, false, 0);

			align = new Gtk.Alignment (0.5f, 0.5f, 0.0f, 1.0f);
			align.Show ();
			hotkeys_list.PackStart (align, false, false, 0);

			Gtk.Table table = new Gtk.Table (4, 2, false);
			table.ColumnSpacing = 6;
			table.RowSpacing = 6;
			table.Show ();
			align.Add (table);


			// Show notes menu keybinding...

			label = MakeLabel (Catalog.GetString ("Show notes _menu"));
			table.Attach (label, 0, 1, 0, 1);

			entry = new Gtk.Entry ();
			label.MnemonicWidget = entry;
			entry.Show ();
			table.Attach (entry, 1, 2, 0, 1);

			peditor = Services.Factory.CreatePropertyEditorEntry (Preferences.KEYBINDING_SHOW_NOTE_MENU,
			                                   entry);
			SetupPropertyEditor (peditor);

			keybind_peditor.AddGuard (entry);


			// Open Start Here keybinding...

			label = MakeLabel (Catalog.GetString ("Open \"_Start Here\""));
			table.Attach (label, 0, 1, 1, 2);

			entry = new Gtk.Entry ();
			label.MnemonicWidget = entry;
			entry.Show ();
			table.Attach (entry, 1, 2, 1, 2);

			peditor = Services.Factory.CreatePropertyEditorEntry (Preferences.KEYBINDING_OPEN_START_HERE,
			                                   entry);
			SetupPropertyEditor (peditor);

			keybind_peditor.AddGuard (entry);


			// Create new note keybinding...

			label = MakeLabel (Catalog.GetString ("Create _new note"));
			table.Attach (label, 0, 1, 2, 3);

			entry = new Gtk.Entry ();
			label.MnemonicWidget = entry;
			entry.Show ();
			table.Attach (entry, 1, 2, 2, 3);

			peditor = Services.Factory.CreatePropertyEditorEntry (Preferences.KEYBINDING_CREATE_NEW_NOTE,
			                                   entry);
			SetupPropertyEditor (peditor);

			keybind_peditor.AddGuard (entry);


			// Open Search All Notes window keybinding...

			label = MakeLabel (Catalog.GetString ("Open \"Search _All Notes\""));
			table.Attach (label, 0, 1, 3, 4);
//.........这里部分代码省略.........
开发者ID:oluc,项目名称:tomboy,代码行数:101,代码来源:PreferencesDialog.cs

示例15: MakeEditingPane

		// Page 1
		// List of editing options
		public Gtk.Widget MakeEditingPane ()
		{
			Gtk.Label label;
			Gtk.CheckButton check;
			Gtk.Alignment align;
			IPropertyEditorBool peditor, font_peditor, bullet_peditor;

			Gtk.VBox options_list = new Gtk.VBox (false, 12);
			options_list.BorderWidth = 12;
			options_list.Show ();


			// Spell checking...

			#if FIXED_GTKSPELL
			if (NoteSpellChecker.GtkSpellAvailable) {
				check = MakeCheckButton (
				                Catalog.GetString ("_Spell check while typing"));
				options_list.PackStart (check, false, false, 0);

				peditor = Services.Factory.CreatePropertyEditorToggleButton (
				        Preferences.ENABLE_SPELLCHECKING,
				        check);
				SetupPropertyEditor (peditor);

				label = MakeTipLabel (
				                Catalog.GetString ("Misspellings will be underlined " +
				                                   "in red, with correct spelling " +
				                                   "suggestions shown in the context " +
				                                   "menu."));
				options_list.PackStart (label, false, false, 0);
			}
			#endif


			// WikiWords...

			check = MakeCheckButton (Catalog.GetString ("Highlight _WikiWords"));
			options_list.PackStart (check, false, false, 0);

			peditor = Services.Factory.CreatePropertyEditorToggleButton (Preferences.ENABLE_WIKIWORDS,
			                check);
			SetupPropertyEditor (peditor);

			label = MakeTipLabel (
			                Catalog.GetString ("Enable this option to highlight " +
			                                   "words <b>ThatLookLikeThis</b>. " +
			                                   "Clicking the word will create a " +
			                                   "note with that name."));
			options_list.PackStart (label, false, false, 0);

			// Auto bulleted list
			check = MakeCheckButton (Catalog.GetString ("Enable auto-_bulleted lists"));
			options_list.PackStart (check, false, false, 0);
			bullet_peditor =
			        Services.Factory.CreatePropertyEditorToggleButton (Preferences.ENABLE_AUTO_BULLETED_LISTS,
			                                        check);
			SetupPropertyEditor (bullet_peditor);

			// Custom font...
			Gtk.HBox font_box = new Gtk.HBox (false, 0);
			check = MakeCheckButton (Catalog.GetString ("Use custom _font"));
			font_box.PackStart (check);

			font_peditor =
			        Services.Factory.CreatePropertyEditorToggleButton (Preferences.ENABLE_CUSTOM_FONT,
			                                        check);
			SetupPropertyEditor (font_peditor);

			font_button = MakeFontButton ();
			font_button.Sensitive = check.Active;
			font_box.PackStart (font_button);
			font_box.ShowAll ();
			options_list.PackStart (font_box, false, false, 0);

			font_peditor.AddGuard (font_button);

			// Note renaming bahvior
			Gtk.HBox rename_behavior_box = new Gtk.HBox (false, 0);
			label = MakeLabel (Catalog.GetString ("When renaming a linked note: "));
			rename_behavior_box.PackStart (label);
			rename_behavior_combo = new Gtk.ComboBox (new string [] {
				Catalog.GetString ("Ask me what to do"),
				Catalog.GetString ("Never rename links"),
				Catalog.GetString ("Always rename links")});
			int rename_behavior = (int) Preferences.Get (Preferences.NOTE_RENAME_BEHAVIOR);
			if (rename_behavior < 0 || rename_behavior > 2) {
				rename_behavior = 0;
				Preferences.Set (Preferences.NOTE_RENAME_BEHAVIOR, rename_behavior);
			}
			rename_behavior_combo.Active = rename_behavior;
			rename_behavior_combo.Changed += (o, e) =>
				Preferences.Set (Preferences.NOTE_RENAME_BEHAVIOR,
				                 rename_behavior_combo.Active);
			rename_behavior_box.PackStart (rename_behavior_combo);
			rename_behavior_box.ShowAll ();
			options_list.PackStart (rename_behavior_box, false, false, 0);
			
//.........这里部分代码省略.........
开发者ID:oluc,项目名称:tomboy,代码行数:101,代码来源:PreferencesDialog.cs


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