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


C# RadioButton.Init方法代码示例

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


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

示例1: 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

示例2: 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

示例3: InitSkins

		private void InitSkins() {
			pnlSkin = new SideBarPanel(Manager);
			pnlSkin.Init();
			pnlSkin.Passive = true;
			pnlSkin.Parent = sidebar;
			pnlSkin.Left = 16;
			pnlSkin.Width = sidebar.Width - pnlRes.Left;
			pnlSkin.Height = 60;
			pnlSkin.Top = ClientHeight - 16 - pnlStats.Height - pnlSkin.Height - 16;
			pnlSkin.Anchor = EAnchors.Left | EAnchors.Bottom;
			pnlSkin.CanFocus = false;

			rdbDefault = new RadioButton(Manager);
			rdbDefault.Init();
			rdbDefault.Parent = pnlSkin;
			rdbDefault.Left = 8;
			rdbDefault.Width = pnlSkin.Width - rdbDefault.Left * 2;
			rdbDefault.Height = 16;
			rdbDefault.Text = "Default Skin";
			rdbDefault.Top = 8;
			rdbDefault.Checked = Manager.Skin.Name == "Default";
			rdbDefault.Click += new Controls.EventHandler(rdbDefault_Click);

			rdbGreen = new RadioButton(Manager);
			rdbGreen.Init();
			rdbGreen.Parent = pnlSkin;
			rdbGreen.Left = 8;
			rdbGreen.Width = pnlSkin.Width - rdbGreen.Left * 2;
			rdbGreen.Height = 16;
			rdbGreen.Text = "Green Skin";
			rdbGreen.Top = 24;
			rdbGreen.Checked = Manager.Skin.Name == "Green";
			rdbGreen.Click += new Controls.EventHandler(rdbGreen_Click);
			rdbGreen.Enabled = true;

			rdbRed = new RadioButton(Manager);
			rdbRed.Init();
			rdbRed.Parent = pnlSkin;
			rdbRed.Left = 8;
			rdbRed.Width = pnlSkin.Width - rdbGreen.Left * 2;
			rdbRed.Height = 16;
			rdbRed.Text = "Red Skin";
			rdbRed.Top = 40;
			rdbRed.Checked = Manager.Skin.Name == "Red";
			rdbRed.Click += new Controls.EventHandler(rdbRed_Click);
			rdbRed.Enabled = true;
		}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:47,代码来源:MainWindow.cs


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