Exemple #1
0
        private void AnswerCardForm_Load(object sender, EventArgs e)
        {
            layoutInit();
            ViewHelper.MaximizedAutoSize(this);
            this.Opacity = 100D;
            for (int i = 0; i < TestHelper.questionNum; i++)
            {
                btns[i].Tag = i;
                lbls[i].Tag = i;
            }
            lblTimer.Tag = -1;
            countDown.Start();
            int index = 0;

            foreach (Control item in CommonPanel.Controls)
            {
                if (item is Label)
                {
                    index = Convert.ToInt32(item.Tag);
                    if (index != -1)
                    {
                        item.Text = TestHelper.studentAnswer[index];
                    }
                }
            }
        }
Exemple #2
0
 private void CheWuForm_Load(object sender, EventArgs e)
 {
     ViewHelper.MaximizedAutoSize(this);
     this.Opacity = 100D;
     FileInfo[] files = dir.GetFiles();
     foreach (FileInfo file in files)
     {
         listBox1.Items.Add(file.Name.Substring(0, file.Name.IndexOf('.')));
     }
 }
Exemple #3
0
        private void BasicForm_Load(object sender, EventArgs e)
        {
            ViewHelper.MaximizedAutoSize(this);
            this.Opacity = 100D;


            btnCW.Tag = 1;
            btnDW.Tag = 2;
            btnGW.Tag = 3;
            btnDD.Tag = 4;
            btnGD.Tag = 5;
        }
Exemple #4
0
 private void AnswerQuestionForm_Load(object sender, EventArgs e)
 {
     ViewHelper.MaximizedAutoSize(this);
     this.Opacity = 100D;
     //启动计时器
     countDown.Start();
     //显示题目信息
     getQuestionDetails();
     //如果题目已经答过,让相应的选项选中
     checkOption();
     //确定是否到了最后一题
     checkBtnNext();
     rdoOptionA.Tag = "A";
     rdoOptionB.Tag = "B";
     rdoOptionC.Tag = "C";
     rdoOptionD.Tag = "D";
 }
Exemple #5
0
        private void VRForm_Load(object sender, EventArgs e)
        {
            ViewHelper.MaximizedAutoSize(this);
            this.Opacity = 100D;

            btnADX.Tag    = 1;
            btnDian.Tag   = 2;
            btnZhuan.Tag  = 3;
            btnU3D.Tag    = 4;
            btnCangku.Tag = 5;

            tmisDialogDialog       = new TMISDialogDialog();
            tmisDialogDialog.Owner = this;

            //解决窗体闪烁
            this.SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.AllPaintingInWmPaint, true);
        }
Exemple #6
0
        private void TestResultForm_Load(object sender, EventArgs e)
        {
            ViewHelper.MaximizedAutoSize(this);
            this.Opacity = 100D;
            int correctNum = 0;

            for (int i = 0; i < TestHelper.questionNum; i++)
            {
                if (TestHelper.studentAnswer[i] == TestHelper.correctAnswer[i])
                {
                    correctNum++;
                }
            }
            int score = (correctNum * 100) / TestHelper.questionNum;

            lblScore.Text = score.ToString() + "分";
            lblStudentScoreStrip.Width = (lblFullScoreStrip.Width * score) / 100;
            if (score < 60)
            {
                lblComment.Text = "该好好复习了!";
                lblStudentScoreStrip.BackColor = Color.Red;
                picFace.Image = faces.Images[0];
            }
            else if (score >= 60 && score < 85)
            {
                lblComment.Text = "还不错,继续努力!";
                lblStudentScoreStrip.BackColor = Color.Blue;
                picFace.Image = faces.Images[1];
            }
            else if (score >= 85 && score < 100)
            {
                lblComment.Text = "真厉害,得优秀了!";
                lblStudentScoreStrip.BackColor = Color.CornflowerBlue;
                picFace.Image = faces.Images[2];
            }
            else if (score == 100)
            {
                lblComment.Text = "太厉害了,得满分了!";
                lblStudentScoreStrip.BackColor = Color.Green;
                picFace.Image = faces.Images[3];
            }
        }