学习就是不断尝试,不断实验,不断修改... ...

学习就是不断尝试,不断实验,不断修改... ...

虽然是个简单程序  但是可以要尽力做到完美。。。 电商要做的就是更好的用户体验

 1 private void button2_Click(object sender, EventArgs e)
2 {
3 textBox1.Clear();
4 textBox2.Clear();
5 textBox1.Focus();
6 radioButton1.Checked = false;
7 radioButton2.Checked = false;
8 label3.Text = "";
9 }
10
11 private void button1_Click(object sender, EventArgs e)
12 {
13 if ((textBox1.Text == "") || (textBox2.Text == ""))
14 MessageBox.Show("please input information.");
15 if (int.Parse(textBox2.Text) > 100 || int.Parse(textBox2.Text) < 0)
16 MessageBox.Show("wrong score!!!");
17 else if (radioButton1.Checked)
18 label3.Text = textBox1.Text + "'" + radioButton1.Text + " score is: " + textBox2.Text.ToString();
19 else if (radioButton2.Checked)
20 label3.Text = textBox1.Text + "'" + radioButton2.Text + " score is: " + textBox2.Text.ToString();
21 else
22 MessageBox.Show("choose the subject.");

学习就是不断尝试,不断实验,不断修改... ..._第1张图片



转载于:https://www.cnblogs.com/exodusxy/archive/2012/02/15/2353337.html

你可能感兴趣的:(学习就是不断尝试,不断实验,不断修改... ...)