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

C# Forms.CheckBox类代码示例

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

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



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

示例1: ConnectPathControl

		Control ConnectPathControl()
		{
			var control = new CheckBox { Text = "Connect Paths" };
			control.Bind(cb => cb.Checked, this, r => r.ConnectPath);
			control.CheckedChanged += Refresh;
			return control;
		}
开发者ID:JohnACarruthers,项目名称:Eto,代码行数:7,代码来源:GraphicsPathSection.cs


示例2: RpcServerSettingsManager

        public RpcServerSettingsManager(string title, string rpcUrlHost, ushort rpcUrlPort, bool isProcessHostedLocally)
        {
            Text = title;

            TextBoxRpcUrlHost = new TextBox { Text = rpcUrlHost };
            CheckBoxIsProcessHostedLocally = new CheckBox {
                Text = Desktop.Properties.Resources.OptionsNetworkIsProcessHostedLocally,
                Checked = isProcessHostedLocally
            };

            RpcUrlPort = rpcUrlPort;

            Content = new TableLayout(
                new TableLayout(
                    new TableRow(
                        new Label { Text = Desktop.Properties.Resources.TextHost },
                        new TableCell(TextBoxRpcUrlHost, true),

                        new Separator(SeparatorOrientation.Vertical),

                        new Label { Text = Desktop.Properties.Resources.TextPort },
                        Utilities.CreateNumericUpDown(this, o => o.RpcUrlPort, 0, 1, ushort.MaxValue)
                    )
                ) { Spacing = Utilities.Spacing3 },

                new TableRow(CheckBoxIsProcessHostedLocally)
            ) { Padding = new Padding(Utilities.Padding2), Spacing = Utilities.Spacing3 };
        }
开发者ID:kripod,项目名称:MoneroGui.Net,代码行数:28,代码来源:RpcServerSettingsManager.cs


示例3: CreateTypeControls

		Control CreateTypeControls()
		{
			typeRadio = new RadioButtonList
			{
				Items =
				{ 
					new ListItem { Text = "Form (modeless)", Key = "form" },
					new ListItem { Text = "Dialog (modal)", Key = "dialog" }
				},
				SelectedKey = "form"
			};

			setOwnerCheckBox = new CheckBox { Text = "Set Owner", Checked = false };
			setOwnerCheckBox.CheckedChanged += (sender, e) => 
			{
				if (child != null)
					child.Owner = setOwnerCheckBox.Checked ?? false ? ParentWindow : null;
			};

			return new StackLayout
			{
				Orientation = Orientation.Horizontal,
				Items = { typeRadio, setOwnerCheckBox }
			};
		}
开发者ID:GilbertoBotaro,项目名称:Eto,代码行数:25,代码来源:WindowsSection.cs


示例4: LogEvents

		void LogEvents(CheckBox control)
		{
			control.CheckedChanged += delegate
			{
				Log.Write(control, "CheckedChanged, Value: {0}", control.Checked);
			};
		}
开发者ID:gene-l-thomas,项目名称:Eto,代码行数:7,代码来源:CheckBoxSection.cs


示例5: TreeViewSection

		public TreeViewSection()
		{
			var layout = new DynamicLayout();
			
			layout.BeginHorizontal();
			layout.Add(new Label());
			layout.BeginVertical();
			layout.BeginHorizontal();
			layout.Add(null);
			layout.Add(allowExpanding = new CheckBox{ Text = "Allow Expanding", Checked = true });
			layout.Add(allowCollapsing = new CheckBox{ Text = "Allow Collapsing", Checked = true });
			layout.Add(RefreshButton());
			layout.Add(null);
			layout.EndHorizontal();
			layout.EndVertical();
			layout.EndHorizontal();

			treeView = ImagesAndMenu();

			layout.AddRow(new Label{ Text = "Simple" }, Default());
			layout.BeginHorizontal();
			layout.Add(new Panel());
			layout.BeginVertical();
			layout.AddSeparateRow(InsertButton(), AddChildButton(), RemoveButton(), ExpandButton(), CollapseButton(), null);
			layout.AddSeparateRow(LabelEditCheck(), EnabledCheck(), null);
			layout.EndVertical();
			layout.EndHorizontal();
			layout.AddRow(new Label{ Text = "With Images\n&& Context Menu" }, treeView);
			layout.AddRow(new Panel(), HoverNodeLabel());

			layout.Add(null, false, true);

			Content = layout;
		}
开发者ID:alexandrebaker,项目名称:Eto,代码行数:34,代码来源:TreeViewSection.cs


示例6: TreeGridViewSection

		public TreeGridViewSection()
		{
			var layout = new DynamicLayout();
		
			layout.BeginHorizontal();
			layout.Add(new Label());
			layout.BeginVertical();
			layout.BeginHorizontal();
			layout.Add(null);
			layout.Add(allowExpanding = new CheckBox{ Text = "Allow Expanding", Checked = true });
			layout.Add(allowCollapsing = new CheckBox{ Text = "Allow Collapsing", Checked = true });
			layout.Add(null);
			layout.EndHorizontal();
			layout.EndVertical();
			layout.EndHorizontal();
			
			layout.AddRow(new Label{ Text = "Simple" }, Default());
			
			layout.AddRow(new Label{ Text = "With Images\n&& Context Menu" }, ImagesAndMenu());
			layout.AddRow(new Label{ Text = "Disabled" }, Disabled());
			
			layout.Add(null, false, true);

			Content = layout;
		}
开发者ID:Exe0,项目名称:Eto,代码行数:25,代码来源:TreeGridViewSection.cs


示例7: CloseFiguresControl

		Control CloseFiguresControl()
		{
			var control = new CheckBox { Text = "Close Figures" };
			control.Bind(cb => cb.Checked, this, r => r.CloseFigures);
			control.CheckedChanged += Refresh;
			return control;
		}
开发者ID:JohnACarruthers,项目名称:Eto,代码行数:7,代码来源:GraphicsPathSection.cs


示例8: Default

		Control Default ()
		{
			var control = new CheckBox {
				Text = "Default"
			};
			LogEvents (control);
			return control;
		}
开发者ID:hultqvist,项目名称:Eto,代码行数:8,代码来源:CheckBoxSection.cs


示例9: LogEvents

        protected virtual void LogEvents(CheckBox control)
        {
            control.CheckedChanged += delegate {
                Log.Write (control, "CheckedChanged");
            };

            LogEvents ((Control)control);
        }
开发者ID:M1C,项目名称:Eto,代码行数:8,代码来源:AllControlsBase.cs


示例10: ThreeState

		Control ThreeState ()
		{
			var control = new CheckBox {
				Text = "Three State",
				ThreeState = true
			};
			LogEvents (control);
			return control;
		}
开发者ID:hultqvist,项目名称:Eto,代码行数:9,代码来源:CheckBoxSection.cs


示例11: Disabled

		Control Disabled ()
		{
			var control = new CheckBox {
				Text = "Disabled",
				Enabled = false
			};
			LogEvents (control);
			return control;
		}
开发者ID:hultqvist,项目名称:Eto,代码行数:9,代码来源:CheckBoxSection.cs


示例12: SetInitialValue

		Control SetInitialValue ()
		{
			var control = new CheckBox{
				Text = "Set initial value",
				Checked = true
			};
			LogEvents (control);
			
			return control;
		}
开发者ID:hultqvist,项目名称:Eto,代码行数:10,代码来源:CheckBoxSection.cs


示例13: Init

		void Init()
		{
			_checkBoxIsParamRandom = new CheckBox() { Text = AltStrRes.IsParamRandom };

			var layout = new DynamicLayout { Padding = new Padding(20, 20), Spacing = new Size(10, 10) };
			layout.AddRow(_checkBoxIsParamRandom);
			layout.Add(null);

			Content = layout;
		}
开发者ID:kevins1022,项目名称:Altman,代码行数:10,代码来源:PanelPolicySetting.UI.cs


示例14: ThreeStateInitialValue

		Control ThreeStateInitialValue ()
		{
			var control = new CheckBox {
				Text = "Three State with Initial Value",
				ThreeState = true,
				Checked = null
			};
			LogEvents (control);
			return control;
		}
开发者ID:hultqvist,项目名称:Eto,代码行数:10,代码来源:CheckBoxSection.cs


示例15: Checkbox

		public Control Checkbox()
		{
			var control = new CheckBox
			{
				Text = "Use Offscreen Bitmap",
				Checked = UseOffScreenBitmap,
			};
			control.CheckedChanged += (sender, e) => UseOffScreenBitmap = control.Checked ?? false;
			return control;
		}
开发者ID:gene-l-thomas,项目名称:Eto,代码行数:10,代码来源:TextureBrushesSection2.cs


示例16: Init

        void Init()
        {
            //_textAreaWelcome
	        _textAreaWelcome = new TextArea() {Size = new Size(418, 277), Text = AltStrRes.Disclaimer};
	        _textAreaWelcome.Wrap = true;
	        _textAreaWelcome.Enabled = false;

            //_checkBoxNoDisplay
			_checkBoxNoDisplay = new CheckBox() { Text = AltStrRes.DontDisplayAgain};

            //_buttonNo
			_buttonNo = new Button() { Text = AltStrRes.No};
            _buttonNo.Click += delegate
            {
                if (_checkBoxNoDisplay.Checked == true)
                {
                    _setting.IsShowDisclaimer = false;

                    //保存Setting到xml
					InitWorker.SaveSettingToXml(AppEnvironment.AppPath, _setting);
                    //重新初始化GlobalSetting
					InitWorker.InitGlobalSetting(AppEnvironment.AppPath);
                }
				//Application.Instance.Quit();
				Environment.Exit(0);
            };

            //_buttonYes
	        _buttonYes = new Button() {Text = AltStrRes.Yes};
            _buttonYes.Click += delegate
            {
                if (_checkBoxNoDisplay.Checked == true)
                {
                    _setting.IsShowDisclaimer = false;
                    //保存Setting到xml
					InitWorker.SaveSettingToXml(AppEnvironment.AppPath, _setting);
                    //重新初始化GlobalSetting
					InitWorker.InitGlobalSetting(AppEnvironment.AppPath);
                }
                Close();
            };

            var layout = new DynamicLayout();
            layout.AddRow(_textAreaWelcome);
            layout.AddSeparateRow(_checkBoxNoDisplay,null, _buttonNo, _buttonYes);
            layout.AddRow(null);

            Content = layout;
            Size = new Size(460,370);
			Icon = Icons.AltmanIcon;
			ShowInTaskbar = true;
            Title = AltStrRes.Welcome;
        }
开发者ID:kevins1022,项目名称:Altman,代码行数:53,代码来源:Welcome.cs


示例17: Resizable

		Control Resizable()
		{
			resizableCheckBox = new CheckBox
			{
				Text = "Resizable",
				Checked = true
			};
			resizableCheckBox.CheckedChanged += (sender, e) => {
				if (child != null)
					child.Resizable = resizableCheckBox.Checked ?? false;
			};
			return resizableCheckBox;
		}
开发者ID:JohnACarruthers,项目名称:Eto,代码行数:13,代码来源:WindowsSection.cs


示例18: Init

		void Init()
		{
			_checkBoxIsRandom = new CheckBox { Text = AltStrRes.IsUserAgentRandom };
		    _comboBoxUserAgentList = new ComboBox {Width = 300};

			var layout = new DynamicLayout { Padding = new Padding(20, 20), Spacing = new Size(10, 10) };

			layout.AddRow(_checkBoxIsRandom);
			layout.AddRow(new Label { Text = AltStrRes.UserAgentList });
			layout.AddRow(_comboBoxUserAgentList, null);
			layout.Add(null);

			this.Content = layout;
		}
开发者ID:kevins1022,项目名称:Altman,代码行数:14,代码来源:PanelUserAgentSetting.UI.cs


示例19: DynamicFocusSection

		public DynamicFocusSection()
		{
			var content = new Panel();
			var focusControlCheckBox = new CheckBox { Text = "Focus Control", Checked = true };

			var addContentButton = new Button { Text = "Add Control" };
			var controls = new List<Func<Control>>
			{
				() => new TextBox(),
				() => new TextArea(),
				() => new CheckBox { Text = "A Check Box" },
				() => new RadioButton { Text = "A Radio Button" },
				() => new DropDown { Items = { "Item 1", "Item 2", "Item 3" } },
				() => new DateTimePicker(),
				() => new ColorPicker(),
				() => new PasswordBox(),
				() => new ListBox { Items = { "Item 1", "Item 2", "Item 3" } },
				() => new NumericUpDown(),
			};

			var count = 0;
			addContentButton.Click += (sender, e) =>
			{
				Control control = controls[(count++) % controls.Count]();
				if (focusControlCheckBox.Checked ?? false)
					control.Focus();
				content.Content = new TableLayout(
					null,
					new Label { Text = string.Format("Control: {0}", control.GetType().Name) },
					new TableRow(control),
					null
				);
			};

			Content = new TableLayout
			{
				Spacing = new Size(5, 5),
				Padding = new Padding(10),
				Rows = {
					new StackLayout { Orientation = Orientation.Horizontal, Spacing = 5, Items = { addContentButton, focusControlCheckBox } },
					content
				}
			};
		}
开发者ID:mhusen,项目名称:Eto,代码行数:44,代码来源:DynamicFocusSection.cs


示例20: SplitterSection

		public SplitterSection()
		{
			var layout = new DynamicLayout { DefaultSpacing = new Size(5, 5), Padding = new Padding(10) };
			layout.Add(null);
			var xthemed = new CheckBox { Text = "Use Themed Splitter" };
			layout.AddCentered(xthemed);
			layout.AddSeparateRow(null, Test1WithSize(), Test1AutoSize(), null);
			layout.AddSeparateRow(null, Test1WithFullScreenAndSize(), Test1FullScreenAndAutoSize(), null);
			layout.AddSeparateRow(null, Test2WithSize(), Test2AutoSize(), null);
			layout.AddCentered(TestDynamic());
			layout.AddCentered(TestInitResize());
			layout.AddCentered(TestHiding());
			layout.Add(null);
			Content = layout;

			xthemed.CheckedChanged += (s, e) =>
			{
				useThemed = xthemed.Checked == true;
			};
		}
开发者ID:mhusen,项目名称:Eto,代码行数:20,代码来源:SplitterSection.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Forms.Control类代码示例发布时间:2022-05-24
下一篇:
C# Forms.Button类代码示例发布时间: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