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

个人开发总结

时间:2016-12-25 23:23:47      阅读:265      评论:0      收藏:0      [点我收藏+]

标签:private   程序   需要   ges   文本   rgs   str   文本框   image   

个人开发计划:程序开发需要花费6~7天时间,可能更多时间!

 

用户故事:作为一名观众,希望了解到比赛的比分

用户打开进入的界面,用户选择自己要查看的队伍比赛成绩,点击查看的确定按钮,在文本框中查看比赛结果。

技术分享

技术分享

public partial class Form1 : Form
    {
        Action action = new Action();
        public Form1()
        {
            InitializeComponent();
        }
      
        int i = 1;
        private void btnH_Click(object sender, EventArgs e)
        {
            int H = Convert.ToInt32(txtH.Text);
            int L = Convert.ToInt32(txtL.Text);
            int H1 = Convert.ToInt32(txtH1.Text);
            int L1 = Convert.ToInt32(txtL1.Text);
            txtH.Text = (H+1).ToString();
           
            if (H >= 24 && (H - L) > 1)
            {
                txtH1.Text = (Convert.ToInt32(txtH1.Text) + 1).ToString();
                if ((H1 + L1) == 0)
                {
                    txtCount1.Text += "第" + (i++) + "局:" + txtH.Text + ":" + txtL.Text;
                }
                if ((H1 + L1) == 1)
                {
                    txtCount2.Text += "第" + (i++) + "局:" + txtH.Text + ":" + txtL.Text;
                }
                if ((H1 + L1) == 2)
                {
                    txtCount3.Text += "第" + (i++) + "局:" + txtH.Text + ":" + txtL.Text;
                }
                if ((H1 + L1) == 3)
                {
                    txtCount4.Text += "第" + (i++) + "局:" + txtH.Text + ":" + txtL.Text;
                }
                if ((H1 + L1) == 4)
                {
                    txtCount5.Text += "第" + (i++) + "局:" + txtH.Text + ":" + txtL.Text;
                }
                txtH.Text = "0";
                txtL.Text = "0";

                if (txtH1.Text == "3")
                {
                    MessageBox.Show("一队胜利");
                    Insert();
                    txtH.Text = "0";
                    txtH1.Text = "0";
                    txtL.Text = "0";
                    txtL1.Text = "0";
                    txtCount1.Clear();
                    txtCount2.Clear();
                    txtCount3.Clear();
                    txtCount4.Clear();
                    txtCount5.Clear();

                }
            }
            if (H1 + L1 > 3)
            {
                if (H >= 14 && (H - L) > 1)
                {
                    txtH1.Text = (Convert.ToInt32(txtH1.Text) + 1).ToString();

                    if ((H1 + L1) == 4)
                    {
                        txtCount5.Text += "第" + (i++) + "局:" + txtH.Text + ":" + txtL.Text + "\r\n";
                    }
                    txtH.Text = "0";
                    txtL.Text = "0";

                    if (txtH1.Text == "3")
                    {
                        MessageBox.Show("一队胜利");
                        Insert();
                        txtH.Text = "0";
                        txtH1.Text = "0";
                        txtL.Text = "0";
                        txtL1.Text = "0";
                        txtCount1.Clear();
                        txtCount2.Clear();
                        txtCount3.Clear();
                        txtCount4.Clear();
                        txtCount5.Clear();
                        i = 1;
                    }
                }
            }
        }

        private void btnL_Click(object sender, EventArgs e)
        {
            
            int H = Convert.ToInt32(txtH.Text);
            int L = Convert.ToInt32(txtL.Text);
            int H1 = Convert.ToInt32(txtH1.Text);
            int L1 = Convert.ToInt32(txtL1.Text);
            txtL.Text = (L+1).ToString();
            if (L>= 24&&(L-H )>1)
            {
                txtL1.Text = (Convert.ToInt32(txtL1.Text) + 1).ToString();
                if ((H1 + L1) == 0)
                {
                    txtCount1.Text += "第" + (i++) + "局:" + txtH.Text + ":" + txtL.Text;
                } if ((H1 + L1) == 1)
                {
                    txtCount2.Text += "第" + (i++) + "局:" + txtH.Text + ":" + txtL.Text;
                }
                if ((H1 + L1) == 2)
                {
                    txtCount3.Text += "第" + (i++) + "局:" + txtH.Text + ":" + txtL.Text;
                }
                if ((H1 + L1) == 3)
                {
                    txtCount4.Text += "第" + (i++) + "局:" + txtH.Text + ":" + txtL.Text;
                }
                if ((H1 + L1) == 4)
                {
                    txtCount5.Text += "第" + (i++) + "局:" + txtH.Text + ":" + txtL.Text;
                }
                txtH.Text = "0";
                txtL.Text = "0";

                if (txtL1.Text == "3")
                {
                    MessageBox.Show("二队胜利");
                    Insert();
                    txtH.Text = "0";
                    txtH1.Text = "0";
                    txtL.Text = "0";
                    txtL1.Text = "0";
                    txtCount1.Clear();
                    txtCount2.Clear();
                    txtCount3.Clear();
                    txtCount4.Clear();
                    txtCount5.Clear();
                }
            }
            if (H1 + L1 > 3)
            {
                if (L >= 14 && (L - H) > 1)
                {
                    txtL1.Text = (Convert.ToInt32(txtL1.Text) + 1).ToString();
                    if ((H1 + L1) == 4)
                    {
                        txtCount5.Text += "第" + (i++) + "局:" + txtH.Text + ":" + txtL.Text;
                    }
                    txtH.Text = "0";
                    txtL.Text = "0";

                    if (txtL1.Text == "3")
                    {
                        MessageBox.Show("二队胜利");
                        Insert();
                        txtH.Text = "0";
                        txtH1.Text = "0";
                        txtL.Text = "0";
                        txtL1.Text = "0";
                        txtCount1.Clear();
                        txtCount2.Clear();
                        txtCount3.Clear();
                        txtCount4.Clear();
                        txtCount5.Clear();
                        i = 1;
                    }
                }
            }
           
        }

 

个人开发总结

标签:private   程序   需要   ges   文本   rgs   str   文本框   image   

原文地址:http://www.cnblogs.com/bobomeme/p/6220571.html

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