public DP173_or_Elgin(OC_Single_Dual_Triple mode) { DP173_Model_Option_Form model_option_form = (DP173_Model_Option_Form)Application.OpenForms["DP173_Model_Option_Form"]; All_band_gray_Gamma = new RGB[14, 8]; //14ea Bands , 8ea Gray-points band = 0; gray = 0; loop_count = 0; Vreg1_loop_count = 0; this.loop_count_max = model_option_form.Get_Max_Loop_Count(); total_average_loop_count = 0; Initial_Vreg1 = 0; this.Skip_Lv = model_option_form.Get_Skip_Lv(); Prev_Band_Gray255_Gamma = new RGB(); Update_SET1_HBM_AM0_Hex(); Update_SET1_HBM_AM1_Hex(); //Onlt For Single Mode Gamma_Init = new RGB(); Cal_Gamma_Init = new RGB(); //----they were global variables before--- //Compensation related(RGB) Gamma = new RGB(); Measure = new XYLv(); Target = new XYLv(); Limit = new XYLv(); Extension = new XYLv(); Prev_Gamma = new RGB(); //Vreg1 related Vreg1_Need_To_Be_Updated = false; Vreg1 = 0; Diff_Vreg1 = 0; Prev_Vreg1 = 0; Vreg1_First_Gamma_Red = 0; Vreg1_First_Gamma_Blue = 0; G255_First_Gamma_Red = 0; G255_First_Gamma_Green = 0; G255_First_Gamma_Blue = 0; //RGB Infinite_Loop_Detect Infinite = false; Infinite_Count = 0; Temp_Gamma = new RGB[6]; //A0,A1,A2,A3,A4,A5 Diif_Gamma = new RGB[5]; //(A1-A0),(A2-A1),(A3-A2),(A4-A3),(A5-A4) Temp = new RGB(); //RB Vreg1_Infinite_Loop_Detect Vreg1_Infinite = false; Vreg1_Infinite_Count = 0; Vreg1_Value = new int[3]; Vreg1_Value_Temp = 0; Vreg1_Temp_Gamma = new RGB[4]; //A0,A1,A2,A3 Vreg1_Diif_Gamma = new RGB[3]; //(A1-A0),(A2-A1),(A3-A2) Vreg1_Temp = new RGB(); //dll-related variables Gamma_Out_Of_Register_Limit = false; Within_Spec_Limit = false; Gamma_Register_Limit = 511; Vreg1_Register_Limit = 2047; oc_mode = mode; IRC_G255_OC_Try_Count = 0; IRC_G255_OC_Try_Max_Count = 0; G255_IRC_OC_Verify_Limit_Ratio = 1.0; }