zoukankan      html  css  js  c++  java
  • 排球积分

    winform

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;

    namespace YinTaiping
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
            int a = 1;
            int b = 1;
            int i = 1;

            private void btnC_Click(object sender, EventArgs e)
            {
                int C = Convert.ToInt32(txt1.Text);
                int M = Convert.ToInt32(txt2.Text);
                int c1 = Convert.ToInt32(txt3.Text);
                int m1 = Convert.ToInt32(txt4.Text);
                txt1.Text = (a++).ToString();
                if (C >= 24 && (C - M) > 1)
                {
                    txt3.Text = (Convert.ToInt32(txt3.Text) + 1).ToString();
                    txt1.Text = "0";
                    txt2.Text = "0";
                    a = 1;
                    if (txt3.Text == "3")
                    {
                        MessageBox.Show("巴西队胜利!!");
                        txt1.Text = "0";
                        txt3.Text = "0";
                        txt2.Text = "0";
                        txt4.Text = "0";
                    }
                }
                if (c1 + m1 > 3)
                {
                    if (C >= 14 && (C - M) > 1)
                    {
                        txt3.Text = (Convert.ToInt32(txt3.Text) + 1).ToString();
                        txt1.Text = "0";
                        txt2.Text = "0";
                        a = 1;
                        if (txt3.Text == "3")
                        {
                            MessageBox.Show("巴西队胜利!!");
                            txt1.Text = "0";
                            txt3.Text = "0";
                            txt2.Text = "0";
                            txt4.Text = "0";
                            i = 1;
                        }
                    }
                }
            }

            private void btnM_Click(object sender, EventArgs e)
            {
                int H = Convert.ToInt32(txt1.Text);
                int L = Convert.ToInt32(txt2.Text);
                int H1 = Convert.ToInt32(txt3.Text);
                int L1 = Convert.ToInt32(txt4.Text);
                txt2.Text = (b++).ToString();
                if (L >= 24 && (L- H) > 1)
                {
                    txt4.Text = (Convert.ToInt32(txt4.Text) + 1).ToString();
                    txt1.Text = "0";
                    txt2.Text = "0";
                    b = 1;
                    if (txt4.Text == "3")
                    {
                        MessageBox.Show("中国队胜利!!");
                        txt1.Text = "0";
                        txt3.Text = "0";
                        txt2.Text = "0";
                        txt4.Text = "0";
                    }
                }
                if (H1 + L1 > 3)
                {
                    if (L >= 14 && (L-H) > 1)
                    {
                        txt4.Text = (Convert.ToInt32(txt4.Text) + 1).ToString();
                        txt1.Text = "0";
                        txt2.Text = "0";
                        b = 1;
                        if (txt4.Text == "3")
                        {
                            MessageBox.Show("中国队胜利!!");
                            txt1.Text = "0";
                            txt3.Text = "0";
                            txt2.Text = "0";
                            txt4.Text = "0";
                            i = 1;

                        }

                    }
                }
            }

        }
    }

  • 相关阅读:
    Request Validation in ASP.NET
    ANSI、Unicode、Unicode big endian、UTF8编码
    在win7下安装SQL sever2005
    配置SQL Server 2005 以允许远程连接
    传统网站与Web标准——DIV+CSS布局实例
    打造自己的reset.css
    传统网站与Web标准——表格布局实例
    每天工作4小时的程序员
    良好的XHTML规则
    列表导航栏实例(02)——精美电子商务网站赏析
  • 原文地址:https://www.cnblogs.com/yintaiping/p/6212846.html
Copyright © 2011-2022 走看看