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 }