Esempio n. 1
0
        private void button_Main456_Test_Click(object sender, EventArgs e)
        {
            ChannelWinformAPIFactory channelAPIFactory = new ChannelWinformAPIFactory(VendorForm.GetInstance().GetVendor());
            int height = Convert.ToInt32(textBox_Full_Height.Text);
            int width  = Convert.ToInt32(textBox_Full_Width.Text);

            for (int ch = 0; ch < VendorForm.GetInstance().GetChannelLength(); ch++)
            {
                if (Channel_API[ch] == null)
                {
                    Channel_API[ch] = channelAPIFactory.GetIBusinessAPI(richTextBoxes[ch], height, width);
                }
                if (ocparams[ch] == null)
                {
                    ocparams[ch] = new DP213_OCParameters(Channel_API[ch], ch, richTextBoxes[ch]);
                }

                double[] xyl = Channel_API[ch].measure_XYL(ch);
                if (xyl[2] > 50)
                {
                    ICompensation main456 = new DP213_Mode456_Main_Compensation(Channel_API[ch], ocparams[ch], ch, new OCVars(Channel_API[ch]));
                    main456.Compensation();
                }
            }
        }
Esempio n. 2
0
        private void button_Test_DP213CMD_Class_Click(object sender, EventArgs e)
        {
            //Verify OK
            ChannelWinformAPIFactory channelAPIFactory = new ChannelWinformAPIFactory(VendorForm.GetInstance().GetVendor());
            const int ch     = 0;
            int       height = Convert.ToInt32(textBox_Full_Height.Text);
            int       width  = Convert.ToInt32(textBox_Full_Width.Text);

            Channel_API[ch] = channelAPIFactory.GetIBusinessAPI(richTextBoxes[ch], height, width);
            DP213CMD cmd = new DP213CMD(Channel_API[ch], ch);

            cmd.SendGammaSetApplyCMD(Gamma_Set.Set1);
            cmd.SendGammaSetApplyCMD(Gamma_Set.Set2);
            cmd.SendGammaSetApplyCMD(Gamma_Set.Set3);
            cmd.SendGammaSetApplyCMD(Gamma_Set.Set4);
            cmd.SendGammaSetApplyCMD(Gamma_Set.Set5);
            cmd.SendGammaSetApplyCMD(Gamma_Set.Set6);

            cmd.DBV_Setting("FFF");
            cmd.DBV_Setting("DDD");
            cmd.DBV_Setting("ABC");

            if (ocparams[0] == null)
            {
                ocparams[0] = new DP213_OCParameters(Channel_API[0], 0, richTextBoxes[ch]);
            }
            cmd.Measure(ocparams[0], OC_Mode.Mode1, band: 0, gray: 0);
        }
Esempio n. 3
0
        private void button_Compensation_Click(object sender, EventArgs e)
        {
            ChannelWinformAPIFactory channelAPIFactory = new ChannelWinformAPIFactory(VendorForm.GetInstance().GetVendor());
            int height = Convert.ToInt32(textBox_Full_Height.Text);
            int width  = Convert.ToInt32(textBox_Full_Width.Text);

            for (int ch = 0; ch < VendorForm.GetInstance().GetChannelLength(); ch++)
            {
                if (VendorForm.GetInstance().GetVendor() == WhichVendor.Gooil ||
                    VendorForm.GetInstance().GetVendor() == WhichVendor.LGD)
                {
                    IsCAConnected[ch]     = true;
                    IsSampleDisplayed[ch] = true;
                }

                if (IsCAConnected[ch] && IsSampleDisplayed[ch])
                {
                    if (Channel_API[ch] == null)
                    {
                        Channel_API[ch] = channelAPIFactory.GetIBusinessAPI(richTextBoxes[ch], height, width);
                    }
                    if (ocparams[ch] == null)
                    {
                        ocparams[ch] = new DP213_OCParameters(Channel_API[ch], ch, richTextBoxes[ch]);
                    }

                    Channel_OC[ch] = new CompensationFacade(ModelName.DP213, Channel_API[ch], ocparams[ch], ch);
                    Channel_OC[ch].OpticCompensation();
                }
            }
        }
Esempio n. 4
0
        private void button_Test_AOD_Click(object sender, EventArgs e)
        {
            ChannelWinformAPIFactory channelAPIFactory = new ChannelWinformAPIFactory(VendorForm.GetInstance().GetVendor());
            int height = Convert.ToInt32(textBox_Full_Height.Text);
            int width  = Convert.ToInt32(textBox_Full_Width.Text);

            for (int ch = 0; ch < VendorForm.GetInstance().GetChannelLength(); ch++)
            {
                if (Channel_API[ch] == null)
                {
                    Channel_API[ch] = channelAPIFactory.GetIBusinessAPI(richTextBoxes[ch], height, width);
                }
                if (ocparams[ch] == null)
                {
                    ocparams[ch] = new DP213_OCParameters(Channel_API[ch], ch, richTextBoxes[ch]);
                }
                ICompensation graylowrefOC = new DP213_AODCompensation(Channel_API[ch], ocparams[ch], ch, new OCVars(Channel_API[ch]));
                graylowrefOC.Compensation();
            }
        }
Esempio n. 5
0
        private void button_Flash_Erase_and_Write_Click(object sender, EventArgs e)
        {
            ChannelWinformAPIFactory channelAPIFactory = new ChannelWinformAPIFactory(VendorForm.GetInstance().GetVendor());
            int height = Convert.ToInt32(textBox_Full_Height.Text);
            int width  = Convert.ToInt32(textBox_Full_Width.Text);

            for (int ch = 0; ch < VendorForm.GetInstance().GetChannelLength(); ch++)
            {
                if (Channel_API[ch] == null)
                {
                    Channel_API[ch] = channelAPIFactory.GetIBusinessAPI(richTextBoxes[ch], height, width);
                }
                if (ocparams[ch] == null)
                {
                    ocparams[ch] = new DP213_OCParameters(Channel_API[ch], ch, richTextBoxes[ch]);
                }

                IFlashMemory dP213Flash = new DP213Flash(Channel_API[ch], ocparams[ch], ch, new OCVars(Channel_API[ch]));
                dP213Flash.FlashEraseAndWrite();
            }
        }
Esempio n. 6
0
        private void button_OCParameters_Class_Verify_Click(object sender, EventArgs e)
        {
            //Verify OK
            ChannelWinformAPIFactory channelAPIFactory = new ChannelWinformAPIFactory(VendorForm.GetInstance().GetVendor());
            int height = Convert.ToInt32(textBox_Full_Height.Text);
            int width  = Convert.ToInt32(textBox_Full_Width.Text);

            for (int ch = 0; ch < VendorForm.GetInstance().GetChannelLength(); ch++)
            {
                if (Channel_API[ch] == null)
                {
                    Channel_API[ch] = channelAPIFactory.GetIBusinessAPI(richTextBoxes[ch], height, width);
                }
                DP213_OCParameters oc_param = new DP213_OCParameters(Channel_API[ch], ch, richTextBoxes[ch]);

                richTextBoxes[ch].AppendText("\n\n--Mode1--");
                oc_param.ShowOCParamData(OC_Mode.Mode1);
                oc_param.ShowVoltageData(OC_Mode.Mode1);

                richTextBoxes[ch].AppendText("\n\n--Mode2--");
                oc_param.ShowOCParamData(OC_Mode.Mode2);
                oc_param.ShowVoltageData(OC_Mode.Mode2);

                richTextBoxes[ch].AppendText("\n\n--Mode3--");
                oc_param.ShowOCParamData(OC_Mode.Mode3);
                oc_param.ShowVoltageData(OC_Mode.Mode3);

                richTextBoxes[ch].AppendText("\n\n--Mode4--");
                oc_param.ShowOCParamData(OC_Mode.Mode4);
                oc_param.ShowVoltageData(OC_Mode.Mode4);

                richTextBoxes[ch].AppendText("\n\n--Mode5--");
                oc_param.ShowOCParamData(OC_Mode.Mode5);
                oc_param.ShowVoltageData(OC_Mode.Mode5);

                richTextBoxes[ch].AppendText("\n\n--Mode6--");
                oc_param.ShowOCParamData(OC_Mode.Mode6);
                oc_param.ShowVoltageData(OC_Mode.Mode6);
            }
        }