Example #1
0
		private void SelectObject(AbstractObject node)
		{
			if (node.IsBlob)
			{
				var blob = node as Leaf;
				var text = blob.Data;
				m_object.Document.Blocks.Clear();
				var p = new Paragraph();
				p.Inlines.Add(text);
				m_object.Document.Blocks.Add(p);
				m_object_title.Content = "Content of " + blob.Path;
			}
			else
			{
				m_object.Document.Blocks.Clear();
			}
		}
Example #2
0
 // Use this for initialization
 void Start()
 {
     objScript = gameObject.GetComponent<AbstractObject>();
     matFragmentum = GetComponent<Fragmentum>().GetMaterial();
     Bounds b = gameObject.collider.bounds;
     guo = new GraphUpdateObject(b);
     AstarPath.active.UpdateGraphs (guo);
     addToPathFinder();
 }
        private void pictureBox1_Paint(object sender, PaintEventArgs e)
        {
            #region dibujar mayas_corner

            float refPoint_X = 0;
            float refPoint_Y = 0;
            float refPoint_Y_1 = 0;

            double delta_X_H = 0;
            float delta_Y_H = 0;
            double delta_X_V = 0;
            double delta_Y_V = 0;

            double dist_X_H = 0;
            float dist_Y_H = 0;
            double dist_X_V = 0;
            double dist_Y_V = 0;

            for (int k = 0; k < mayas_corner.Count ; k++)
            {
                Circle lstCirculos = mayas_corner[k];// 46 + 2 (drag & drop circles) =  48 insted (horizontal lines)
                                                                             //  28        (vertical lines)

                #region horizontal lines of the dynamic grid - Creation and Drawing

                int numHorizontalLines = (int)lstCirculos.getY();

                double distHorizontal1 = lstCirculos.circles[2].y - lstCirculos.circles[0].y;
                double intervalHorizonatal1 = distHorizontal1 / numHorizontalLines;

                double distHorizontal2 = lstCirculos.circles[3].y - lstCirculos.circles[1].y;
                double intervalHorizontal2 = distHorizontal2 / numHorizontalLines;

                double intervalHorizontalX1 = (lstCirculos.circles[2].x - lstCirculos.circles[0].x) * 1.0 / numHorizontalLines;
                double intervalHorizontalX2 = (lstCirculos.circles[3].x - lstCirculos.circles[1].x) * 1.0 / numHorizontalLines;

                for (int i = 0; i <= numHorizontalLines; i++)
                {

                    //e.Graphics.DrawLine(
                    //           new Pen(Color.Red, 1f),
                    //           new Point((int)((i * intervalHorizontalX1) + lstCirculos.circles[0].x), (int)((i * intervalHorizonatal1) + lstCirculos.circles[0].y)),
                    //           new Point((int)((i * intervalHorizontalX2) + lstCirculos.circles[1].x), (int)((i * intervalHorizontal2) + lstCirculos.circles[1].y)));

                }
                #endregion

                #region Vertical lines of the dynamic grid - Creation and Drawing - Creating lstAbsQuestion and lstAbsOnjects

                int numVerticalLines = (int)lstCirculos.getX();

                double distVertical1 = lstCirculos.circles[1].x - lstCirculos.circles[0].x;
                double intervalVertical1 = distVertical1 / numVerticalLines;

                double distVertical2 = lstCirculos.circles[3].x - lstCirculos.circles[2].x;
                double intervalVertical2 = distVertical2 / numVerticalLines;

                double intervalVerticalY1 = (lstCirculos.circles[1].y - lstCirculos.circles[0].y) * 1.0 / numVerticalLines;
                double intervalVerticalY2 = (lstCirculos.circles[3].y - lstCirculos.circles[2].y) * 1.0 / numVerticalLines;

                int index_x = 1;
                int aux_count = 0;
                int aux_indice_columna = 0;
                //pass throug of all the vertical lines
                for (int i = 0; i <= numVerticalLines; i++)
                {
                    #region Vertical lines of the dynamic grid - Drawing
                    //e.Graphics.DrawLine(
                    //           new Pen(Color.Red, 1f),
                    //           new Point((int)((i * intervalVertical1) + lstCirculos.circles[0].x), (int)((i * intervalVerticalY1) + lstCirculos.circles[0].y)),
                    //           new Point((int)((i * intervalVertical2) + lstCirculos.circles[2].x), (int)((i * intervalVerticalY2) + lstCirculos.circles[2].y)));
                    #endregion
                    if (k < 2)
                    //if(false)
                    {
                        #region Validation Areas of abstract DNI and Options Albergue

                        dist_X_V = Math.Abs(((i * intervalVertical1) + lstCirculos.circles[0].x) - ((i * intervalVertical2) + lstCirculos.circles[2].x));
                        dist_Y_V = Math.Abs(((i * intervalVerticalY1) + lstCirculos.circles[0].y) - ((i * intervalVerticalY2) + lstCirculos.circles[2].y));

                        delta_X_V = (dist_X_V * 1.0 / numHorizontalLines);
                        delta_Y_V = (dist_Y_V * 1.0 / numHorizontalLines);

                        int sign = 1;
                        if (lstCirculos.circles[2].x < lstCirculos.circles[0].x)
                        //if (lstCirculos.circles[2].x < lstCirculos.circles[0].x ||
                        //    lstCirculos.circles[1].x < lstCirculos.circles[3].x)
                            sign *= -1;

                        refPoint_X = (float)((i * intervalVertical1) + lstCirculos.circles[0].x);
                        refPoint_Y = (float)((i * intervalVerticalY1) + lstCirculos.circles[0].y);

                        for (int r = 0; r <= numHorizontalLines; r++)
                        {

                            float x = (refPoint_X + (r * (float)delta_X_V * sign));
                            float y = (refPoint_Y + (r * (float)delta_Y_V));

                            if (k == 0)
                            {

                                #region This is the DNI abstract area
                                int pos = (r * 8) + i;

                                abs_aux_DNI = lstAbsDNI[pos];
                                abs_aux_DNI.set_x(x);
                                abs_aux_DNI.set_y(y);

                                lstAbsDNI[pos] = abs_aux_DNI;

                                //my_pen = new Pen(Color.Green, 1f);
                                my_pen = new Pen(Color.LightGray, 1f);

                                #endregion
                            }
                            if (k == 1)
                            {
                                #region This is the Option Albergue abstract area
                                int pos = (r * 2) + i;

                                abs_aux_option = lstAbsOptions[pos];
                                abs_aux_option.set_x(x);
                                abs_aux_option.set_y(y);

                                lstAbsOptions[pos] = abs_aux_option;

                                //my_pen = new Pen(Color.PaleVioletRed, 1f);
                                my_pen = new Pen(Color.LightGray, 1f);

                                #endregion
                            }
                            e.Graphics.DrawEllipse(
                                    my_pen,
                                    x - lstCirculos.getRadio() / 2,
                                    y - lstCirculos.getRadio() / 2,
                                    lstCirculos.getRadio(), lstCirculos.getRadio());
                        }
                        #endregion
                    }
                    //else
                    if(k==2)
                    {
                        #region Validating areas of abstract questions, Sedes, ciclo y turno

                        if (i != 2 &&
                            i != 3 &&
                            i != 4 &&
                            i != 7 &&
                            i != 8 &&
                            i != 9 &&
                            i != 12 &&
                            i != 13 &&
                            i != 14 &&
                            i != 17 &&
                            i != 18 &&
                            i != 19 &&
                            i != 22 &&
                            i != 23 &&
                            i != 24)
                        {
                            dist_X_V = Math.Abs(((i * intervalVertical1) + lstCirculos.circles[0].x) - ((i * intervalVertical2) + lstCirculos.circles[2].x));
                            dist_Y_V = Math.Abs(((i * intervalVerticalY1) + lstCirculos.circles[0].y) - ((i * intervalVerticalY2) + lstCirculos.circles[2].y));

                            delta_X_V = (dist_X_V * 1.0 / numHorizontalLines);
                            delta_Y_V = (dist_Y_V * 1.0 / numHorizontalLines);

                            int sign = 1;
                            if (lstCirculos.circles[2].x < lstCirculos.circles[0].x)
                                sign *= -1;

                            refPoint_X = (float)((i * intervalVertical1) + lstCirculos.circles[0].x);
                            refPoint_Y = (float)((i * intervalVerticalY1) + lstCirculos.circles[0].y);

                            int index_y = 0;

                            //pass throug of all the validated horizontal lines
                            for (int r = 0; r <= numHorizontalLines; r++)
                            {
                                float x = (refPoint_X + (r * (float)delta_X_V * sign));
                                float y = (refPoint_Y + (r * (float)delta_Y_V));

                                //All vertical lines that belong to Sede , ciclo y turno
                                //avoiding not desiered horizontal lines
                                if (r != 5 && r != 26 &&
                                    r != 6 && r != 27 &&
                                    r != 7 && r != 28 &&
                                    r != 18 && r != 29 &&
                                    r != 19 && r != 30 &&
                                    r != 20 && r != 31 &&
                                    r != 22 && r != 32 &&
                                    r != 23 && r != 33 &&
                                    r != 24 && r != 34 && (i == 0 || i == 1))
                                {

                                    #region logic to save obstrat object to a lstAbsOjects of Sede , ciclo y turno

                                    if (r <= 4)
                                    {
                                        #region Sedes Abstrac area
                                        if (i == 1)
                                        {
                                            abs_aux_sede = lstAbsSede[r];
                                            abs_aux_sede.set_x(x);
                                            abs_aux_sede.set_y(y);

                                            lstAbsSede[r] = abs_aux_sede;

                                            //my_pen = new Pen(Color.Salmon, 1f);
                                            my_pen = new Pen(Color.LightGray, 1f);

                                        }
                                        #endregion
                                    }
                                    else
                                    {
                                        if (r <= 17)
                                        {
                                            #region Ciclo abstract area

                                            int index_pos = (i * 1) + ((r - 8) * 2);

                                            abs_aux_ciclo = lstAbsCiclo[index_pos];  // 8 - 17 -> fuera
                                            abs_aux_ciclo.set_x(x);
                                            abs_aux_ciclo.set_y(y);

                                            lstAbsCiclo[index_pos] = abs_aux_ciclo;

                                            //my_pen = new Pen(Color.Silver, 1f);
                                            my_pen = new Pen(Color.LightGray, 1f);

                                            #endregion
                                        }
                                        else
                                        {
                                            if (r <= 21)
                                            {
                                                #region Semestre abstract area
                                                int index_pos = (r - 21) + i;

                                                abs_aux_semestre = lstAbsSemestre[index_pos];
                                                abs_aux_semestre.set_x(x);
                                                abs_aux_semestre.set_y(y);

                                                lstAbsSemestre[index_pos] = abs_aux_semestre;

                                                //my_pen = new Pen(Color.Purple, 1f);
                                                my_pen = new Pen(Color.LightGray, 1f);

                                                #endregion
                                            }
                                            else
                                            {
                                                if (r <= 25)
                                                {
                                                    #region Turno abstract area
                                                    int index_pos = (r - 25) + i;

                                                    abs_aux_turno = lstAbsTurno[index_pos];
                                                    abs_aux_turno.set_x(x);
                                                    abs_aux_turno.set_y(y);

                                                    lstAbsTurno[index_pos] = abs_aux_turno;

                                                    //my_pen = new Pen(Color.Orange, 1f);
                                                    my_pen = new Pen(Color.LightGray, 1f);

                                                    #endregion
                                                }
                                            }

                                        }
                                    }

                                    if (!(r < 5 && i == 0))
                                    {
                                        e.Graphics.DrawEllipse(
                                               my_pen,
                                               x - lstCirculos.getRadio() / 2,
                                               y - lstCirculos.getRadio() / 2,
                                               lstCirculos.getRadio(), lstCirculos.getRadio());
                                    }

                                    #endregion
                                }
                                else
                                {
                                    //All vertical lines that belong to AbsQuestion
                                    if (i > 2)
                                    {
                                        #region logic to save ordered obstract question to a lstAbsQuestions

                                        //my_pen = new Pen(Color.Red, 1f);
                                        my_pen = new Pen(Color.LightGray, 1f);

                                        e.Graphics.DrawEllipse(
                                                my_pen,
                                                x - lstCirculos.getRadio() / 2,
                                                y - lstCirculos.getRadio() / 2,
                                                lstCirculos.getRadio(), lstCirculos.getRadio());

                                        //save abstract position on list
                                        if ((index_x % 2) == 1)
                                        {
                                            //add in the first columna the object to the  list
                                            abs_question.set_x1(x);
                                            abs_question.set_y1(y);

                                            abs_question.set_idQuestion(index_y + (35 * aux_indice_columna));
                                            abs_question.set_radio(lstCirculos.getRadio());

                                            lstAbsQuestions[index_y + (35 * aux_indice_columna)] = abs_question;

                                        }
                                        else
                                        {
                                            abs_aux_question.set_x1(lstAbsQuestions[index_y + (35 * aux_indice_columna)].get_x1());
                                            abs_aux_question.set_y1(lstAbsQuestions[index_y + (35 * aux_indice_columna)].get_y1());

                                            abs_aux_question.set_idQuestion(lstAbsQuestions[index_y].get_idQuestion());
                                            abs_aux_question.set_radio(lstAbsQuestions[index_y].get_radio());

                                            abs_aux_question.set_x2(x);
                                            abs_aux_question.set_y2(y);
                                            lstAbsQuestions[index_y + (35 * aux_indice_columna)] = abs_aux_question;

                                        }

                                        aux_count++;

                                        if (r == 34)
                                        {
                                            //for debug
                                            int ri = 0;
                                        }

                                        index_y++;

                                        if (aux_count % 70 == 0 && aux_count != 0)
                                        {
                                            aux_indice_columna++;
                                        }
                                        if (aux_count >= 350)
                                        {// set all vallues to zero

                                        }
                                        #endregion
                                    }

                                }

                            }

                            //not delete this count
                            index_x++;
                            //----------------------

                        }
                        #endregion
                    }

                    if (k == 3)
                    {
                        #region Validating areas of abstract questions, Sedes, ciclo y turno

                        if (i != 0 && i != COLUMNAS)
                        {
                            dist_X_V = Math.Abs(((i * intervalVertical1) + lstCirculos.circles[0].x) - ((i * intervalVertical2) + lstCirculos.circles[2].x));
                            dist_Y_V = Math.Abs(((i * intervalVerticalY1) + lstCirculos.circles[0].y) - ((i * intervalVerticalY2) + lstCirculos.circles[2].y));

                            delta_X_V = (dist_X_V * 1.0 / numHorizontalLines);
                            delta_Y_V = (dist_Y_V * 1.0 / numHorizontalLines);

                            int sign = 1;
                            if (lstCirculos.circles[2].x < lstCirculos.circles[0].x)
                                sign *= -1;

                            refPoint_X = (float)((i * intervalVertical1) + lstCirculos.circles[0].x);
                            refPoint_Y = (float)((i * intervalVerticalY1) + lstCirculos.circles[0].y);

                            int index_y = 0;

                            //pass throug of all the validated horizontal lines
                            for (int r = 0; r <= numHorizontalLines; r++)
                            {
                                float x = (refPoint_X + (r * (float)delta_X_V * sign));
                                float y = (refPoint_Y + (r * (float)delta_Y_V));

                                //All vertical lines that belong to Sede , ciclo y turno
                                //avoiding not desiered horizontal lines
                                if (true)
                                {
                                    //All vertical lines that belong to AbsQuestion
                                    //if (i > 2)
                                    if (r != 0 && r!= FILAS)
                                    //if(true)
                                    {
                                        #region logic to save ordered obstract question to a lstAbsQuestions

                                        //my_pen = new Pen(Color.Gray, 1f);
                                        //e.Graphics.DrawEllipse(
                                        //        my_pen,
                                        //        x - lstCirculos.getRadio() / 2,
                                        //        y - lstCirculos.getRadio() / 2,
                                        //        lstCirculos.getRadio(), lstCirculos.getRadio());

                                        abs_big_maya.set_x1(x);
                                        abs_big_maya.set_y1(y);

                                        abs_big_maya.set_idQuestion(index_x);
                                        abs_big_maya.set_radio(lstCirculos.getRadio());

                                        lstAbsBigMaya[index_x] = abs_big_maya;
                                        index_x++;

                                        #endregion
                                    }

                                }

                            }

                            float rr = lstAbsBigMaya[13].get_y1();
                        }
                        #endregion
                    }
                }

                #endregion

                #region draw the 4 squares that can be drag and drop
                if (k == 3)
                {
                    for (int i = 0; i < lstCirculos.circles.Count; i++)
                    {
                        e.Graphics.DrawRectangle(
                            new Pen(Color.Red, 2f),
                            lstCirculos.circles[i].getX() - (lstCirculos.circles[i].getRadio() / 2),
                            lstCirculos.circles[i].getY() - (lstCirculos.circles[i].getRadio() / 2),
                            lstCirculos.circles[i].getRadio(), lstCirculos.circles[i].getRadio());
                    }
                }
                #endregion
            }

            #endregion

            #region test - Drawing numbers of idQuestions
            int index = 0;
            for (int i = 0; i < lstAbsBigMaya.Count; i++)
            {

                //e.Graphics.DrawString((i + 1).ToString(), this.Font, Brushes.Black, lstAbsQuestions[i].get_x1(), lstAbsQuestions[i].get_y1());
                //e.Graphics.DrawString((i + 1).ToString(), this.Font, Brushes.Red, lstAbsQuestions[i].get_x2(), lstAbsQuestions[i].get_y2());

                //e.Graphics.DrawString(lstAbsDNI[i].get_idQuestion().ToString(), this.Font, Brushes.Red, lstAbsDNI[i].get_x(), lstAbsDNI[i].get_y());

                //e.Graphics.DrawString(lstAbsOptions[i].get_idQuestion().ToString(), this.Font, Brushes.Red, lstAbsOptions[i].get_x(), lstAbsOptions[i].get_y());

                //e.Graphics.DrawString(lstCiclo[i].get_idQuestion().ToString(), this.Font, Brushes.Red, lstCiclo[i].get_x(), lstCiclo[i].get_y());

                //e.Graphics.DrawString(lstSemestre[i].get_idQuestion().ToString(), this.Font, Brushes.Red, lstSemestre[i].get_x(), lstSemestre[i].get_y());

                //e.Graphics.DrawString(lstTurno[i].get_idQuestion().ToString(), this.Font, Brushes.Red, lstTurno[i].get_x(), lstTurno[i].get_y());

                //e.Graphics.DrawString(lstTurno[i].get_idQuestion().ToString(), this.Font, Brushes.Red, lstTurno[i].get_x(), lstTurno[i].get_y());

            //                lstAbsBigMaya[i].set_idQuestion(index);

            //                FontFamily fontFamily = new FontFamily("Arial");
            //Font f = new Font(
            //   fontFamily,
            //   6,
            //   FontStyle.Regular,
            //   GraphicsUnit.Pixel);

            //                e.Graphics.DrawString(lstAbsBigMaya[i].get_idQuestion().ToString(), f, Brushes.Black, lstAbsBigMaya[i].get_x1(), lstAbsBigMaya[i].get_y1());
                //e.Graphics.DrawString(lstAbsBigMaya[i].get_idQuestion().ToString(), this.Font, Brushes.Red, lstAbsBigMaya[i].get_x2(), lstAbsBigMaya[i].get_y2());

                index++;
            }
            #endregion
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            #region Image procesing Form_Load

            //if (PICK_COLOR == 0) { InicializeColorConfigurationpPen_200ppp(); rbColorPen2B.Checked = true; }
            //if (PICK_COLOR == 0) { InicializeColorConfigurationpPen_200ppp_EDIT(); rbColorPen2B.Checked = true; }
            if (PICK_COLOR == 0) { InicializeColorConfigurationpPen_200ppp_No_Inverse_First_Iteration(); rbColorPen2B.Checked = true; }
            if (PICK_COLOR == 1) { InicializeColorConfigurationBlack(); rbColorBlack.Checked = true; }
            if (PICK_COLOR == 2) { InicializeColorConfigurationRed(); rbColorRed.Checked = true; }
            if (PICK_COLOR == 3) { inicializeColorConfigurationBlue(); rbColorBlue.Checked = true; }

            DYNAMIC_VALUE = 0;
            OPTION = 0;
            LECTURE_MODE = 0;
            PAGE = 0;
            PICK_COLOR = 3;

            btnOpenFile.Enabled = false;
            btnPause.Enabled = true;
            Pause = false;
            BeginProcess = true;
            allProcessed = false;

            timer1.Enabled = false;
            timer1.Interval = 30;

            rbVideo.Checked = false;
            rbFile.Checked = true;
            btnPreview.Enabled = false;
            rbAnalizeAll.Checked = true;

            images = new List<Image<Bgr, byte>>();
            imagesNames = new List<string>();
            questions = new List<Question>();
            applicants = new List<Applicant>();

            txtTotalApplicants.Text = "1";
            txtTotalScanedPapers.Text = "1";

            TOTAL_APPLICANTS = 0;
            TOTAL_SCANNED_PAPERS = 0;

            //TestAngle();
            //Application.Idle += ProcesseFrameAndUpdateGUI;

            CreateColumnsAndData();

            #endregion

            #region Mayas inicialization  -> 3 in total

            FILAS = 48;
            COLUMNAS = 28;
            txtTotalApplicants.Text = "1000";
            LIMITE_AREA_RESPUESTA = 350;
            numMayas = 4;

            flag_init = false;

            opcion_01 = -1;
            opcion_02 = -1;
            codigo_sede = -1;
            num_01 = -1;
            num_02 = -1;
            codigo_semestre = -1;
            codigo_turno = -1;
            empty = "";

            // Dimension of picture box ->   578, 708

            #region ORIGINAL Dynamic inicialization of the mayas_corner

            //int numMayas = 3;
            //mayas_corner = new List<Circle>();

            //int count = 0;
            //for (int k = 0; k < numMayas; k++)
            //{

            //    Circle lstCirculos = new Circle();
            //    Circle circulo_0 = new Circle();
            //    Circle circulo_1 = new Circle();
            //    Circle circulo_2 = new Circle();
            //    Circle circulo_3 = new Circle();

            //    int lineasHorizontales = 0;
            //    int lineasVerticales = 0;

            //    lstCirculos.circles.Add(circulo_0);
            //    lstCirculos.circles.Add(circulo_1);
            //    lstCirculos.circles.Add(circulo_2);
            //    lstCirculos.circles.Add(circulo_3);

            //    for (int j = 0; j < 2; j++)
            //    {

            //        for (int i = 0; i < 2; i++)
            //        {
            //            int index = j * 2 + i;

            //            // Mayas ubications in pixels  ERG : (i * 93) + 376

            //            if (k == 0) // DNI
            //            {
            //                lineasHorizontales = 9;
            //                lineasVerticales = 7;
            //                lstCirculos.circles[index].set_X((i * 93) + 376);
            //                lstCirculos.circles[index].set_Y((j * 95) + 121);
            //            }
            //            if (k == 1) // Opcion Albergue
            //            {
            //                lineasHorizontales = 4;
            //                lineasVerticales = 1;
            //                lstCirculos.circles[index].set_X((i * 14) + 308);
            //                lstCirculos.circles[index].set_Y((j * 42) + 163); // 8.4
            //            }
            //            //if (k == 2) // sede
            //            //{
            //            //    lineasHorizontales = 4;
            //            //    lineasVerticales = 1;
            //            //    lstCirculos.circles[index].set_X((i * 13) + 116);
            //            //    lstCirculos.circles[index].set_Y((j * 43) + 243);
            //            //}
            //            //if (k == 3) //anio
            //            //{
            //            //    lineasHorizontales = 9;
            //            //    lineasVerticales = 1;
            //            //    lstCirculos.circles[index].set_X((i * 15) + 116);
            //            //    lstCirculos.circles[index].set_Y((j * 97) + 328);
            //            //}
            //            //if (k == 4) // ciclo y turno
            //            //{
            //            //    lineasHorizontales = 1;
            //            //    lineasVerticales = 1;
            //            //    lstCirculos.circles[index].set_X((i * 15) + 116);
            //            //    lstCirculos.circles[index].set_Y((j * 42) + 470);
            //            //}
            //            if (k >= 2) //respuestas
            //            {
            //                //lineasHorizontales = 34;
            //                //lineasVerticales = 2;
            //                //lstCirculos.circles[index].set_X((i * 13) + 185     +   (spaceColumnsAnswers * count)) ;
            //                //lstCirculos.circles[index].set_Y((j * 368) + 242);

            //                //implented just for answers
            //                //lineasHorizontales = 34;
            //                //lineasVerticales = 21;
            //                //lstCirculos.circles[index].set_X((i * 289) + 185 );
            //                //lstCirculos.circles[index].set_Y((j * 368) + 242);

            //                //
            //                lineasHorizontales = 34;
            //                lineasVerticales = 26;
            //                lstCirculos.circles[index].set_X((i * 347) + 121);
            //                lstCirculos.circles[index].set_Y((j * 356) + 246);

            //            }
            //        }
            //    }
            //    lstCirculos.set_X(lineasVerticales);
            //    lstCirculos.set_Y(lineasHorizontales);
            //    mayas_corner.Add(lstCirculos);
            //    if (k >= 5)
            //        count++;
            //}

            #endregion

            Inicialization_BigMaya();

            // the same nnumber of num of mayas_corner

            #region Dynamic inicialization of lstAbsDIN

            lstAbsDNI = new List<AbstractObject>();
            abs_aux_DNI = new AbstractObject();

            for (int i = 0; i < 10; i++)
            {
                for (int j = 0; j < 8; j++)
                {
                    int pos = j + (i * 8);

                    abs_aux_DNI.set_idQuestion(i);
                    abs_aux_DNI.set_respuesta(-1);
                    abs_aux_DNI.set_radio(8.7f);
                    abs_aux_DNI.set_id(pos);

                    lstAbsDNI.Add(abs_aux_DNI);
                }

            }
            #endregion

            #region Dynamic inicialization of lstAbsQuestions

            lstAbsQuestions = new List<AbstractQuestion>();
            abs_question = new AbstractQuestion();
            abs_aux_question = new AbstractQuestion();

            for (int i = 0; i < 175; i++)
            {
                AbstractQuestion aq = new AbstractQuestion();
                lstAbsQuestions.Add(aq);
            }

            #endregion

            #region Dynamic inicializatin of lstAbsOptions

            lstAbsOptions = new List<AbstractObject>();

            abs_aux_option = new AbstractObject();

            for (int i = 0; i < 5; i++)
            {
                for (int j = 0; j < 2; j++)
                {
                    int pos = j + (i * 2);

                    abs_aux_option.set_idQuestion(i);
                    abs_aux_option.set_respuesta(-1);
                    abs_aux_option.set_radio(8.7f);
                    abs_aux_option.set_id(pos);

                    lstAbsOptions.Add(abs_aux_option);
                }

            }
            #endregion

            #region Dynamic inicialization of lstSede

            lstAbsSede = new List<AbstractObject>();
            abs_aux_sede = new AbstractObject();

            for (int i = 0; i < 5; i++)
            {

                abs_aux_sede.set_id(i);
                abs_aux_sede.set_idQuestion(i);
                abs_aux_sede.set_radio(8.7f);
                abs_aux_sede.set_respuesta(-1);

                lstAbsSede.Add(abs_aux_sede);

            }
            #endregion

            #region Dynamic inicialization of lstCiclo

            lstAbsCiclo = new List<AbstractObject>();
            abs_aux_ciclo = new AbstractObject();

            for (int i = 0; i < 10; i++)
            {
                for (int j = 0; j < 2; j++)
                {
                    int pos = j + (i * 2);

                    abs_aux_ciclo.set_id(pos);
                    abs_aux_ciclo.set_idQuestion(i);
                    abs_aux_ciclo.set_radio(8.7f);
                    abs_aux_ciclo.set_respuesta(-1);

                    lstAbsCiclo.Add(abs_aux_ciclo);

                }

            }
            #endregion

            #region Inicialization of lstSemestre

            lstAbsSemestre = new List<AbstractObject>();
            abs_aux_semestre = new AbstractObject();
            for (int i = 0; i < 2; i++)
            {
                abs_aux_semestre.set_id(i);
                abs_aux_semestre.set_idQuestion(i);
                abs_aux_semestre.set_radio(8.7f);
                abs_aux_semestre.set_respuesta(-1);

                lstAbsSemestre.Add(abs_aux_semestre);
            }

            #endregion

            #region Inicialization of lstTurno
            lstAbsTurno = new List<AbstractObject>();
            abs_aux_turno = new AbstractObject();
            for (int i = 0; i < 2; i++)
            {
                abs_aux_turno.set_id(i);
                abs_aux_turno.set_idQuestion(i);
                abs_aux_turno.set_radio(8.7f);
                abs_aux_turno.set_respuesta(-1);

                lstAbsTurno.Add(abs_aux_turno);
            }

            #endregion

            #region Dynamic inicialization of lstAbsBigMaya

            lstAbsBigMaya = new List<AbstractQuestion>();
            abs_big_maya = new AbstractQuestion();
            abs_aux_big_maya = new AbstractQuestion();

            for (int i = 0; i < COLUMNAS*FILAS; i++)
            {
                AbstractQuestion aq = new AbstractQuestion();
                lstAbsBigMaya.Add(aq);
            }

            #endregion

            contoursPositions = new List<CountorsPositions>();

            //pictureBox1.Image = new System.Drawing.Bitmap(@"E:\Voluntades\Reclutamiento 2015\Claudia Alarcón.jpg");
            //pictureBox1.Image = new System.Drawing.Bitmap(@"C:\Users\kevin\Desktop\MVVM_ppts\2015-08-02_MVVM_242.jpg");
            //pictureBox1.Image = new System.Drawing.Bitmap(@"C:\Users\kevin\Downloads\Superior.jpeg");

            #endregion
        }
        public void CleanAllList()
        {
            //txtCode=-1;
            opcion_01 = -1;
            opcion_02 = -1;
            codigo_sede = -1;
            num_01 = -1;
            num_02 = -1;
            codigo_semestre = -1;
            codigo_turno = -1;
            //Question

            for (int k = 0; k < lstAbsQuestions.Count(); k++)
            {
                AbstractQuestion absQuestion = new AbstractQuestion();
                absQuestion = lstAbsQuestions[k];
                absQuestion.set_respuesta(-1);
                lstAbsQuestions[k] = absQuestion;
            }

            //DNI
            txtCode.Text = "";
            for (int j = 0; j < lstAbsDNI.Count(); j++)
            {
                AbstractObject absDNI = new AbstractObject();
                absDNI = lstAbsDNI[j];
                absDNI.set_respuesta(-1);
                lstAbsDNI[j] = absDNI;
            }

            //Opcion

            for (int j = 0; j < lstAbsOptions.Count(); j++)
            {
                AbstractObject absOpcion = new AbstractObject();
                absOpcion = lstAbsOptions[j];
                absOpcion.set_respuesta(-1);
                lstAbsOptions[j] = absOpcion;
            }

            //Sede

            for (int j = 0; j < lstAbsSede.Count(); j++)
            {
                AbstractObject absSede = new AbstractObject();
                absSede = lstAbsSede[j];
                absSede.set_respuesta(-1);
                lstAbsSede[j] = absSede;
            }

            //Ciclo

            for (int j = 0; j < lstAbsCiclo.Count(); j++)
            {
                AbstractObject absCiclo = new AbstractObject();
                absCiclo = lstAbsCiclo[j];
                absCiclo.set_respuesta(-1);
                lstAbsCiclo[j] = absCiclo;
            }

            //Semestre

            for (int j = 0; j < lstAbsSemestre.Count(); j++)
            {
                AbstractObject absSemestre = new AbstractObject();
                absSemestre = lstAbsSemestre[j];
                absSemestre.set_respuesta(-1);
               lstAbsSemestre[j] = absSemestre;
            }

            //turno

            for (int j = 0; j < lstAbsTurno.Count(); j++)
            {
                AbstractObject absTurno = new AbstractObject();
                absTurno = lstAbsTurno[j];
                absTurno.set_respuesta(-1);
                lstAbsTurno[j] = absTurno;
            }
        }
Example #6
0
 void Start()
 {
     objScript = gameObject.GetComponent<AbstractObject>();
 }