码迷,mamicode.com
首页 > 其他好文 > 详细

radioButton& listBox&numericUpDown 操作

时间:2017-09-29 00:10:55      阅读:122      评论:0      收藏:0      [点我收藏+]

标签:image   alt   down   man   blog   change   add   send   images   

技术分享

private void numericUpDown1_ValueChanged(object sender, EventArgs e)
{
if (numericUpDown1.Value == 1)
radioButton1.Checked = true;
if (numericUpDown1.Value == 2)
radioButton2.Checked = true;
if (numericUpDown1.Value == 3)
radioButton3.Checked = true;

}

private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
if (radioButton1.Checked)
numericUpDown1.Value = 1;
}

private void radioButton2_CheckedChanged(object sender, EventArgs e)
{
if (radioButton2.Checked)
numericUpDown1.Value = 2;
}

private void radioButton3_CheckedChanged(object sender, EventArgs e)
{
if (radioButton3.Checked)
numericUpDown1.Value = 3;
}

private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if (checkBox1.Checked)
listBox2.Items.Add("English");
else
listBox2.Items.Remove("English");
}

private void checkBox2_CheckedChanged(object sender, EventArgs e)
{
if (checkBox2.Checked)
listBox2.Items.Add("German");
else
listBox2.Items.Remove("German");

}

private void checkBox3_CheckedChanged(object sender, EventArgs e)
{
if (checkBox3.Checked)
listBox2.Items.Add("French");
else
listBox2.Items.Remove("French");
}

radioButton& listBox&numericUpDown 操作

标签:image   alt   down   man   blog   change   add   send   images   

原文地址:http://www.cnblogs.com/silvia-z/p/7609034.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!