• 大小: 0.09M
    文件类型: .zip
    金币: 2
    下载: 0 次
    发布日期: 2024-01-28
  • 语言: 其他
  • 标签: 其他  

资源简介

StuSelector.zip

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace StuSelector
{
    public partial class FrmMain : Form
    {
        public FrmMain()
        {
            InitializeComponent();
           
        }
        private PickStu objSelctor = new PickStu();//实例化选择学员对象
        private PickExam objExam = new PickExam();//实例化选择试题对象
        int second = 0;//定义一个全局变量

        private void FrmMain_Load(object sender EventArgs e)
        {
            this.txbName.Focus();
        }
        //开始按钮
        private void button1_Click(object sender EventArgs e)
        {
            this.second = 3;
            this.lblCount.Text = “3“;
            //this.lblSecond1.ForeColor = Color.Black;
            //this.lblSecond2.ForeColor = Color.Black;
            this.lblSecond3.ForeColor = Color.Black;
            this.lblSecond4.ForeColor = Color.Black;
            this.lblSecond5.ForeColor = Color.Black;
            this.timerSelect.Start();
            this.btnStart.Enabled = false;
            this.timer1.Start();
            this.timerExam.Start();
        }
        //学院对象随机选择事件
        private void timerSelect_Tick(object sender EventArgs e)
        {
            StuInfor objStudent = this.objSelctor.GetStudent();//学员对象
            this.txbName.Text = objStudent.stuName;
            this.txbSno.Text = objStudent.stuSno.ToString();
            this.txbClass.Text = objStudent.stuClass;
            this.txbGrade.Text = objStudent.stuGrade;
            string text=“18届记者团“;
            if(text.Equals(objStudent.stuClass.ToString()))
            {
                this.lblExam.Text = ““;
            }
           
        }

        //倒计时显示事件
        private void timer1_Tick(object sender EventArgs e)
        {
            this.second--;//递减
            if(second==0)
            {
                this.timer1.Stop();
                this.btnStart.Enabled = true;
                this.timerSelect.Stop();
                this.timerExam.Stop();
            }
            this.lblCount.Text = this.second.ToString();
            switch (second)
            {
                //case 4:
                //    this.lblSecond1.ForeColor = Color.Red;
                //    break;
                //case 3:
                //    this.lblSecond2.ForeColor = Color.Red;
                //    break;
                case 2:
                    this.lblSecond3.ForeColor = Color.Red;
                    break;
                case 1:
                    this.lblSecond4.ForeColor = Color.Red;
                    break;
                case 0:
                    this.lblSecond5.ForeColor = Color.Red;
                    break;

            }
        }
        //试题随机事件
        private void timerExam_Tick(object sender EventArgs

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-04-27 00:50  StuSelector\
     目录           0  2019-04-27 00:50  StuSelector\StuSelector\
     文件       19835  2018-10-29 13:59  StuSelector\StuSelector\FrmMain.Designer.cs
     文件        3304  2018-10-29 13:59  StuSelector\StuSelector\FrmMain.cs
     文件       13141  2018-10-29 13:59  StuSelector\StuSelector\FrmMain.resx
     文件        1851  2018-10-29 09:20  StuSelector\StuSelector\PickExam.cs
     文件        2009  2018-10-29 09:18  StuSelector\StuSelector\PickStu.cs
     文件         525  2018-10-29 09:18  StuSelector\StuSelector\Program.cs
     目录           0  2019-04-27 00:50  StuSelector\StuSelector\Properties\
     文件        1364  2018-10-15 10:56  StuSelector\StuSelector\Properties\AssemblyInfo.cs
     文件        2874  2018-10-15 10:56  StuSelector\StuSelector\Properties\Resources.Designer.cs
     文件        5612  2018-10-15 10:56  StuSelector\StuSelector\Properties\Resources.resx
     文件        1098  2018-10-15 10:56  StuSelector\StuSelector\Properties\Settings.Designer.cs
     文件         249  2018-10-15 10:56  StuSelector\StuSelector\Properties\Settings.settings
     文件         272  2018-10-29 09:18  StuSelector\StuSelector\StuExam.cs
     文件        1385  2018-10-29 09:06  StuSelector\StuSelector\StuInfor.cs
     文件        3900  2018-10-29 09:21  StuSelector\StuSelector\StuSelector.csproj
     目录           0  2019-04-27 00:50  StuSelector\StuSelector\bin\
     目录           0  2019-04-27 00:50  StuSelector\StuSelector\bin\Debug\
     文件        2025  2018-10-29 18:26  StuSelector\StuSelector\bin\Debug\StuExam.txt
     文件       20480  2018-10-29 13:59  StuSelector\StuSelector\bin\Debug\StuSelector.exe
     文件       52736  2018-10-29 13:59  StuSelector\StuSelector\bin\Debug\StuSelector.pdb
     文件       24224  2018-10-29 14:00  StuSelector\StuSelector\bin\Debug\StuSelector.vshost.exe
     文件         490  2013-03-18 17:00  StuSelector\StuSelector\bin\Debug\StuSelector.vshost.exe.manifest
     文件        3167  2018-10-29 00:00  StuSelector\StuSelector\bin\Debug\student.txt
     目录           0  2019-06-03 17:10  StuSelector\StuSelector\bin\Release\
     文件        4286  2018-10-29 13:56  StuSelector\StuSelector\bitbug_favicon.ico
     目录           0  2019-04-27 00:50  StuSelector\StuSelector\obj\
     目录           0  2019-04-27 00:50  StuSelector\StuSelector\obj\Debug\
     文件        2301  2018-10-28 23:52  StuSelector\StuSelector\obj\Debug\DesignTimeResolveAssemblyReferences.cache
     文件        6877  2018-10-29 13:57  StuSelector\StuSelector\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
............此处省略13个文件信息

评论

共有 条评论