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


C# RadioButton.Select方法代码示例

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


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

示例1: insertRadioButtons

 private void insertRadioButtons()
 {
     addControl((y11Rb = new RadioButton()), 2, 1, AnchorStyles.None,2, "Year 11");
     addControl((y12Rb = new RadioButton()), 4, 1, AnchorStyles.None,2, "Year 12");
     y11Rb.Click += setSelected;
     y12Rb.Click += setSelected;
     y11Rb.Select();
     clickedRb = y11Rb;
 }
开发者ID:kostacoffee,项目名称:ExamAttend,代码行数:9,代码来源:ExamSetupUI.cs

示例2: makeToolButtons

 private void makeToolButtons(ICollection<ISketchTool> tools)
 {
     int i = 0;
     foreach (ISketchTool tool in tools)
     {
         RadioButton button = new RadioButton();
         button.Appearance = Appearance.Button;
         button.Size = new Size(56, 62);
         button.Location = new Point(5, 10 + i * 62);
         button.Tag = tool;
         button.Text = tool.ToString();
         button.Image = (Image)resourcemanager.GetObject(tool.ToString());
         button.TextAlign = ContentAlignment.TopCenter;
         button.ImageAlign = ContentAlignment.BottomCenter;
         button.Click += this.clickToolButton;
         this.Controls.Add(button);
         if (i == 0) button.Select();
         i++;
     }
 }
开发者ID:jippiedoe,项目名称:Schets,代码行数:20,代码来源:SketchWindow.cs

示例3: maakToolButtons

 private void maakToolButtons(ICollection<ISchetsTool> tools)
 {
     int t = 0;
     foreach (ISchetsTool tool in tools)
     {
         RadioButton b = new RadioButton();
         b.Appearance = Appearance.Button;
         b.Size = new Size(45, 62);
         b.Location = new Point(10 + (t%2)*45, 10 + (t/2) * 62);
         b.Tag = tool;
         b.Text = tool.ToString();
         b.Image = (Image)resourcemanager.GetObject(tool.ToString());
         b.TextAlign = ContentAlignment.TopCenter;
         b.ImageAlign = ContentAlignment.BottomCenter;
         b.Click += this.klikToolButton;
         this.Controls.Add(b);
         if (t == 0) b.Select();
         t++;
     }
 }
开发者ID:arjanadriaanse,项目名称:imp-p3,代码行数:20,代码来源:SchetsWin.cs

示例4: maakToolButtons

 private void maakToolButtons(ICollection<ISchetsTool> tools)
 {
     int t = 0;
     foreach (ISchetsTool tool in tools)
     {
         RadioButton b = new RadioButton();
         b.Appearance = Appearance.Button;
         b.Size = new Size(50, 50);
         if (t % 2 == 0)
         {
             b.Location = new Point(10, 10 + t / 2 * 50);
         }
         else
         {
             b.Location = new Point(60, 10 + t / 2 * 50);
         }
         b.Tag = tool;
         b.Image = (Image)resourcemanager.GetObject(tool.ToString());
         b.ImageAlign = ContentAlignment.MiddleCenter;
         b.Click += this.klikToolButton;
         this.Controls.Add(b);
         if (t == 0) b.Select();
         t++;
     }
 }
开发者ID:spasticVerbalizer,项目名称:SchetsEnScheef,代码行数:25,代码来源:SchetsWin.cs

示例5: CheckedChangedTest

		public void CheckedChangedTest ()
		{
			Form myForm = new Form ();
			myForm.ShowInTaskbar = false;
			RadioButton rButton1 = new RadioButton ();
			rButton1.Select ();
			rButton1.Visible = true;
			myForm.Controls.Add (rButton1);
			rButton1.Checked = false;
			eventhandled = false;
			rButton1.CheckedChanged += new EventHandler (RadioButton_EventHandler);
			rButton1.Checked = true;
			Assert.AreEqual (true, eventhandled, "#3");
			myForm.Dispose ();
		}
开发者ID:Profit0004,项目名称:mono,代码行数:15,代码来源:RadioButtonTest.cs

示例6: ApperanceChangedTest

		public void ApperanceChangedTest ()
		{
			Form myForm = new Form ();
			myForm.ShowInTaskbar = false;
			RadioButton rButton1 = new RadioButton ();
			rButton1.Select ();
			rButton1.Visible = true;
			myForm.Controls.Add (rButton1);
			rButton1.Appearance = Appearance.Normal;
			eventhandled = false;
			rButton1.AppearanceChanged += new EventHandler (RadioButton_EventHandler);
			rButton1.Appearance = Appearance.Button;
			Assert.AreEqual (true, eventhandled, "#2");
			myForm.Dispose ();
		}
开发者ID:Profit0004,项目名称:mono,代码行数:15,代码来源:RadioButtonTest.cs

示例7: PanelClickTest

		public void PanelClickTest ()
		{
			Form myForm = new Form ();
			myForm.ShowInTaskbar = false;
			RadioButton rButton1 = new RadioButton ();
			rButton1.Select ();
			rButton1.Visible = true;
			myForm.Controls.Add (rButton1);
			eventhandled = false;
			rButton1.Click += new EventHandler (RadioButton_EventHandler);
			myForm.Show ();
			rButton1.PerformClick ();
			Assert.AreEqual (true, eventhandled, "#2");
			myForm.Dispose ();
		}
开发者ID:Profit0004,项目名称:mono,代码行数:15,代码来源:RadioButtonTest.cs

示例8: CreateRadioButtons

        /**
         * Creates the line ending radio buttons.
         *
         * @author Rian Drake.
         */
        void CreateRadioButtons()
        {
            m_CR = new RadioButton();
            m_LF = new RadioButton();
            m_CRLF = new RadioButton();

            m_CR.Click += Click_CR;
            m_LF.Click += Click_LF;
            m_CRLF.Click += Click_CRLF;

            int startPos = 129;
            int width = 40;
            int Y = 10;
            m_CR.Location = new Point(startPos, Y);
            m_LF.Location = new Point(startPos + width, Y);
            m_CRLF.Location = new Point(startPos + 2 * width, Y);

            m_CR.Text = "CR";
            m_CR.Width = width;
            m_LF.Text = "LF";
            m_LF.Width = width;
            m_CRLF.Text = "CRLF";
            m_CRLF.Width = width + 20;

            this.Controls.Add(m_CR);
            this.Controls.Add(m_LF);
            this.Controls.Add(m_CRLF);

            string LE = FileCreator.GetGlobalValue("LE");

            if (LE == "0")
            {
                m_CR.Select();

                if (m_CR.Checked == false)
                {
                    m_CR.Select();
                }
            }
            else if(LE == "1")
            {
                m_LF.Select();

                if (m_LF.Checked == false)
                {
                    m_CR.Select();
                }
            }
            else
            {
                m_CRLF.Select();

                if (m_CRLF.Checked == false)
                {
                    m_CR.Select();
                }
            }
        }
开发者ID:riandrake,项目名称:rd_FileCreator,代码行数:63,代码来源:MainForm.cs


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