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


C# VBox.PackEnd方法代码示例

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


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

示例1: Shell

    public Shell()
        : base("Mono Heap Profiler")
    {
        entries = new ActionEntry[] {
            new ActionEntry ("FileMenu", null, "_File", null, null, null),
            new ActionEntry ("OpenAction", Stock.Open, null, "<control>O", "Open a profile...", new EventHandler (OnOpen)),
            new ActionEntry ("QuitAction", Stock.Quit, null, "<control>Q", "Quit the application", delegate { Application.Quit (); }),
        };

        DefaultSize = new Gdk.Size (700, 700);
        DeleteEvent += delegate { Application.Quit (); };

        main_box = new VBox (false, 0);
        Add (main_box);

        shell_commands = new ActionGroup ("TestActions");
        shell_commands.Add (entries);

        uim = new UIManager ();
        uim.AddWidget += delegate (object obj, AddWidgetArgs args) {
            args.Widget.Show ();
            main_box.PackStart (args.Widget, false, true, 0);
        };

        uim.ConnectProxy += OnProxyConnect;
        uim.InsertActionGroup (shell_commands, 0);
        uim.AddUiFromResource ("shell-ui.xml");
        AddAccelGroup (uim.AccelGroup);

        sb = new Statusbar ();
        main_box.PackEnd (sb, false, true, 0);

        pager = new ShellPager (this);
        main_box.PackEnd (pager, true, true, 0);
    }
开发者ID:mono,项目名称:heap-prof,代码行数:35,代码来源:Shell.cs

示例2: DemoApplicationWindow

		public DemoApplicationWindow () : base ("Application Window")
		{
			SetDefaultSize (200, 200);

			vbox = new VBox (false, 0);
			Add (vbox);

			AddActions ();

			statusbar = new Statusbar ();
			UpdateStatus ();
			vbox.PackEnd (statusbar, false, false, 0);

			ScrolledWindow sw = new ScrolledWindow ();
			sw.SetPolicy (PolicyType.Automatic, PolicyType.Automatic);
			sw.ShadowType = ShadowType.In;
			vbox.PackEnd (sw, true, true, 0);

			TextView textview = new TextView ();
			textview.Buffer.MarkSet += new MarkSetHandler (MarkSet);
			sw.Add (textview);

			textview.GrabFocus ();

			ShowAll ();
		}
开发者ID:ystk,项目名称:debian-gtk-sharp2,代码行数:26,代码来源:DemoApplicationWindow.cs

示例3: SplashScreenForm

		//this is a popup so it behaves like other splashes on Windows, i.e. doesn't show up as a second window in the taskbar.
		public SplashScreenForm () : base (Gtk.WindowType.Popup)
		{
			AppPaintable = true;
			this.Decorated = false;
			this.WindowPosition = WindowPosition.Center;
			this.TypeHint = Gdk.WindowTypeHint.Splashscreen;
			try {
				using (var stream = BrandingService.GetStream ("SplashScreen.png", true))
					bitmap = new Gdk.Pixbuf (stream);
			} catch (Exception e) {
				LoggingService.LogError ("Can't load splash screen pixbuf 'SplashScreen.png'.", e);
			}
			progress = new ProgressBar();
			progress.Fraction = 0.00;
			progress.HeightRequest = 6;

			vbox = new VBox();
			vbox.BorderWidth = 12;
			label = new Gtk.Label ();
			label.UseMarkup = true;
			label.Xalign = 0;
			vbox.PackEnd (progress, false, true, 0);
			vbox.PackEnd (label, false, true, 3);
			this.Add (vbox);
			if (bitmap != null)
				this.Resize (bitmap.Width, bitmap.Height);
		}
开发者ID:nieve,项目名称:monodevelop,代码行数:28,代码来源:SplashScreen.cs

示例4: TopLevelDialog

		public TopLevelDialog ( )
		{
			vbox = new VBox ();
			separator = new HSeparator ();
			buttonBox = new HButtonBox ();
			vbox.PackEnd (buttonBox, false, false, 0);
			vbox.PackEnd (separator, false, false, 0);
			vbox.ShowAll ();
			Add (vbox);
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:10,代码来源:TopLevelDialog.cs

示例5: AddNewWordToDic

        public static void AddNewWordToDic(object sender, EventArgs e)
        {
            var win = new Gtk.Window("Přidej slovo");
            win.SetPosition( WindowPosition.Mouse );
            Label l = new Label();
            l.Text = "Vloží slovo do aktuálně načteného slovníku, avšak nezmění zdroj (např. soubor dic.txt )";

            Entry entry = new Entry();
            Button b = new Button("Přidej");
            VBox vbox = new VBox();
            HBox hbox = new HBox();
            vbox.BorderWidth = 10;

            vbox.PackStart( l );
            vbox.PackEnd( hbox );

            hbox.PackStart( entry );
            hbox.PackEnd( b );

            b.Clicked += delegate {
                game.dictionary.Add( entry.Text );
                win.HideAll();
                win.Destroy();
                win.Dispose();
            };

            win.Add(vbox);
            win.ShowAll();
        }
开发者ID:Kedrigern,项目名称:scrabble,代码行数:29,代码来源:staticWindows.cs

示例6: Clear

		public void Clear ()
		{
			if (contentBox != null)
				contentBox.Destroy ();
			
			noContentLabel = new Label ();
			noContentLabel.Text = noContentMessage;
			noContentLabel.Xalign = 0F;
			noContentLabel.Justify = Justification.Left;
			noContentLabel.SetPadding (6, 6);
			addButton = new Button ();
			addButton.Label = addMessage;
//			addButton.Relief = ReliefStyle.None;
			addButton.Clicked += delegate {
				OnCreateNew (EventArgs.Empty);
			};
			
			contentBox = new VBox ();
			contentBox.PackStart (this.noContentLabel, true, true, 6);
			var hbox = new HBox ();
			hbox.PackStart (addButton, false, false, 0);
			contentBox.PackEnd (hbox, false, false, 0);
			
			PackStart (contentBox, true, true, 6);
			
			ShowAll ();
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:27,代码来源:ExpanderList.cs

示例7: LogAgentPanelWidget

		public LogAgentPanelWidget ()
		{
			global::Stetic.BinContainer.Attach (this);

			var reportingLabel = GettextCatalog.GetString ("Report errors and usage information to help {0} improve my experience.", BrandingService.SuiteName);

			var value = LoggingService.ReportUsage;
			chkUsage = new CheckButton (reportingLabel);
			if (value.HasValue)
				chkUsage.Active = value.Value;
			chkUsage.Toggled += (sender, e) => reportUsage = chkUsage.Active;
			
			container = new Gtk.VBox ();
			container.PackStart (chkUsage, false, false, 0);

			var privacyStatement = BrandingService.PrivacyStatement;
			if (!string.IsNullOrEmpty (privacyStatement)) {
				var privacyLabel = new Xwt.Label { Markup = privacyStatement, Wrap = Xwt.WrapMode.Word };
				container.Add (new HBox ());
				container.PackEnd (privacyLabel.ToGtkWidget (), false, false, 30);
			}
			
			Add (container);
			ShowAll ();
		}
开发者ID:kdubau,项目名称:monodevelop,代码行数:25,代码来源:LogAgentOptionsPanel.cs

示例8: SharpApp

    public SharpApp()
        : base("Fixed")
    {
        SetDefaultSize(300,280);
        SetPosition(WindowPosition.Center);
        ModifyBg(StateType.Normal, new Gdk.Color(10,40,40));
        DeleteEvent += delegate {Application.Quit();};

        try{
            bardejov = new Gdk.Pixbuf("bardejov.jpg");
            rotunda = new Gdk.Pixbuf("rotunda.jpg");
            mincol = new Gdk.Pixbuf("mincol.jpg");
        } catch {
            Console.WriteLine("Images not found");
            Environment.Exit(1);
        }

        Image image1 = new Image(bardejov);
        Image image2 = new Image(rotunda);
        Image image3 = new Image(mincol);

        VBox fix = new VBox(true,4);

        fix.PackStart(image1);
        fix.Pack(image2);
        fix.PackEnd(image3);

        Add(fix);

        ShowAll();
    }
开发者ID:Jimmyscene,项目名称:Random,代码行数:31,代码来源:fixed.cs

示例9: Nim

    public Nim()
        : base("Play Nim!")
    {
        SetDefaultSize(250, 230);
        SetPosition(WindowPosition.Center);
        DeleteEvent += delegate { Application.Quit(); } ;
        ModifyBg(StateType.Normal, new Gdk.Color(0,0,0));
        VBox vbox = new VBox(false, 2);

        Label indicator_text = new Label(indicator);
        Pango.FontDescription fontdesc= Pango.FontDescription.FromString("Times New Roman 15");
        indicator_text.ModifyFont(fontdesc);
        /*
        MenuBar mb = new MenuBar();
        Menu filemenu = new Menu();
        MenuItem file = new MenuItem("File");
        file.Submenu = filemenu;
        mb.Append(file);

        vbox.PackStart(mb, false, false, 0);
        */
        Table table = new Table(3,15,true);
        table.Attach(indicator_text,0,15,0,1);
        for( uint x=1; x<16; x++){
            uint y=x-1;
            table.Attach(new Button(String.Format("{0}",x)),y,x,1,2);
        }
        /*
        table.Attach(new Button("Cls"), 0,1,0,1);
        table.Attach(new Button("Bck"), 1,2,0,1);
        table.Attach(new Label(), 2,3,0,1);
        table.Attach(new Button("Close"),3,4,0,1);

        table.Attach(new Button("7"), 0,1,1,2);
        table.Attach(new Button("8"), 1,2,1,2);
        table.Attach(new Button("9"), 2,3,1,2);
        table.Attach(new Button("/"), 3,4,1,2);

        table.Attach(new Button("4"), 0,1,2,3);
        table.Attach(new Button("5"), 1,2,2,3);
        table.Attach(new Button("6"), 2,3,2,3);
        table.Attach(new Button("*"), 3,4,2,3);

        table.Attach(new Button("1"), 0,1,3,4);
        table.Attach(new Button("2"), 1,2,3,4);
        table.Attach(new Button("3"), 2,3,3,4);
        table.Attach(new Button("-"), 3,4,3,4);

        table.Attach(new Button("0"), 0,1,4,5);
        table.Attach(new Button("."), 1,2,4,5);
        table.Attach(new Button("="), 2,3,4,5);
        table.Attach(new Button("+"), 3,4,4,5);
        */
        //		vbox.PackStart(new Entry(), false, false, 0);
        vbox.PackEnd(table, true, true,0);

        Add(vbox);
        ShowAll();
    }
开发者ID:Jimmyscene,项目名称:Random,代码行数:59,代码来源:Nim.cs

示例10: StyleWindow

        public StyleWindow()
            : base(Gtk.WindowType.Toplevel)
        {
            SetSizeRequest(800, 800);

            var box = new VBox();
            Add(box);

            var tab = new TextTagTable();
            buf = new TextBuffer(tab);
            buf.Text = System.IO.File.ReadAllText("res/theme/gtk.css");
            var en = new TextView(buf);
            sv = new ScrolledWindow();
            sv.Add(en);
            box.PackStart(sv, true, true, 0);

            var cssProvider = new CssProvider();
            StyleContext.AddProviderForScreen(Gdk.Screen.Default, cssProvider, uint.MaxValue - 10);

            var isDefault = true;

            var but = new Button();
            but.Label = "Save";
            but.HeightRequest = 30;
            box.PackEnd(but, false, false, 0);
            but.Clicked += (s, e) => {
                System.IO.File.WriteAllText("res/theme/gtk.css", buf.Text);
            };

            buf.Changed += (s, e) => {
                bool error = false;
                try {
                    //StyleContext.RemoveProviderForScreen(Gdk.Screen.Default, cssProvider);
                    cssProvider.LoadFromData(buf.Text);
                    //StyleContext.AddProviderForScreen(Gdk.Screen.Default, cssProvider, uint.MaxValue - 10);
                } catch (Exception ex) {
                    error = true;
                }
                if (error) {
                    if (!isDefault) {
                        StyleContext.RemoveProviderForScreen(Gdk.Screen.Default, cssProvider);
                        StyleContext.AddProviderForScreen(Gdk.Screen.Default, AppLib.GlobalCssProvider, uint.MaxValue);
                        isDefault = true;
                    }

                } else {
                    if (isDefault) {
                        StyleContext.RemoveProviderForScreen(Gdk.Screen.Default, AppLib.GlobalCssProvider);
                        StyleContext.AddProviderForScreen(Gdk.Screen.Default, cssProvider, uint.MaxValue);
                        isDefault = false;
                    }
                }

            };

            ShowAll();
        }
开发者ID:abanu-desktop,项目名称:abanu,代码行数:57,代码来源:StyleEditor.cs

示例11: Main

        public static void Main(string[] args)
        {
            Application.Init ();
            //MainWindow win = new MainWindow ();
            //win.Show ();
            MoonlightRuntime.Init ();
            Window w = new Window ("mldsp");
            w.DefaultHeight = 520;
            w.DefaultWidth = 760;
            w.DeleteEvent += delegate { Application.Quit (); };

            var moon = new MoonlightHost ();
            var xappath = System.IO.Path.Combine (System.IO.Path.GetDirectoryName (new Uri (typeof (MainClass).Assembly.CodeBase).LocalPath), "mldsp.clr.xap");
            moon.LoadXap (xappath);
            if (args.Length > 0) {
                int device;
                if (int.TryParse (args [0], out device))
                    ((mldsp.App) moon.Application).OutputDeviceID = device;
                else {
                    Console.WriteLine ("WARNING: wrong device ID speficication. Specify an index.");
                    foreach (var dev in PortMidiSharp.MidiDeviceManager.AllDevices)
                        if (dev.IsOutput)
                            Console.WriteLine ("{0} {1}", dev.ID, dev.Name);
                }
            }

            var vbox = new VBox (false, 0);
            w.Add (vbox);
            var mainmenu = new MenuBar ();
            vbox.PackStart (mainmenu, false, true, 0);
            var optmi = new MenuItem ("_Options");
            mainmenu.Add (optmi);
            var devmi = new MenuItem ("Select Device");
            var optmenu = new Menu ();
            optmi.Submenu = optmenu;
            optmenu.Append (devmi);
            var devlist = new SList (IntPtr.Zero);
            var devmenu = new Menu ();
            devmi.Submenu = devmenu;
            foreach (var dev in PortMidiSharp.MidiDeviceManager.AllDevices) {
                if (dev.IsOutput) {
                    var mi = new RadioMenuItem (devlist, dev.Name);
                    mi.Data ["Device"] = dev.ID;
                    devlist = mi.Group;
                    int id = dev.ID;
                    mi.Activated += delegate {
                        ((mldsp.App) moon.Application).ResetDevice ((int) mi.Data ["Device"]);
                    };
                    devmenu.Append (mi);
                }
            }

            vbox.PackEnd (moon);

            w.ShowAll ();
            Application.Run ();
        }
开发者ID:atsushieno,项目名称:mldsp,代码行数:57,代码来源:Main.cs

示例12: IPhoneDeviceConsole

		public IPhoneDeviceConsole () : base ("iPhone Device Console")
		{
			BorderWidth = 6;
			
			//FIXME: persist these values
			DefaultWidth = 400;
			DefaultHeight = 400;
			
			var vbox = new VBox () {
				Spacing = 12
			};
			
			var bbox = new HButtonBox () {
				Layout = ButtonBoxStyle.End,
			};
			
			var closeButton = new Button (Gtk.Stock.Close);
			var reconnectButton = new Button () {
				Label = "Reconnect"
			};
			
			log = new LogView ();
			
			this.Add (vbox);
			vbox.PackEnd (bbox, false, false, 0);
			vbox.PackEnd (log, true, true, 0);
			
			bbox.PackEnd (reconnectButton);
			bbox.PackEnd (closeButton);
			
			closeButton.Clicked += delegate {
				 Destroy ();
			};
			DeleteEvent += delegate {
				Destroy ();
			};
			reconnectButton.Clicked += delegate {
				Disconnect ();
				Connect ();
			};
			
			ShowAll ();
			Connect ();
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:44,代码来源:IPhoneDeviceConsole.cs

示例13: iFolderExceptionDialog

 public iFolderExceptionDialog( Gtk.Window parent,
   System.Exception exception)
     : base()
 {
     this.Title = Util.GS("iFolder Error");
        this.HasSeparator = true;
        this.Resizable = false;
        this.Modal = true;
        this.ex = exception;
        if(parent != null)
     this.TransientFor = parent;
        HBox h = new HBox();
        h.BorderWidth = 10;
        h.Spacing = 10;
        Image i = new Image();
        i.SetFromStock(Gtk.Stock.DialogError, IconSize.Dialog);
        i.SetAlignment(0.5F, 0);
        h.PackStart(i, false, false, 0);
        VBox v = new VBox();
        v.BorderWidth = 10;
        v.Spacing = 10;
        Label l = new Label("<span weight=\"bold\" size=\"larger\">" +
     GLib.Markup.EscapeText(exception.Message) + "</span>");
        l.LineWrap = true;
        l.UseMarkup = true;
        l.UseUnderline = false;
        l.Selectable = true;
        l.Xalign = 0; l.Yalign = 0;
        v.PackStart(l);
        dButton = new Button(Util.GS("Show Details"));
        dButton.Clicked += new EventHandler(ButtonPressed);
        HBox bhbox = new HBox();
        bhbox.PackStart(dButton, false, false, 0);
        v.PackEnd(bhbox, false, false, 0);
        details = new Label(Util.GS("Click \"Show Details\" below to get the full message returned with this error"));
        details.LineWrap = true;
        details.Selectable = true;
        details.Xalign = 0; details.Yalign = 0;
        v.PackEnd(details);
        h.PackEnd(v);
        h.ShowAll();
        this.VBox.Add(h);
        this.AddButton(Stock.Close, ResponseType.Ok);
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:44,代码来源:iFolderExceptionDialog.cs

示例14: Dialog

        public Dialog(VariableSet variables, Variable<int> performed, 
		  Variable<int> total)
            : base("UnitTest", variables)
        {
            var vbox = new VBox(false, 12) {BorderWidth = 12};
              VBox.PackStart(vbox, true, true, 0);

              vbox.PackStart(CreateTestDllButton(), false, false, 0);
              vbox.PackEnd(CreateProgressBar(performed, total));
        }
开发者ID:unhammer,项目名称:gimp-sharp,代码行数:10,代码来源:Dialog.cs

示例15: RecommendationPane

        public RecommendationPane()
        {
            Visible = false;

            EventBox event_box = new EventBox ();
            event_box.ModifyBg(StateType.Normal, new Gdk.Color(0xff,0xff,0xff));

            main_box = new HBox ();
            main_box.BorderWidth = 5;

            similar_box = new VBox (false, 3);
            tracks_box = new VBox (false, 3);
            albums_box = new VBox (false, 3);

            Label similar_header = new Label ();
            similar_header.Xalign = 0;
            similar_header.Ellipsize = Pango.EllipsizeMode.End;
            similar_header.Markup = String.Format ("<b>{0}</b>", Catalog.GetString ("Recommended Artists"));
            similar_box.PackStart (similar_header, false, false, 0);

            tracks_header = new Label ();
            tracks_header.Xalign = 0;
            tracks_header.WidthChars = 25;
            tracks_header.Ellipsize = Pango.EllipsizeMode.End;
            tracks_box.PackStart (tracks_header, false, false, 0);

            albums_header = new Label ();
            albums_header.Xalign = 0;
            albums_header.WidthChars = 25;
            albums_header.Ellipsize = Pango.EllipsizeMode.End;
            albums_box.PackStart (albums_header, false, false, 0);

            similar_items_table = new Table (DEFAULT_SIMILAR_TABLE_ROWS, DEFAULT_SIMILAR_TABLE_COLS, false);
            similar_items_table.SizeAllocated += OnSizeAllocated;
            similar_box.PackEnd (similar_items_table, true, true, 0);

            tracks_items_box = new VBox (false, 0);
            tracks_box.PackEnd (tracks_items_box, true, true, 0);

            albums_items_box = new VBox (false, 0);
            albums_box.PackEnd (albums_items_box, true, true, 0);

            main_box.PackStart (similar_box, true, true, 5);
            main_box.PackStart (new VSeparator (), false, false, 0);
            main_box.PackStart (tracks_box, false, false, 5);
            main_box.PackStart (new VSeparator (), false, false, 0);
            main_box.PackStart (albums_box, false, false, 5);

            event_box.Add (main_box);
            Add (event_box);

            if (!Directory.Exists (CACHE_PATH))
                Directory.CreateDirectory (CACHE_PATH);
        }
开发者ID:jrmuizel,项目名称:banshee-unofficial-plugins,代码行数:54,代码来源:RecommendationPane.cs


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