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)
    {

    }





    }
    }

  • 相关阅读:
    JScript 对字符串、数组处理的常用方法
    JavaScript 正则的使用方法
    Nginx配置文件详细说明 (转)
    PHP中try catch的用法
    PHP将多个文件中的内容合并为新的文件
    如何配置WAMP环境(主要是Apache与PHP)
    解决“mysql不是内部/外部命令,也不是可执行程序,也不是批处理文件”
    Memcached 在Windows和Linux的安装和使用
    ThinkPhp中验证码不显示和配置项的问题解决方法
    JAVA8流操作
  • 原文地址:https://www.cnblogs.com/fujunyi/p/6195344.html
Copyright © 2011-2022 走看看