zoukankan      html  css  js  c++  java
  • 16章个人总结

    用户需求

    用户故事:作为一个排球比赛爱好者,我希望能查询每一场比赛的得分,以便了解比赛的进程。

    计划:估计完成时间:7天。

    计划内容:查询每局比赛的得分。

    具体代码:

    private void button1_Click(object sender, EventArgs e)
            {
                if (txtjieju.Visible == false)
                {
                    int a1 = int.Parse(txta1.Text);
                    int a2 = int.Parse(txta2.Text);
                    int b1 = int.Parse(txtb1.Text);
                    int b2 = int.Parse(txtb2.Text);
                    if (a1 < 9)
                    {
                        txta1.Text = 0 + (a1 + 1).ToString();
                    }
                    else
                    {
                        if (m == 5)
                        {
                            if (a1 >= 14 && a1 <= a2 || a1 < 14)
                            {
                                txta1.Text = (a1 + 1).ToString();
                            }
                            else
                            {
    
                                txtb1.Text = (b1 + 1).ToString();
                                //  把值插入数据库  
                                txtjieju.Text += "第" + m + "局" + (a1 + 1).ToString() + ":" + txta2.Text + "
    " + "
    ";
                            }
                        }
                        else
                        {
                            if (a1 >= 24 && a1 <= a2 || a1 < 24)
                            {
                                txta1.Text = (a1 + 1).ToString();
                            }
                            else
                            {
                                txtb1.Text = (b1 + 1).ToString();
                               
                                txtjieju.Text += "第" + m + "局" + (a1 + 1).ToString() + ":" + txta2.Text + "
    " + "
    ";
                                txta1.Text = "00";
                                txta2.Text = "00";
                                txtm.Text = "第 " + (m + 1) + " 场";
                                m = m + 1;
    
                            }
                        }
    
                    }
                    if (txtb1.Text == "3")
                    {
                        txta1.Text = "00";
                        txta2.Text = "00";
                        txtb1.Text = "0";
                        txtb2.Text = "0";
                        MessageBox.Show(txtd1.Text+"胜");
                        m = 0;
                        //  把值插入数据库
                        txtjieju.Text += txtd1.Text + "胜";
                        txtm.Text = "第 " + (m + 1) + " 场";
                    }
                }
            }
    private void button2_Click(object sender, EventArgs e)
            {
                if (txtjieju.Visible == false)
                {
                    int a1 = int.Parse(txta1.Text);
                    int a2 = int.Parse(txta2.Text);
                    int b1 = int.Parse(txtb1.Text);
                    int b2 = int.Parse(txtb2.Text);
                    if (a2 < 9)
                    {
                        txta2.Text = 0 + (a2 + 1).ToString();
                    }
                    else
                    {
                        if (m == 5)
                        {
                            if (a2 >= 14 && a2 <= a1 || a2 < 14)
                            {
                                txta2.Text = (a2 + 1).ToString();
                            }
                            else
                            {
    
                                txtb2.Text = (b2 + 1).ToString();
                                //  把值插入数据库未完成
                                txtjieju.Text += "第" + m + "局" + txta1.Text + ":" + (a2 + 1).ToString() + "
    " + "
    ";
                                txta1.Text = "00";
                                txta2.Text = "00";
                            }
                        }
                        if (a2 >= 24 && a2 <= a1 || a2 < 24)
                        {
                            txta2.Text = (a2 + 1).ToString();
                        }
                        else
                        {
                            txtb2.Text = (b2 + 1).ToString();
                            //  把值插入数据库未完成
                            txtjieju.Text += "第" + m + "局" + txta1.Text + ":" + (a2 + 1).ToString() + "
    " + "
    ";
                            txta1.Text = "00";
                            txta2.Text = "00";
                            txtm.Text = "第 " + (m + 1) + " 场";
                            m = m + 1;
                        }
    
                    }
  • 相关阅读:
    js简单验证码的生成和验证
    基本够用的php.ini配置文件(CentOS7)
    转发:CentOS下tar压缩排除某个文件夹或文件及解压
    阿里云服务器CentOS7 vsftp安装、设置及后台端口的设置
    转发:entos7修改文件夹权限和用户名用户组
    转发:查看centos中的用户和用户组
    阿里云服务器CentOS7怎么分区格式化/挂载硬盘
    php调试用的几个小方法
    Jquery实现日期转换为 Unix时间戳及时间戳转换日期
    Jquery计算时间戳之间的差值,可返回年,月,日,小时等
  • 原文地址:https://www.cnblogs.com/abc1/p/6220226.html
Copyright © 2011-2022 走看看