本周主要任务就是编写一个排球积分程序,本次排球积分程序编写的主要代码就是观众查询的,虽然写了,但是运行中还是有错误,具体代码以及人物完成如下:
个人项目耗时记录表:
计划 | 2天 |
估计多长时间 | 2天 |
开发 | 3小时 |
需求分析 | 2小时 |
生成设计文档 | 1小时 |
设计复审 | 30分钟 |
代码规范 | 3小时 |
具体设计 | 2小时 |
具体代码 | 3小时 |
代码复审 | 20分钟 |
测试 | 1小时 |
报告 | 1小时 |
测试报告 | 2小时 |
计算工作量 | 1小时 |
总结 | 1小时 |
界面:
代码:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Form2 form2 = new Form2();
form2.Show();
}
}
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox1.Text == "日本队")
{
textBox6.Text = "日本队";
}
if (comboBox1.Text == "韩国队")
{
textBox6.Text = "韩国队";
}
if (comboBox1.Text == "荷兰队")
{
textBox6.Text = "荷兰队";
}
}
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox2.Text == "中国队")
{
textBox5.Text = "中国队";
}
if (comboBox2.Text == "美国队")
{
textBox5.Text = "美国队";
}
if (comboBox2.Text == "英国队")
{
textBox5.Text = "英国队";
}
}
private void button2_Click(object sender, EventArgs e)
{
if(comboBox2.Text=="中国队"&&comboBox1.Text=="日本队")
{
textBox4.Text="2";
textBox3.Text="3";
}
if (comboBox2.Text == "美国队" && comboBox1.Text == "韩国队")
{
textBox4.Text = "3";
textBox3.Text = "2";
}
if (comboBox2.Text == "英国队" && comboBox1.Text == "荷兰队")
{
textBox4.Text = "0";
textBox3.Text = "3";
}
}
private void button1_Click(object sender, EventArgs e)
{
if (comboBox2.Text == "中国队" && comboBox1.Text == "日本队" && comboBox3.Text == "第一局")
{
textBox1.Text = "25";
textBox2.Text = "23";
}
if (comboBox2.Text == "中国队" && comboBox1.Text == "日本队" && comboBox3.Text == "第二局")
{
textBox1.Text = "25";
textBox2.Text = "20";
}
if (comboBox2.Text == "中国队" && comboBox1.Text == "日本队" && comboBox3.Text == "第三局")
{
textBox1.Text = "24";
textBox2.Text = "25";
}
if (comboBox2.Text == "中国队" && comboBox1.Text == "日本队" && comboBox3.Text == "第四局")
{
textBox1.Text = "25";
textBox2.Text = "19";
}
if (comboBox2.Text == "中国队" && comboBox1.Text == "日本队" && comboBox3.Text == "第五局")
{
textBox1.Text = "5";
textBox2.Text = "15";
}
if (comboBox2.Text == "美国队" && comboBox1.Text == "韩国队" && comboBox3.Text == "第一局")
{
textBox1.Text = "25";
textBox2.Text = "10";
}
if (comboBox2.Text == "美国队" && comboBox1.Text == "韩国队" && comboBox3.Text == "第二局")
{
textBox1.Text = "25";
textBox2.Text = "22";
}
if (comboBox2.Text == "美国队" && comboBox1.Text == "韩国队" && comboBox3.Text == "第三局")
{
textBox1.Text = "24";
textBox2.Text = "25";
}
if (comboBox2.Text == "美国队" && comboBox1.Text == "韩国队" && comboBox3.Text == "第四局")
{
textBox1.Text = "25";
textBox2.Text = "23";
}
if (comboBox2.Text == "美国队" && comboBox1.Text == "韩国队" && comboBox3.Text == "第五局")
{
textBox1.Text = "12";
textBox2.Text = "15";
}
if (comboBox2.Text == "英国队" && comboBox1.Text == "荷兰队" && comboBox3.Text == "第一局")
{
textBox1.Text = "25";
textBox2.Text = "10";
}
if (comboBox2.Text == "英国队" && comboBox1.Text == "荷兰队" && comboBox3.Text == "第二局")
{
textBox1.Text = "25";
textBox2.Text = "24";
}
if (comboBox2.Text == "英国队" && comboBox1.Text == "荷兰队" && comboBox3.Text == "第三局")
{
textBox1.Text = "25";
textBox2.Text = "15";
}
if (comboBox2.Text == "英国队" && comboBox1.Text == "荷兰队" && comboBox3.Text == "第四局")
{
textBox1.Text = "0";
textBox2.Text = "0";
}
if (comboBox2.Text == "英国队" && comboBox1.Text == "荷兰队" && comboBox3.Text == "第五局")
{
textBox1.Text = "0";
textBox2.Text = "0";
}
}
}