예제 #1
0
        private void button_Display_Pattern_Click(object sender, EventArgs e)
        {
            ChannelWinformAPIFactory channelAPIFactory = new ChannelWinformAPIFactory(VendorForm.GetInstance().GetVendor());
            byte R = Convert.ToByte(textBox_R.Text);
            byte G = Convert.ToByte(textBox_G.Text);
            byte B = Convert.ToByte(textBox_B.Text);

            byte[] RGB = new byte[3] {
                R, G, B
            };
            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)
                {
                    IsSampleDisplayed[ch] = true;
                }
                if (VendorForm.GetInstance().GetVendor() == WhichVendor.LGD)
                {
                    IsSampleDisplayed[ch] = true;                                                         //for test
                }
                if (IsSampleDisplayed[ch])
                {
                    if (Channel_API[ch] == null)
                    {
                        Channel_API[ch] = channelAPIFactory.GetIBusinessAPI(richTextBoxes[ch], height, width);
                    }
                    Channel_API[ch].DisplayMonoPattern(RGB, ch);
                }
            }
        }
예제 #2
0
        private void button_Read_Click(object sender, EventArgs e)
        {
            ChannelWinformAPIFactory channelAPIFactory = new ChannelWinformAPIFactory(VendorForm.GetInstance().GetVendor());
            byte Address = Convert.ToByte(Convert.ToInt32(textBox_Read_Address.Text, 16));
            int  amount  = Convert.ToInt32(textBox_Read_HowMany.Text);
            int  offset  = Convert.ToInt32(textBox_Read_Offset.Text, 16);

            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)
                {
                    IsSampleDisplayed[ch] = true;
                }
                if (VendorForm.GetInstance().GetVendor() == WhichVendor.LGD)
                {
                    IsSampleDisplayed[ch] = true;
                }

                if (IsSampleDisplayed[ch])
                {
                    if (Channel_API[ch] == null)
                    {
                        Channel_API[ch] = channelAPIFactory.GetIBusinessAPI(richTextBoxes[ch], height, width);
                    }
                    ReadData[ch] = Channel_API[ch].ReadData(Address, amount, offset, ch);
                }
            }
        }
예제 #3
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();
                }
            }
        }
예제 #4
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);
        }
예제 #5
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();
                }
            }
        }
예제 #6
0
        private void button_Measure_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)
                {
                    IsCAConnected[ch] = true;
                }
                if (VendorForm.GetInstance().GetVendor() == WhichVendor.LGD)
                {
                    IsCAConnected[ch] = true;
                }

                if (IsCAConnected[ch])
                {
                    if (Channel_API[ch] == null)
                    {
                        Channel_API[ch] = channelAPIFactory.GetIBusinessAPI(richTextBoxes[ch], height, width);
                    }
                    MeasuredXYLv[ch] = Channel_API[ch].measure_XYL(ch);
                }
            }
        }
예제 #7
0
        private void button_Write_Click(object sender, EventArgs e)
        {
            ChannelWinformAPIFactory channelAPIFactory = new ChannelWinformAPIFactory(VendorForm.GetInstance().GetVendor());
            byte Address = Convert.ToByte(Convert.ToInt32(textBox_Write_Address.Text, 16));

            byte[] parameters = Get_pamaeters();

            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)
                {
                    IsSampleDisplayed[ch] = true;
                }
                if (VendorForm.GetInstance().GetVendor() == WhichVendor.LGD)
                {
                    IsSampleDisplayed[ch] = true;                                                         //for test
                }
                if (IsSampleDisplayed[ch])
                {
                    richTextBoxes[ch].AppendText("ch : " + ch);

                    if (Channel_API[ch] == null)
                    {
                        Channel_API[ch] = channelAPIFactory.GetIBusinessAPI(richTextBoxes[ch], height, width);
                    }
                    Channel_API[ch].WriteData(Address, parameters, ch);
                }
            }
        }
예제 #8
0
        private void button_display_box_pattern_Click(object sender, EventArgs e)
        {
            ChannelWinformAPIFactory channelAPIFactory = new ChannelWinformAPIFactory(VendorForm.GetInstance().GetVendor());

            byte f_red   = Convert.ToByte(textBox_box_fore_R.Text);
            byte f_green = Convert.ToByte(textBox_box_fore_G.Text);
            byte f_blue  = Convert.ToByte(textBox_box_fore_B.Text);

            byte[] Box_RGB = new byte[3] {
                f_red, f_green, f_blue
            };

            byte b_red   = Convert.ToByte(textBox_box_back_R.Text);
            byte b_green = Convert.ToByte(textBox_box_back_G.Text);
            byte b_blue  = Convert.ToByte(textBox_box_back_B.Text);

            byte[] BackGround_RGB = new byte[3] {
                b_red, b_green, b_blue
            };

            int box_left = Convert.ToInt32(textBox_Pos_BoxLeft.Text);
            int box_top  = Convert.ToInt32(textBox_Pos_BoxTop.Text);

            int[] Pos_BoxLeftTop = new int[2] {
                box_left, box_top
            };

            int box_right  = Convert.ToInt32(textBox_Pos_BoxRight.Text);
            int box_bottom = Convert.ToInt32(textBox_Pos_BoxBottom.Text);

            int[] Pos_BoxRightBottom = new int[2] {
                box_right, box_bottom
            };

            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)
                {
                    IsSampleDisplayed[ch] = true;
                }
                if (VendorForm.GetInstance().GetVendor() == WhichVendor.LGD)
                {
                    IsSampleDisplayed[ch] = true;                                                         //for test
                }
                if (IsSampleDisplayed[ch])
                {
                    if (Channel_API[ch] == null)
                    {
                        Channel_API[ch] = channelAPIFactory.GetIBusinessAPI(richTextBoxes[ch], height, width);
                    }
                    Channel_API[ch].DisplayBoxPattern(Box_RGB, BackGround_RGB, Pos_BoxLeftTop, Pos_BoxRightBottom, ch);
                }
            }
        }
예제 #9
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();
            }
        }
예제 #10
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();
            }
        }
예제 #11
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);
            }
        }