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

排球计分软件

时间:2016-12-18 12:18:10      阅读:217      评论:0      收藏:0      [点我收藏+]

标签:sage   clear   show   log   cli   bsp   http   box   com   

技术分享

 

 

private void btnD2_Click(object sender, EventArgs e)
        {
           
            int D1 = Convert.ToInt32(txtD1.Text);
            int D2 = Convert.ToInt32(txtD2.Text);
            int DD1 = Convert.ToInt32(txtDD1.Text);
            int DD2 = Convert.ToInt32(txtDD2.Text);
            txtD2.Text = (b++).ToString();
            if (D2>= 24&&(D2-D1 )>1)
            {
                txtDD2.Text = (Convert.ToInt32(txtDD2.Text) + 1).ToString();
                txtD1.Text = "0";
                txtD2.Text = "0";
                txtCount.Text += "第" + (i++)+ "局:" + txtDD1.Text + ":" + txtDD2.Text + "\r\n";
                b= 1;
                if (txtDD2.Text=="3")
                {
                    MessageBox.Show("一队胜利");
                    txtD1.Text = "0";
                    txtDD1.Text = "0";
                    txtD2.Text = "0";
                    txtDD2.Text = "0";
                    txtCount.Clear();
                }
            }
            if(DD1+DD2>3)
            {
                if (D2 >= 14 && (D2 - D1) > 1)
                {
                    txtDD2.Text = (Convert.ToInt32(txtDD2.Text) + 1).ToString();
                    txtD1.Text = "0";
                    txtD2.Text = "0";
                    txtCount.Text += "第" + (i++) + "局:" + txtDD1.Text + ":" + txtDD2.Text + "\r\n";
                    b = 1;
                    if (txtDD2.Text == "3")
                    {
                        MessageBox.Show("二队胜利");
                        txtD1.Text = "0";
                        txtDD1.Text = "0";
                        txtD2.Text = "0";
                        txtDD2.Text = "0";
                        txtCount.Clear();
                        i = 1;
                    }
                }
            }
          
        }

 

  private void btnD1_Click(object sender, EventArgs e)
        {
            int D1 = Convert.ToInt32(txtD1.Text);
            int D2 = Convert.ToInt32(txtD2.Text);
            int DD1 = Convert.ToInt32(txtDD1.Text);
            int DD2 = Convert.ToInt32(txtDD2.Text);
            txtD1.Text = (a++).ToString();
            if (D1 >= 24 && (D1 - D2) > 1)
            {
                txtDD1.Text = (Convert.ToInt32(txtDD1.Text) + 1).ToString();
                txtD1.Text = "0";
                txtD2.Text = "0";
                txtCount.Text += "第" + (i++) + "局:" + txtDD1.Text + ":" + txtDD2.Text + "\r\n";
                a = 1;
                if (txtDD1.Text == "3")
                {
                    MessageBox.Show("一队胜利");
                    txtD1.Text = "0";
                    txtDD1.Text = "0";
                    txtD2.Text = "0";
                    txtDD2.Text = "0";
                    txtCount.Clear();
                }
            }
            if (DD1 + DD2 > 3)
            {
                if (D1 >= 14 && (D1 - D2) > 1)
                {
                    txtDD1.Text = (Convert.ToInt32(txtDD1.Text) + 1).ToString();
                    txtD1.Text = "0";
                    txtD2.Text = "0";
                    txtCount.Text += "第" + (i++) + "局:" + txtDD1.Text + ":" + txtDD2.Text + "\r\n";
                    a = 1;
                    if (txtDD1.Text == "3")
                    {
                        MessageBox.Show("二队胜利");
                        txtD1.Text = "0";
                        txtDD1.Text = "0";
                        txtD2.Text = "0";
                        txtDD2.Text = "0";
                        txtCount.Clear();
                        i = 1;
                    }
                }
            }
        }

 

排球计分软件

标签:sage   clear   show   log   cli   bsp   http   box   com   

原文地址:http://www.cnblogs.com/lb0602/p/6193789.html

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