• 大小: 59KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-04
  • 语言: 其他
  • 标签:

资源简介

篮球计分器软件,主要用于小型篮球比赛使用 篮球计分器源码 源码比较简单,适合初学者学习 bin\debug目录下有已经编译好的可执行文件,可以先看以下程序的运行效果,之后再阅读学习源码。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
//Asp.net源码网http://www.51aspx.com   
namespace Bastekball
{
    public partial class FMain : Form
    {
        public int rMark;
        public int gMark;
        public int minuteVar;
        public int secondVar;
        public FMain()
        {
            InitializeComponent();
        }

        private void btnred_Click(object sender EventArgs e)
        {
            lblred.Text = txtred.Text;
        }

        private void btngreen_Click(object sender EventArgs e)
        {
            lblgreen.Text = txtgreen.Text;
        }
        
        private void btnremark_Click(object sender EventArgs e)  
        {
            lblremark.Text = txtremark.Text;
        }

        private void txt_KeyPress(object sender KeyPressEventArgs e)
        {
            if (e.KeyChar >= 48 && e.KeyChar <= 58 || e.KeyChar== 8)
            {
                e.Handled = false;
                
            }            
            else
            {
                e.Handled = true;
            }
        }
        //public int FormatTimer(string a string b)
        //{
        //    string chm;
        //    string chs;
        //    string cht;
        //    chm = a.ToString(“00“);
        //    chs =  b.ToString(“00“);
        //    cht = chm + “:“ + chs;
            
        //    return cht;
        //}

        private void timer1_Tick(object sender EventArgs e)
        {
            
            string chm;
            string chs;
            string cht;
            chm = minuteVar.ToString(“00“);
            chs =  secondVar.ToString(“00“);
            cht = chm + “:“ + chs;
            
            if (minuteVar ==12 && secondVar == 0)
            {
                secondVar = 0;
                minuteVar = 0;
                timer1.Stop();
                switch( label2.Text)
                {
                    case “第一节“:
                      radioButton2.Checked=true;
                      btnokstop.Text=“开始比赛“;
                      break;
                    case “第二节“:
                      radioButton3.Checked=true;
                      btnokstop.Text=“开始比赛“;
                      break;
                    case “第三节“:
                    radioButton4.Checked=true;
                      btnokstop.Text=“开始比赛“;
                      break;
                    case “第四节“:
                        label2.Text = “比赛结束“;
                       btnokstop.Text=“比赛结束“;
                       break;
                }
            }
           
            if (secondVar == 59)
            {
                minuteVar = minuteVar + 1;
                secondVar = 0;
            }
            else
            {
                secondVar = secondVar + 1;
            }
            lblt

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2011-08-02 16:33  Basketball\
     目录           0  2010-12-08 13:00  Basketball\Bastekball\
     文件         919  2010-12-04 14:20  Basketball\Bastekball.sln
     文件       12800  2010-12-08 13:01  Basketball\Bastekball.suo
     文件        3227  2010-12-04 14:31  Basketball\Bastekball\Bastekball.csproj
     目录           0  2011-02-22 10:04  Basketball\Bastekball\bin\
     目录           0  2010-12-08 12:55  Basketball\Bastekball\bin\Debug\
     文件       32768  2010-12-08 13:00  Basketball\Bastekball\bin\Debug\Bastekball.exe
     文件       36352  2010-12-08 13:00  Basketball\Bastekball\bin\Debug\Bastekball.pdb
     文件        5632  2005-09-23 06:56  Basketball\Bastekball\bin\Debug\Bastekball.vshost.exe
     文件        3774  2009-08-20 15:55  Basketball\Bastekball\bin\favicon.ico
     文件        4096  2011-02-22 10:04  Basketball\Bastekball\bin\Thumbs.db
     文件        8312  2011-02-22 09:54  Basketball\Bastekball\FMain.cs
     文件       35581  2010-12-08 12:44  Basketball\Bastekball\FMain.Designer.cs
     文件        6381  2010-12-08 12:44  Basketball\Bastekball\FMain.resx
     目录           0  2010-12-08 12:55  Basketball\Bastekball\obj\
     文件         785  2010-12-08 13:00  Basketball\Bastekball\obj\Bastekball.csproj.FileListAbsolute.txt
     目录           0  2010-12-08 13:00  Basketball\Bastekball\obj\Debug\
     文件         842  2010-12-08 12:55  Basketball\Bastekball\obj\Debug\Bastekball.csproj.GenerateResource.Cache
     文件       32768  2010-12-08 13:00  Basketball\Bastekball\obj\Debug\Bastekball.exe
     文件         180  2010-12-08 12:55  Basketball\Bastekball\obj\Debug\Bastekball.FMain.resources
     文件       36352  2010-12-08 13:00  Basketball\Bastekball\obj\Debug\Bastekball.pdb
     文件         180  2010-12-08 12:55  Basketball\Bastekball\obj\Debug\Bastekball.Properties.Resources.resources
     目录           0  2010-12-04 14:20  Basketball\Bastekball\obj\Debug\Refactor\
     目录           0  2010-12-04 14:20  Basketball\Bastekball\obj\Debug\TempPE\
     文件         480  2010-12-04 14:20  Basketball\Bastekball\Program.cs
     目录           0  2010-12-04 14:20  Basketball\Bastekball\Properties\
     文件        1268  2010-12-04 14:20  Basketball\Bastekball\Properties\AssemblyInfo.cs
     文件        2849  2010-12-04 14:20  Basketball\Bastekball\Properties\Resources.Designer.cs
     文件        5612  2010-12-04 14:20  Basketball\Bastekball\Properties\Resources.resx
     文件        1095  2010-12-04 14:20  Basketball\Bastekball\Properties\Settings.Designer.cs
............此处省略2个文件信息

评论

共有 条评论

相关资源