zoukankan      html  css  js  c++  java
  • 十五周作业

    计划  
    估计要用多长时间 7天
       
    需求分析 1h
    生成设计文档 1h
    设计复审  40min
    代码规范 20min
    具体设计 40min
    具体编码 5天
    代码复审 1h
    测试 50min
    测试报告 10min
    计算工作量 25min
       

    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 排球计分程序
    {
    public partial class Form1 : Form
    {
    public Form1()
    {
    InitializeComponent();
    }
    int a ,b,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 = (a++).ToString();
    if (H >= 24 && (H - L) > 1)
    {
    txtH1.Text = (Convert.ToInt32(txtH1.Text) + 1).ToString();
    txtH.Text = "0";
    txtL.Text = "0";
    txtCount.Text += "第" + (i++) + "局:" + txtH1.Text + ":" + txtL1.Text;
    a = 1;
    if (txtH1.Text == "3")
    {
    MessageBox.Show("A队胜利");
    txtH.Text = "0";
    txtH1.Text = "0";
    txtL.Text = "0";
    txtL1.Text = "0";
    txtCount.Clear();
    }
    }
    if (H1 + L1 > 3)
    {
    if (H >= 14 && (H - L) > 1)
    {
    txtH1.Text = (Convert.ToInt32(txtH1.Text) + 1).ToString();
    txtH.Text = "0";
    txtL.Text = "0";
    txtCount.Text += "第" + (i++) + "局:" + txtH1.Text + ":" + txtL1.Text ;
    a = 1;
    if (txtH1.Text == "3")
    {
    MessageBox.Show("A队胜利");
    txtH.Text = "0";
    txtH1.Text = "0";
    txtL.Text = "0";
    txtL1.Text = "0";
    txtCount.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 = (b++).ToString();
    if (L>= 24&&(L-H )>1)
    {
    txtL1.Text = (Convert.ToInt32(txtL1.Text) + 1).ToString();
    txtH.Text = "0";
    txtL.Text = "0";
    txtCount.Text += "第" + (i++)+ "局:" + txtH1.Text + ":" + txtL1.Text;
    b= 1;
    if (txtL1.Text=="3")
    {
    MessageBox.Show("B队胜利");
    txtH.Text = "0";
    txtH1.Text = "0";
    txtL.Text = "0";
    txtL1.Text = "0";
    txtCount.Clear();
    }
    }
    if(H1+L1>3)
    {
    if (L >= 14 && (L - H) > 1)
    {
    txtL1.Text = (Convert.ToInt32(txtL1.Text) + 1).ToString();
    txtH.Text = "0";
    txtL.Text = "0";
    txtCount.Text += "第" + (i++) + "局:" + txtH1.Text + ":" + txtL1.Text;
    b = 1;
    if (txtL1.Text == "3")
    {
    MessageBox.Show("B队胜利");
    txtH.Text = "0";
    txtH1.Text = "0";
    txtL.Text = "0";
    txtL1.Text = "0";
    txtCount.Clear();
    i = 1;
    }
    }
    }

    }

    private void Form1_Load(object sender, EventArgs e)
    {

    }





    }
    }

  • 相关阅读:
    jquery
    实现元素垂直居中
    浏览器 标准模式和怪异模式
    cookie session ajax
    React props.children
    使用React.lazy报错Import in body of module; reorder to top import/first
    state 和 props 之间的区别
    Harbor打怪升级
    Centos7下安装yum工具
    正则表达式匹配两个特殊字符中间的内容(特殊字符不显示)
  • 原文地址:https://www.cnblogs.com/fujunyi/p/6195344.html
Copyright © 2011-2022 走看看