当前位置: 首页>>代码示例>>C#>>正文


C# Question.fillQuestion方法代码示例

本文整理汇总了C#中Question.fillQuestion方法的典型用法代码示例。如果您正苦于以下问题:C# Question.fillQuestion方法的具体用法?C# Question.fillQuestion怎么用?C# Question.fillQuestion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Question的用法示例。


在下文中一共展示了Question.fillQuestion方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: processAnswersBlackCircleSelected

        private void processAnswersBlackCircleSelected(List<List<CircleF>> lsAnswersComplete, LineSegment2D[] pAnswerReferenceLines, Image<Bgr, byte> pImg)
        {
            Question question;

            for (int i = 0; i < lsAnswersComplete.Count; i++)
            {
                int maxLengthList = lsAnswersComplete[i].Count;
                for (int j = 0; j < maxLengthList; j++)
                {
                    // for Answers
                    // note that the last list of list is for CodeNumbers, so "-1" leave the last for letter...(else)
                    #region process answers

                    question = new Question();
                    if (lsAnswersComplete[i][j].Center.X == pAnswerReferenceLines[i].P1.X)
                    {
                        question.fillQuestion(ID_SEQUENCE + 1, "*************");
                        scalar = new MCvScalar(0, 255, 0);
                        color = new Bgr(Color.Green);
                    }
                    else
                    {
                        if (lsAnswersComplete[i][j].Center.X < pAnswerReferenceLines[i].P1.X)
                        {// Yes Answer
                            question.fillQuestion(ID_SEQUENCE + 1, "False");
                            scalar = new MCvScalar(0, 0, 255);
                            color = new Bgr(Color.Green);
                        }
                        else
                        {// No answer
                            question.fillQuestion(ID_SEQUENCE + 1, "Verdadero");
                            scalar = new MCvScalar(255, 0, 0);
                            color = new Bgr(Color.Green);
                        }

                    }
                    questions.Add(question);
                    ID_SEQUENCE++;
                    CvInvoke.cvCircle(pImg,
                                         new Point((int)lsAnswersComplete[i][j].Center.X,
                                                   (int)lsAnswersComplete[i][j].Center.Y),
                                                   6,
                                                   scalar,
                                                   -1,
                                                   LINE_TYPE.CV_AA,
                                                   0);
                    #endregion
                }
            }
        }
开发者ID:kevinmartell91,项目名称:ExamenPsicologico,代码行数:50,代码来源:Form1.cs

示例2: FillingAnswerstToFinalQuestionsList

        public void FillingAnswerstToFinalQuestionsList()
        {
            //Questions
            Question question = new Question();
            string result ="";

            for (int i = 0; i < lstAbsQuestions.Count(); i++)
            {

                if (lstAbsQuestions[i].get_respuesta() == 0)
                { result = empty; }
                if (lstAbsQuestions[i].get_respuesta() == 1)
                { result = "V"; }
                if (lstAbsQuestions[i].get_respuesta() == 2)
                { result = "F";}

                question.fillQuestion(lstAbsQuestions[i].get_idQuestion(), result);
                questions.Add(question);

            }

            //DNI
            txtCode.Text = getDNI();

            //Opcion
             //opcion_01;
             //opcion_02;
            bool opcione_01 = true;
            for (int j = 0; j < 2; j++)
            {

                for (int i = 0; i < 5; i++)
                {
                    int pos = (i * 2) + (j * 1);
                    if (lstAbsOptions[pos].get_respuesta() == 1)
                    {
                        if (opcione_01)
                        { opcion_01 = lstAbsOptions[pos].get_idQuestion(); opcione_01 = false; }
                        else
                        {
                            opcion_02 = lstAbsOptions[pos].get_idQuestion();
                        }
                    }

                }

            }

            //Sede

            for (int i = 0; i < lstAbsSede.Count(); i++)
            {
                if (lstAbsSede[i].get_respuesta() == 1)
                    codigo_sede = lstAbsSede[i].get_idQuestion();
            }

            //Ciclo

            for (int j = 0; j < 2; j++)
            {
                int aux_count = 0;
                for (int i = 0; i < 10; i++)
                {
                    int pos = j + (i * 2);
                    if (lstAbsCiclo[pos].get_respuesta() == 1)
                    {
                        if (j == 0)
                        { num_01 = lstAbsCiclo[pos].get_idQuestion(); }
                        if (j == 1 )
                        { num_02 = lstAbsCiclo[pos].get_idQuestion(); }
                    }
                    else
                        aux_count++;
                }

            }

            //semestre

            for (int i = 0; i < lstAbsSemestre.Count(); i++)
            {
                if (lstAbsSemestre[i].get_respuesta() == 1)
                    codigo_semestre = lstAbsSemestre[i].get_idQuestion();
            }

            //turno

            for (int i = 0; i < lstAbsTurno.Count(); i++)
            {
                if (lstAbsTurno[i].get_respuesta() == 1)
                    codigo_turno = lstAbsTurno[i].get_idQuestion();
            }
        }
开发者ID:kevinmartell91,项目名称:ExamenPsicologico,代码行数:93,代码来源:Form1.cs

示例3: processAnswers

        private void processAnswers(List<List<CircleF>> pLsOrdered, LineSegment2D[] pAnswerReferenceLines, LineSegment2D[] pCodeNumberRefenceLines, Image<Bgr, Byte> pImg)
        {
            Question question;

            for (int i = 0; i < pLsOrdered.Count; i++)
            {
                int maxLengthList = pLsOrdered[i].Count;
                for (int j = 0; j < maxLengthList; j++)
                {
                    // for Answers
                    // note that the last list of list is for CodeNumbers, so "-1" leave the last for letter...(else)
                    #region process answers

                    if (i < maxLengthList - 1)
                    {
                        question = new Question();

                        if (pLsOrdered[i][j].Center.X == pAnswerReferenceLines[i].P1.X)
                        {
                            question.fillQuestion(ID_SEQUENCE + 1, "*************");
                            scalar = new MCvScalar(0, 255, 0);
                            color = new Bgr(Color.Green);
                        }
                        else
                        {
                            if (pLsOrdered[i][j].Center.X < pAnswerReferenceLines[i].P1.X)
                            {// Yes Answer
                                question.fillQuestion(ID_SEQUENCE + 1, "True");
                                scalar = new MCvScalar(0, 0, 255);
                                color = new Bgr(Color.Green);
                            }
                            else
                            {// No answer
                                question.fillQuestion(ID_SEQUENCE + 1, "False");
                                scalar = new MCvScalar(255, 0, 0);
                                color = new Bgr(Color.Green);
                            }

                        }
                        questions.Add(question);
                        ID_SEQUENCE++;

                    }
                    #endregion

                    // for CodeNumbers
                    #region process codes number

                    else //this is the last list of circles
                    {
                        codeNumber = 0;
                        int ii = pLsOrdered[i].Count - 1;
                        //for (int k =  - 1; 0 <= k; k--)
                        for (int k = 0; k < pLsOrdered[i].Count; k++)
                        {
                            codeNumber += (int)(getDigitFromCode(pLsOrdered[i][k], pCodeNumberRefenceLines) * Math.Pow(10, ii));
                            ii--;
                        }

                        txtCode.Text = codeNumber.ToString();

                        scalar = new MCvScalar(0, 0, 0);
                        color = new Bgr(Color.Green);

                    }

                    if (pLsOrdered[i][j].Radius == 20)
                    {
                        scalar = new MCvScalar(255, 255, 0);
                    }
                    CvInvoke.cvCircle(pImg,
                                        new Point((int)pLsOrdered[i][j].Center.X,
                                                  (int)pLsOrdered[i][j].Center.Y),
                                                  15,
                                                  scalar,
                                                  -1,
                                                  LINE_TYPE.CV_AA,
                                                  0);
                    #endregion

                }
            }
        }
开发者ID:kevinmartell91,项目名称:ExamenPsicologico,代码行数:83,代码来源:Form1.cs


注:本文中的Question.fillQuestion方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。