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


C# CheckBox.Init方法代码示例

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


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

示例1: TaskControls

		public TaskControls(Manager manager)
			: base(manager) {
			MinimumWidth = 340;
			MinimumHeight = 140;
			Height = 480;
			Center();
			Text = "Controls Test";

			TopPanel.Visible = true;
			Caption.Text = "Information";
			Description.Text = "Demonstration of various controls available in Window Library";
			Caption.TextColor = Description.TextColor = new Color(96, 96, 96);

			grpEdit = new GroupPanel(Manager);
			grpEdit.Init();
			grpEdit.Parent = this;
			grpEdit.Anchor = EAnchors.Left | EAnchors.Top | EAnchors.Right;
			grpEdit.Width = ClientWidth - 200;
			grpEdit.Height = 160;
			grpEdit.Left = 8;
			grpEdit.Top = TopPanel.Height + 8;
			grpEdit.Text = "EditBox";

			pnlControls = new Panel(Manager);
			pnlControls.Init();
			pnlControls.Passive = true;
			pnlControls.Parent = this;
			pnlControls.Anchor = EAnchors.Left | EAnchors.Top | EAnchors.Right;
			pnlControls.Left = 8;
			pnlControls.Top = grpEdit.Top + grpEdit.Height + 8;
			pnlControls.Width = ClientWidth - 200;
			pnlControls.Height = BottomPanel.Top - 32 - pnlControls.Top;
			pnlControls.BevelBorder = EBevelBorder.All;
			pnlControls.BevelMargin = 1;
			pnlControls.BevelStyle = EBevelStyle.Etched;
			pnlControls.Color = Color.Transparent;

			lblEdit = new Label(manager);
			lblEdit.Init();
			lblEdit.Parent = grpEdit;
			lblEdit.Left = 16;
			lblEdit.Top = 8;
			lblEdit.Text = "Testing field:";
			lblEdit.Width = 128;
			lblEdit.Height = 16;

			txtEdit = new TextBox(manager);
			txtEdit.Init();
			txtEdit.Parent = grpEdit;
			txtEdit.Left = 16;
			txtEdit.Top = 24;
			txtEdit.Width = grpEdit.ClientWidth - 32;
			txtEdit.Height = 20;
			txtEdit.Anchor = EAnchors.Left | EAnchors.Top | EAnchors.Right | EAnchors.Bottom;
			txtEdit.Text = "Text";

			rdbNormal = new RadioButton(manager);
			rdbNormal.Init();
			rdbNormal.Parent = grpEdit;
			rdbNormal.Left = 16;
			rdbNormal.Top = 52;
			rdbNormal.Width = grpEdit.ClientWidth - 32;
			rdbNormal.Anchor = EAnchors.Left | EAnchors.Bottom | EAnchors.Right;
			rdbNormal.Checked = true;
			rdbNormal.Text = "Normal mode";
			rdbNormal.ToolTip.Text = "Enables normal mode for TextBox control.";
			rdbNormal.CheckedChanged += new GodLesZ.Library.XNA.WindowLibrary.Controls.EventHandler(ModeChanged);

			rdbPassword = new RadioButton(manager);
			rdbPassword.Init();
			rdbPassword.Parent = grpEdit;
			rdbPassword.Left = 16;
			rdbPassword.Top = 68;
			rdbPassword.Width = grpEdit.ClientWidth - 32;
			rdbPassword.Anchor = EAnchors.Left | EAnchors.Bottom | EAnchors.Right;
			rdbPassword.Checked = false;
			rdbPassword.Text = "Password mode";
			rdbPassword.ToolTip.Text = "Enables password mode for TextBox control.";
			rdbPassword.CheckedChanged += new GodLesZ.Library.XNA.WindowLibrary.Controls.EventHandler(ModeChanged);

			chkBorders = new CheckBox(manager);
			chkBorders.Init();
			chkBorders.Parent = grpEdit;
			chkBorders.Left = 16;
			chkBorders.Top = 96;
			chkBorders.Width = grpEdit.ClientWidth - 32;
			chkBorders.Anchor = EAnchors.Left | EAnchors.Bottom | EAnchors.Right;
			chkBorders.Checked = false;
			chkBorders.Text = "Borderless mode";
			chkBorders.ToolTip.Text = "Enables or disables borderless mode for TextBox control.";
			chkBorders.CheckedChanged += new GodLesZ.Library.XNA.WindowLibrary.Controls.EventHandler(chkBorders_CheckedChanged);

			chkReadOnly = new CheckBox(manager);
			chkReadOnly.Init();
			chkReadOnly.Parent = grpEdit;
			chkReadOnly.Left = 16;
			chkReadOnly.Top = 110;
			chkReadOnly.Width = grpEdit.ClientWidth - 32;
			chkReadOnly.Anchor = EAnchors.Left | EAnchors.Bottom | EAnchors.Right;
			chkReadOnly.Checked = false;
//.........这里部分代码省略.........
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:101,代码来源:TaskControls.cs

示例2: CreateCheckbox

        /// <summary>
        /// Create a checkbox for a particular squad
        /// </summary>
        private static CheckBox CreateCheckbox(Manager manager, string text, int squadIndex)
        {
            CheckBox checkBox = new CheckBox(manager);
            checkBox.Init();
            checkBox.Margins = new Margins(3);
            checkBox.Width = 232;
            checkBox.Height = 20;
            checkBox.Text = text;
            checkBox.Tag = squadIndex;
            checkBox.Checked = true;
            checkBox.Anchor = Anchors.Top | Anchors.Horizontal;

            return checkBox;
        }
开发者ID:Rfvgyhn,项目名称:gnomoriamods,代码行数:17,代码来源:SpecifyAttackSquad.cs

示例3: InitRes

		private void InitRes() {
			pnlRes = new SideBarPanel(Manager);
			pnlRes.Init();
			pnlRes.Passive = true;
			pnlRes.Parent = sidebar;
			pnlRes.Left = 16;
			pnlRes.Top = 16;
			pnlRes.Width = sidebar.Width - pnlRes.Left;
			pnlRes.Height = 86;
			pnlRes.CanFocus = false;

			rdbRes1024 = new RadioButton(Manager);
			rdbRes1024.Init();
			rdbRes1024.Parent = pnlRes;
			rdbRes1024.Left = 8;
			rdbRes1024.Width = pnlRes.Width - rdbRes1024.Left * 2;
			rdbRes1024.Height = 16;
			rdbRes1024.Text = "Resolution 1024x768";
			rdbRes1024.Top = 8;
			rdbRes1024.Checked = true;

			rdbRes1280 = new RadioButton(Manager);
			rdbRes1280.Init();
			rdbRes1280.Parent = pnlRes;
			rdbRes1280.Left = rdbRes1024.Left;
			rdbRes1280.Width = rdbRes1024.Width;
			rdbRes1280.Height = rdbRes1024.Height;
			rdbRes1280.Text = "Resolution 1280x1024";
			rdbRes1280.Top = 24;

			rdbRes1680 = new RadioButton(Manager);
			rdbRes1680.Init();
			rdbRes1680.Parent = pnlRes;
			rdbRes1680.Left = rdbRes1024.Left;
			rdbRes1680.Width = rdbRes1024.Width;
			rdbRes1680.Height = rdbRes1024.Height;
			rdbRes1680.Text = "Resolution 1680x1050";
			rdbRes1680.Top = 40;

			chkResFull = new CheckBox(Manager);
			chkResFull.Parent = pnlRes;
			chkResFull.Init();
			chkResFull.Left = rdbRes1024.Left;
			chkResFull.Width = rdbRes1024.Width;
			chkResFull.Height = rdbRes1024.Height;
			chkResFull.Text = "Fullscreen Mode";
			chkResFull.Top = 64;

			btnApply = new Button(Manager);
			btnApply.Init();
			btnApply.Width = 80;
			btnApply.Parent = sidebar;
			btnApply.Left = pnlRes.Left;
			btnApply.Top = pnlRes.Top + pnlRes.Height + 8;
			btnApply.Text = "Apply";
			btnApply.Click += new Controls.EventHandler(btnApply_Click);

			btnExit = new Button(Manager);
			btnExit.Init();
			btnExit.Width = 80;
			btnExit.Parent = sidebar;
			btnExit.Left = btnApply.Left + btnApply.Width + 8;
			btnExit.Top = pnlRes.Top + pnlRes.Height + 8;
			btnExit.Text = "Exit";
			btnExit.Click += new Controls.EventHandler(btnExit_Click);
		}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:66,代码来源:MainWindow.cs


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