예제 #1
0
        private void btnBefore_Click(object sender, EventArgs e)
        {
            //停止播放
            if (wmPlayerForm != null)
            {
                wmPlayerForm.Stop();
            }

            QuestionThree frmBefore = new QuestionThree();

            frmBefore.TopMost = false;
            frmBefore.Show();
            this.Close();
        }
예제 #2
0
        private void btnNext_Click(object sender, EventArgs e)
        {
            //停止播放
            if (wmPlayerForm != null)
            {
                wmPlayerForm.Stop();
            }
            //第二题,每答对一项记1分,共3分,权重2.0
            int    tempScore  = 0;
            string strResult1 = "";

            if (rd1A.Checked)
            {
                strResult1 = "A,";
            }
            if (rd1B.Checked)
            {
                strResult1 = "B,";
            }

            M_QuestionnaireResultDetail question1 = new M_QuestionnaireResultDetail();

            question1.QuestionResult = strResult1;
            question1.PQuestionCode  = QuestionnaireCode.NaoNianChiDai + ".2";
            if (strResult1.Contains("A"))
            {
                question1.QuestionScore = 1; //1*2;
                tempScore += 1;
            }
            else
            {
                question1.QuestionScore = 0;
            }
            //AddResult(question1, QuestionnaireCode.NaoNianChiDai + ".2.1");


            string strResult2 = "";

            if (rd2A.Checked)
            {
                strResult2 = "A,";
            }
            if (rd2B.Checked)
            {
                strResult2 = "B,";
            }

            M_QuestionnaireResultDetail question2 = new M_QuestionnaireResultDetail();

            question2.QuestionResult = strResult2;
            question2.PQuestionCode  = QuestionnaireCode.NaoNianChiDai + ".2";
            if (strResult2.Contains("A"))
            {
                question2.QuestionScore = 1; //1*2;
                tempScore += 1;
            }
            else
            {
                question2.QuestionScore = 0;
            }
            //AddResult(question2, QuestionnaireCode.NaoNianChiDai + ".2.2");

            string strResult3 = "";

            if (rd3A.Checked)
            {
                strResult3 = "A,";
            }
            if (rd3B.Checked)
            {
                strResult3 = "B,";
            }

            M_QuestionnaireResultDetail question3 = new M_QuestionnaireResultDetail();

            question3.QuestionResult = strResult3;
            question3.PQuestionCode  = QuestionnaireCode.NaoNianChiDai + ".2";
            if (strResult3.Contains("A"))
            {
                question3.QuestionScore = 1; //1*2;
                tempScore += 1;
            }
            else
            {
                question3.QuestionScore = 0;
            }
            //AddResult(question3, QuestionnaireCode.NaoNianChiDai + ".2.3");

            //计算所属大题加权分,保存答案
            decimal weightScore = tempScore * 2;

            question1.PQuestionWeightScore = weightScore;
            AddResult(question1, QuestionnaireCode.NaoNianChiDai + ".2.1");

            question2.PQuestionWeightScore = weightScore;
            AddResult(question2, QuestionnaireCode.NaoNianChiDai + ".2.2");

            question3.PQuestionWeightScore = weightScore;
            AddResult(question3, QuestionnaireCode.NaoNianChiDai + ".2.3");

            QuestionThree frmNext = new QuestionThree();

            frmNext.TopMost = false;
            //frmNext.Show();
            frmNext.Show();
            this.Close();
        }