• 排球积分程序


             本周主要任务就是编写一个排球积分程序,本次排球积分程序编写的主要代码就是观众查询的,虽然写了,但是运行中还是有错误,具体代码以及人物完成如下:

             个人项目耗时记录表:

    计划 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";
    }
    }
    }

  • 相关阅读:
    Android大牛
    在学习oauth时学到的
    using-jade-and-grunt-to-speed-up-html-production
    build-your-microservices-api-with-swagger
    json-web-token-apache-shiro
    WebSocket对象特性和方法
    芝麻教程
    how to export multiple SVG graphics in illustrator
    直播后台
    关于在chrome中响应不出现在XHR里的远影
  • 原文地址:https://www.cnblogs.com/Apple0921/p/6189447.html
Copyright © 2020-2023  润新知