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

十五周作业

时间:2016-12-18 20:42:25      阅读:216      评论:0      收藏:0      [点我收藏+]

标签:http   clear   style   设计   text   .sh   ble   art   tab   

计划  
估计要用多长时间 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)
{

}

 





}
}

 

十五周作业

标签:http   clear   style   设计   text   .sh   ble   art   tab   

原文地址:http://www.cnblogs.com/fujunyi/p/6195344.html

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