• 排球积分


    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;

                        }

                    }
                }
            }

        }
    }

  • 相关阅读:
    Jing : 记录屏幕上的图像、录像,拿来与朋友共享
    VistaDB 数据库,.NET的新选择
    获取指定网站的屏幕抓图
    XOOXML 操控 Excel 2007的组件
    MySQL 的一个奇怪错误
    又一个.NET代码生成器
    A .NET API for the Google Maps Geocoder
    ASP.NET + MySQL 开发笔记 MembershipProvider 和 RoleProvider 用法
    Educational Codeforces Round 96 (Rated for Div. 2)
    Codeforces Round #676 (Div. 2)
  • 原文地址:https://www.cnblogs.com/yintaiping/p/6212846.html
Copyright © 2020-2023  润新知