• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# VBox类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: MainView

        public MainView(IPresenterFactory presenterFactory)
        {
            _notebook = presenterFactory.InstantiatePresenter<MainNotebook>();
            _notebook.Add(presenterFactory.InstantiatePresenter<MenuPageView>(this));
            _notebook.Add(presenterFactory.InstantiatePresenter<ModsPageView>(this));
            _notebook.Add(presenterFactory.InstantiatePresenter<BlueprintsPageView>(this));
            _notebook.Add(presenterFactory.InstantiatePresenter<SavegamesPageView>(this));
            _notebook.Add(presenterFactory.InstantiatePresenter<TasksPageView>(this));

            PackStart(presenterFactory.InstantiatePresenter<MainHeaderView>());

            var sideBox = new VBox
            {
                MinWidth = 280,
                WidthRequest = 280
            };

            _sidebarContainer = new SidebarContainer();
            sideBox.PackStart(_sidebarContainer, true, true);
            var box = new HBox();

            box.PackStart(_notebook, true);
            box.PackEnd(sideBox);

            PackStart(box, true, true);

            _notebook.HandleSizeChangeOnTabChange = true;
            _notebook.HandleSizeUpdate();
        }
开发者ID:ParkitectNexus,项目名称:ParkitectNexusClient,代码行数:29,代码来源:MainView.cs


示例2: DependenciesSectionWidget

		public DependenciesSectionWidget (IConfigurationSection section) 
		{
			this.section = section;

			widget = new VBox ();

			if (this.section.Service.Dependencies.Length == 0) {
				widget.PackStart (new Label { Text = GettextCatalog.GetString ("This service has no dependencies") });
				return;
			}

			bool firstCategory = true;

			foreach (var category in this.section.Service.Dependencies.Select (d => d.Category).Distinct ()) {
				var categoryIcon = new ImageView (category.Icon.WithSize (IconSize.Small));
				var categoryLabel = new Label (category.Name);
				var categoryBox = new HBox ();

				if (!firstCategory)
					categoryBox.MarginTop += 5;

				categoryBox.PackStart (categoryIcon);
				categoryBox.PackStart (categoryLabel);
				widget.PackStart (categoryBox);

				foreach (var dependency in this.section.Service.Dependencies.Where (d => d.Category == category)) {
					widget.PackStart (new DependencyWidget (section.Service, dependency) {
						MarginLeft = category.Icon.Size.Width / 2
					});
				}

				if (firstCategory)
					firstCategory = false;
			}
		}
开发者ID:kdubau,项目名称:monodevelop,代码行数:35,代码来源:DependenciesSectionWidget.cs


示例3: SpecialWidget

		public SpecialWidget ()
		{
			VBox bl = new VBox () { Spacing = 0 };
			bl.BackgroundColor = Colors.Gray;
			bl.PackStart (new Label ("Hi there"));
			Content = bl;
		}
开发者ID:m13253,项目名称:xwt,代码行数:7,代码来源:Boxes.cs


示例4: InitializeComponent

        private void InitializeComponent()
        {
            Width = 550;
            Height = 600;
            //Location = WindowLocation.CenterScreen;

            vbox2 = new VBox();
            vbox2.Visible = true;
            vbox2.Spacing = 3;

            notebook1 = new Notebook();
            notebook1.Visible = true;
            notebook1.CanGetFocus = true;

            image1 = new ImageView();
            string file = FileHelper.FindSupportFile("bygfoot_splash.png", false);
            image1.Image = Image.FromFile(file);

            treeview_splash_contributors = new TreeView();

            scrolledwindow2 = new ScrollView();
            scrolledwindow2.Content = treeview_splash_contributors;

            notebook1.Add(image1, "");
            notebook1.Add(scrolledwindow2, "");
            vbox2.PackStart(notebook1);

            Content = vbox2;
        }
开发者ID:kashifsoofi,项目名称:bygfoot,代码行数:29,代码来源:SplashWindow.xwt.cs


示例5: GenerateFrameContents

		VBox GenerateFrameContents (bool useMnemonics)
		{
			var statusText = useMnemonics ? "with mnemonic" : "without mnemonic";
			var vbox = new VBox ();

			var button = new Button ("_Button");
			button.UseMnemonic = useMnemonics;
			button.Clicked += (sender, e) => MessageDialog.ShowMessage (string.Format ("Button {0} clicked.", statusText));
			vbox.PackStart (button);

			var toggleButton = new ToggleButton ("_Toggle Button");
			toggleButton.UseMnemonic = useMnemonics;
			toggleButton.Clicked += (sender, e) => MessageDialog.ShowMessage (string.Format ("Toggle Button {0} clicked.", statusText));
			vbox.PackStart (toggleButton);

			var menuButton = new MenuButton ("_Menu Button");
			menuButton.UseMnemonic = useMnemonics;
			menuButton.Label = "_Menu Button";
			var firstMenuItem = new MenuItem ("_First");
			firstMenuItem.UseMnemonic = useMnemonics;
			firstMenuItem.Clicked += (sender, e) => MessageDialog.ShowMessage (string.Format ("First Menu Item {0} clicked.", statusText));
			var secondMenuItem = new MenuItem ("_Second");
			secondMenuItem.UseMnemonic = useMnemonics;
			secondMenuItem.Clicked += (sender, e) => MessageDialog.ShowMessage (string.Format ("Second Menu Item {0} clicked.", statusText));
			var menu = new Menu ();
			menu.Items.Add (firstMenuItem);
			menu.Items.Add (secondMenuItem);
			menuButton.Menu = menu;
			vbox.PackStart (menuButton);

			return vbox;
		}
开发者ID:m13253,项目名称:xwt,代码行数:32,代码来源:Mnemonics.cs


示例6: RadioButtonSample

		public RadioButtonSample ()
		{
			var b1 = new RadioButton ("Item 1");
			var b2 = new RadioButton ("Item 2 (red background)");
			b2.BackgroundColor = Xwt.Drawing.Colors.Red;
			var b3 = new RadioButton ("Item 3");
			b2.Group = b3.Group = b1.Group;
			PackStart (b1);
			PackStart (b2);
			PackStart (b3);

			var la = new Label ();
			la.Hide ();
			b1.Group.ActiveRadioButtonChanged += delegate {
				la.Show ();
				la.Text = "Active: " + b1.Group.ActiveRadioButton.Label;
			};
			PackStart (la);

			PackStart (new HSeparator ());

			var box = new VBox ();
			box.PackStart (new Label ("First Option"));
			box.PackStart (new Label ("Second line"));

			var b4 = new RadioButton (box);
			var b5 = new RadioButton ("Second Option");
			var b6 = new RadioButton ("Disabled Option") { Sensitive = false };
			PackStart (b4);
			PackStart (b5);
			PackStart (b6);
			b4.Group = b5.Group = b6.Group;
		}
开发者ID:m13253,项目名称:xwt,代码行数:33,代码来源:RadioButtonSample.cs


示例7: InitializeComponent

        private void InitializeComponent()
        {
            vbox28 = new VBox();

            this.Width = 300;
            //this.Location = WindowLocation.CenterParent;
        }
开发者ID:kashifsoofi,项目名称:bygfoot,代码行数:7,代码来源:ProgressWindow.xwt.cs


示例8: RadioButtonSample

        public RadioButtonSample()
        {
            var b1 = new RadioButton ("Item 1");
            var b2 = new RadioButton ("Item 2");
            var b3 = new RadioButton ("Item 3");
            b2.Group = b3.Group = b1.Group;
            PackStart (b1);
            PackStart (b2);
            PackStart (b3);

            var la = new Label ();
            la.Hide ();
            b1.Group.ActiveRadioButtonChanged += delegate {
                la.Show ();
                la.Text = "Active: " + b1.Group.ActiveRadioButton.Label;
            };
            PackStart (la);

            PackStart (new HSeparator ());

            var box = new VBox ();
            box.PackStart (new Label ("First Option"));
            box.PackStart (new Label ("Second line"));

            var b4 = new RadioButton (box);
            var b5 = new RadioButton ("Second Option");
            PackStart (b4);
            PackStart (b5);
            b4.Group = b5.Group;
        }
开发者ID:Gaushick,项目名称:xwt,代码行数:30,代码来源:RadioButtonSample.cs


示例9: Build

        private void Build()
        {
            this.Icon = Xwt.Drawing.Image.FromResource("URMSimulator.Resources.urm.png");
            this.Title = "About";
            this.Resizable = false;
            this.Buttons.Add(new DialogButton(Command.Close));

            vbox1 = new VBox();

            image1 = new ImageView();
            image1.WidthRequest = 320;
            image1.HeightRequest = 270;
            vbox1.PackStart(image1);

            labelProgramName = new Label();
            labelProgramName.TextAlignment = Alignment.Center;
            vbox1.PackStart(labelProgramName);

            labelComments = new Label();
            labelComments.TextAlignment = Alignment.Center;
            vbox1.PackStart(labelComments);

            hbox1 = new HBox();

            hbox1.PackStart(new HBox(), true);

            labelWebsite = new LinkLabel();
            labelWebsite.TextAlignment = Alignment.Center; //text aligment doesn't work with Xwt.WPF
            hbox1.PackStart(labelWebsite, false);

            hbox1.PackStart(new HBox(), true);
            vbox1.PackStart(hbox1);

            this.Content = vbox1;
        }
开发者ID:cra0zy,项目名称:URMSimulator,代码行数:35,代码来源:AboutDialog.GUI.cs


示例10: ReliefFrameSample

 public ReliefFrameSample()
 {
     var box = new VBox ();
     box.PackStart (new ReliefFrame (new Button ("Hello")));
     box.PackStart (new ReliefFrame (new Button ("World")));
     PackStart (box);
 }
开发者ID:pabloescribano,项目名称:xwt,代码行数:7,代码来源:ReliefFrameSample.cs


示例11: LauncherWindow

        public LauncherWindow()
        {
            this.Title = "TrueCraft Launcher";
            this.Width = 1200;
            this.Height = 576;
            this.User = new TrueCraftUser();

            MainContainer = new HBox();
            WebScrollView = new ScrollView();
            WebView = new WebView("http://truecraft.io/updates");
            LoginView = new LoginView(this);
            OptionView = new OptionView(this);
            MultiplayerView = new MultiplayerView(this);
            SingleplayerView = new SingleplayerView(this);
            InteractionBox = new VBox();

            using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("TrueCraft.Launcher.Content.truecraft_logo.svg"))
                TrueCraftLogoImage = new ImageView(Image.FromStream(stream));

            WebScrollView.Content = WebView;
            MainContainer.PackStart(WebScrollView, true);
            InteractionBox.PackStart(TrueCraftLogoImage);
            InteractionBox.PackEnd(LoginView);
            MainContainer.PackEnd(InteractionBox);

            this.Content = MainContainer;
        }
开发者ID:prodigeni,项目名称:TrueCraft,代码行数:27,代码来源:LauncherWindow.cs


示例12: MyTestWidget

        public MyTestWidget()
        {
            PackStart(new TextEntry() { PlaceholderText = "Placeholder Test" });
            PackStart(new Label("Scrollable Test:"));

            VBox ContentData = new VBox()
            {
                ExpandHorizontal = true,
                ExpandVertical = true
            };

            ScrollView ContentScroll = new ScrollView()
            {
                Content = ContentData,
                ExpandHorizontal = true,
                ExpandVertical = true
            };
            PackStart(ContentScroll, true, true);

            ContentData.PackStart(new TextEntry() { PlaceholderText = "Placeholder Test" }, true, true);
            ContentData.PackStart(new TextEntry(), true, true);
            ContentData.PackStart(new TextEntry() { PlaceholderText = "Placeholder Test" }, true, true);
            ContentData.PackStart(new TextEntry(), true, true);
            ContentData.PackStart(new TextEntry() { PlaceholderText = "Placeholder Test" }, true, true);
            ContentData.PackStart(new MyWidget(), true, true);
            ContentData.PackStart(new TextEntry() { PlaceholderText = "Placeholder Test" }, true, true);
            ContentData.PackStart(new TextEntry(), true, true);
            ContentData.PackStart(new TextEntry() { PlaceholderText = "Placeholder Test" }, true, true);
            ContentData.PackStart(new TextEntry(), true, true);
            ContentData.PackStart(new TextEntry() { PlaceholderText = "Placeholder Test" }, true, true);
            ContentData.PackStart(new TextEntry(), true, true);
        }
开发者ID:sergueik,项目名称:xwt_swd,代码行数:32,代码来源:Unsorted.cs


示例13: BuildGui

        void BuildGui()
        {
            this.Title = GettextCatalog.GetString("Select Work Item");
            VBox content = new VBox();
            HBox mainBox = new HBox();
            queryView.Columns.Add(new ListViewColumn(string.Empty, new TextCellView(titleField)));
            queryView.DataSource = queryStore;
            queryView.WidthRequest = 200;
            BuildQueryView();
            mainBox.PackStart(queryView);

            workItemList.WidthRequest = 400;
            workItemList.HeightRequest = 400;
            workItemList.ShowCheckboxes = true;

            mainBox.PackStart(workItemList, true, true);

            content.PackStart(mainBox, true, true);

            HBox buttonBox = new HBox();

            Button okButton = new Button(GettextCatalog.GetString("Ok"));
            okButton.WidthRequest = Constants.ButtonWidth;
            okButton.Clicked += (sender, e) => Respond(Command.Ok);
            buttonBox.PackEnd(okButton);

            content.PackStart(buttonBox);
            //this.Resizable = false;
            this.Content = content;

            AttachEvents();
        }
开发者ID:Indomitable,项目名称:monodevelop-tfs-addin,代码行数:32,代码来源:SelectWorkItemDialog.cs


示例14: DialogWidget

            public DialogWidget(params object[]data)
                : base()
            {
                box = new VBox ();
                actionArea = new HButtonBox ();
                actionArea.LayoutStyle = ButtonBoxStyle.End;
                buttons = new Button[data.Length / 2];
                response_ids = new int[data.Length / 2];

                for (int i = 0; i < data.Length; i += 2)
                  {
                      Button button =
                          new Button (data[i] as
                                  string);
                        button.Clicked += OnClicked;
                        actionArea.PackStart (button,
                                  false,
                                  false, 4);
                        buttons[i / 2] = button;
                        response_ids[i / 2] =
                          (int) data[i + 1];
                  }

                PackStart (box, true, true, 4);
                  PackStart (actionArea, false, true, 4);
                  ShowAll ();
            }
开发者ID:BackupTheBerlios,项目名称:csboard-svn,代码行数:27,代码来源:ICSConfigWidget.cs


示例15: Splash

        public Splash()
        {
            Decorated = false;
            ShowInTaskbar = false;
            box = new VBox {
                Margin = -2,
            };
            imageView = new ImageView {
                Image = Image.FromResource (Resources.Splash),
            };
            progressBar = new ProgressBar {
                Indeterminate = true,
                TooltipText = Catalog.GetString ("Loading..."),
            };
            info = new Label {
                Text = Catalog.GetString ("Loading..."),
                TextAlignment = Alignment.Center,
            };
            box.PackStart (imageView);
            box.PackEnd (progressBar);
            box.PackEnd (info);

            Content = box;

            InitialLocation = WindowLocation.CenterScreen;
        }
开发者ID:hamekoz,项目名称:hamekoz-sharp,代码行数:26,代码来源:Splash.cs


示例16: PipelineController

        /// <summary>
        /// Initializes a new instance of the <see cref="Baimp.PipelineController"/> class.
        /// </summary>
        /// <param name="project">Project.</param>
        /// <param name="pipelineShelf">Frame where the pipeline should be.</param>
        public PipelineController(Project project, VBox pipelineShelf)
        {
            this.pipelineShelf = pipelineShelf;

            pipelineScroller = new ScrollView();
            pipelineScroller.Content = currentPipeline;

            this.project = project;
            OnProjectDataChangged(new ProjectChangedEventArgs(null) { refresh = true });

            InitializeControllerbar();
            splitControllTab_pipelineScroller.PackEnd(pipelineScroller, true, true);

            algorithm = new AlgorithmTreeView(project.scanCollection);
            algorithm.MinWidth = 200; // TODO, save size as user property

            HPaned splitPipeline_Algorithm = new HPaned();
            splitPipeline_Algorithm.Panel1.Content = algorithm;
            splitPipeline_Algorithm.Panel1.Resize = false;
            splitPipeline_Algorithm.Panel1.Shrink = false;
            splitPipeline_Algorithm.Panel2.Content = splitControllTab_pipelineScroller;
            splitPipeline_Algorithm.Panel2.Resize = true;
            splitPipeline_Algorithm.Panel2.Shrink = false;

            pipelineShelf.PackStart(splitPipeline_Algorithm, true, true);

            InitializeEvents();
        }
开发者ID:jfreax,项目名称:BAIMP,代码行数:33,代码来源:PipelineController.cs


示例17: ExecutionModeSelectorDialog

		public ExecutionModeSelectorDialog ()
		{
			Title = GettextCatalog.GetString ("Execution Mode Selector");
			
			Width = 500;
			Height = 400;

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

			box.PackStart (new Label (GettextCatalog.GetString ("Run Configurations:")));
		
			listConfigs = new RunConfigurationsList ();
			box.PackStart (listConfigs, true);

			box.PackStart (new Label (GettextCatalog.GetString ("Execution Modes:")));

			storeModes = new TreeStore (modeNameField, modeField, modeSetField);
			treeModes = new TreeView (storeModes);
			treeModes.HeadersVisible = false;
			treeModes.Columns.Add (GettextCatalog.GetString ("Name"), modeNameField);
			box.PackStart (treeModes, true);

			runButton = new DialogButton (new Command ("run", GettextCatalog.GetString ("Run")));

			Buttons.Add (Command.Cancel);
			Buttons.Add (runButton);

			listConfigs.SelectionChanged += (sender, e) => LoadModes ();
			treeModes.SelectionChanged += OnModeChanged;
		}
开发者ID:sushihangover,项目名称:monodevelop,代码行数:31,代码来源:ExecutionModeSelectorDialog.cs


示例18: PopulateViewBoxWithTitle

 protected virtual void PopulateViewBoxWithTitle(VBox vBox, IAsset asset)
 {
     var title = new Label(asset.Name)
     {
         Font = Font.SystemFont.WithSize(17.5).WithWeight(FontWeight.Bold)
     };
     vBox.PackStart(title);
 }
开发者ID:ParkitectNexus,项目名称:ParkitectNexusClient,代码行数:8,代码来源:AssetsPageView.cs


示例19: CreateButtons

 void CreateButtons(HPaned panel)
 {
     var panel2 = panel.Panel2;
     var box = new VBox ();
     panel2.Content = box;
     box.PackStart (CreateConnectButton ());
     box.PackStart (CreateListenButton ());
 }
开发者ID:stangelandcl,项目名称:Actors,代码行数:8,代码来源:MainWindow.cs


示例20: MainWindow

        public MainWindow()
        {
            Menu menu = new Menu ();

            var file = new MenuItem ("File");
            file.SubMenu = new Menu ();
            file.SubMenu.Items.Add (new MenuItem ("Open"));
            file.SubMenu.Items.Add (new MenuItem ("New"));
            file.SubMenu.Items.Add (new MenuItem ("Close"));
            menu.Items.Add (file);

            var edit = new MenuItem ("Edit");
            edit.SubMenu = new Menu ();
            edit.SubMenu.Items.Add (new MenuItem ("Copy"));
            edit.SubMenu.Items.Add (new MenuItem ("Cut"));
            edit.SubMenu.Items.Add (new MenuItem ("Paste"));
            menu.Items.Add (edit);

            MainMenu = menu;

            HBox box = new HBox ();

            icon = Image.FromResource (typeof(App), "class.png");

            store = new TreeStore (nameCol, iconCol, widgetCol);
            samplesTree = new TreeView ();
            samplesTree.Columns.Add ("Name", iconCol, nameCol);

            AddSample (null, "Boxes", typeof(Boxes));
            AddSample (null, "Buttons", typeof(ButtonSample));
            AddSample (null, "ComboBox", typeof(ComboBoxes));
            //			AddSample (null, "Designer", typeof(Designer));
            AddSample (null, "Drag & Drop", typeof(DragDrop));
            var n = AddSample (null, "Drawing", null);
            AddSample (n, "Canvas with Widget", typeof(CanvasWithWidget));
            AddSample (n, "Chart", typeof(ChartSample));
            AddSample (n, "Transformations", typeof(DrawingTransforms));
            AddSample (null, "Images", typeof(Images));
            AddSample (null, "List View", typeof(ListView1));
            AddSample (null, "Notebook", typeof(NotebookSample));
            //			AddSample (null, "Scroll View", typeof(ScrollWindowSample));
            AddSample (null, "Text Entry", typeof(TextEntries));
            AddSample (null, "Windows", typeof(Windows));

            samplesTree.DataSource = store;

            box.PackStart (samplesTree);

            sampleBox = new VBox ();
            title = new Label ("Sample:");
            sampleBox.PackStart (title, BoxMode.None);

            box.PackStart (sampleBox, BoxMode.FillAndExpand);

            Content = box;

            samplesTree.SelectionChanged += HandleSamplesTreeSelectionChanged;
        }
开发者ID:carlosalberto,项目名称:xwt,代码行数:58,代码来源:MainWindow.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# VCConfiguration类代码示例发布时间:2022-05-24
下一篇:
C# VBAParser类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap