private void trigger_cbx_CheckedChanged(object sender, EventArgs e)
 {
     if (trigger_cbx.Checked)
     {
         tricam.stopLiveMode();
         tricam.trigger_LeftRightTimer.Start();
         if (ir_cbx.Checked || flash_cbx.Checked || ring_cbx.Checked)
         {
             ir_cbx.Checked = flash_cbx.Checked = ring_cbx.Checked = false;
         }
     }
     else
     {
         DialogResult res = MessageBox.Show("Is Trigger Working ?", "CalibrationTool", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (res == DialogResult.Yes)
         {
             Globals.currentSettings.memoryTestStruct.Trigger = PassStr;
         }
         else
         {
             Globals.currentSettings.memoryTestStruct.Trigger = FailStr;
         }
         if (leftRight_cbx.Checked == false)
         {
             tricam.trigger_LeftRightTimer.Stop();
             tricam.startLiveMode();
         }
     }
 }
Exemplo n.º 2
0
        private void LensArtifactMeasurementMode(string s, Args arg)
        {
            Globals.isHighResolution = false;
            IrMode_rb.Checked        = true;

            Globals.digitalGain = 50;
            tricam.setDigitalGain();
            tricam.startLiveMode();
            resume_btn.Enabled            = false;
            isLACod_cbx.Checked           = false;
            grading_btn.Visible           = false;
            whiteLightCapture_btn.Visible = true;
            ModeSelection_gbx.Enabled     = true;
            //IrMode_rb_CheckedChanged(null, null);
            if (Globals.browseBtnClicked)
            {
                tricam.stopLiveMode();
                whiteLightMode_rb.Checked = true;
                f.Publish(f.GradingStill, null);
                whiteLightMode_rb.Checked     = false;
                grading_btn.Visible           = true;
                whiteLightCapture_btn.Visible = false;
                resume_btn.Enabled            = true;
                ModeSelection_gbx.Enabled     = false;
            }
            //else if (IrMode_rb.Checked)
            //{
            //    Globals.isHighResolution = false;
            //    IrMode_rb.Checked = true;
            //    //IRGradingCapture();
            //}
            else if (whiteLightMode_rb.Checked)
            {
                whiteGradingCapture();
            }

            //Recommanded range for Avg peak is only for white light, so disabling when IR selected
            if (tricam.isLiveMode())
            {
                if (IrMode_rb.Checked)
                {
                    if (LA_avgPeakRange_lbl.Visible)
                    {
                        LA_avgPeakRange_lbl.Visible = false;
                        LA_avgPeakRange_lbl.Refresh();
                    }
                }
                else
                {
                    if (LA_avgPeakRange_lbl.Visible)
                    {
                        LA_avgPeakRange_lbl.Visible = true;
                        LA_avgPeakRange_lbl.Refresh();
                    }
                }
            }
        }
Exemplo n.º 3
0
 private void IrMode_rb_CheckedChanged(object sender, EventArgs e)
 {
     if (IrMode_rb.Checked)
     {
         tricam.stopLiveMode();
         Globals.isHighResolution = !IrMode_rb.Checked;
         tricam.startLiveMode();
     }
     else
     {
         tricam.stopLiveMode();
         Globals.isHighResolution = !IrMode_rb.Checked;
         tricam.startLiveMode();
     }
 }
Exemplo n.º 4
0
 public void resume_btn_Click(object sender, EventArgs e)
 {
     if (Globals.browseBtnClicked)
     {
         Globals.browseBtnClicked = false;
         IrMode_rb_CheckedChanged(null, null);
     }
     if (IrMode_rb.Checked)
     {
         Globals.isHighResolution = false;
     }
     tricam.startLiveMode();
     ModeSelection_panel.Enabled   = true;
     IrImageCapture_btn.Enabled    = true;
     whiteLightCapture_btn.Enabled = true;
     Globals.isIlluminationGrid    = true;
     manageIlluminationGrid();
     resume_btn.Enabled = false;
     this.Refresh();
 }
Exemplo n.º 5
0
 public void RingCapture_Click(object sender, EventArgs e)
 {
     // Measure_ring_btn.Enabled = true;//enable measure ring button only on first capture
     if (Globals.Retake)
     {
         IsZeroPoint.Enabled = true;
     }
     if (!Globals.IsLiveCalib)
     {
         //to enable save calib button after capture is done for 37time(-12 to +12) when start calib is clicked.
         Globals.nvramHelper.SetNvramValue(Nvram.NvramHelper.RoyalSettings.AOIRectangleX, (int)AOI_X_UPDOWN.Value);
         Globals.nvramHelper.SetNvramValue(Nvram.NvramHelper.RoyalSettings.AOIRectangleY, (int)AOI_Y_UPDOWN.Value);
         if (StartCalibClicked == true)
         {
             if (Globals.CalibOver)
             {
                 SaveCalib_btn.Enabled = true;
                 RingCapture.Enabled   = false;
             }
         }
         if (currentState == state.CaptureState)
         {
             Args arg = new Args();
             RingCapture.Text = "Resume";
             RingCapture.Refresh();
             arg["isIR"]  = false;
             currentState = state.ResumeState;
             f.Publish(f.REFRACTO_CAPTURE, arg);    //call tricam.ringcapture
         }
         else
         {
             Globals.isHighResolution = false;
             RingCapture.Text         = "RingCapture";
             RingCapture.Refresh();
             f.Publish(f.REFRACTO_NO_OF_SPOTS, null);        //set display area with grids after resuming to live mode
             if (!Globals.IsR1R2Mode)
             {
                 mycamera.initLL();
             }
             mycamera.startLiveMode();
             currentState = state.CaptureState;
         }
     }
 }