Пример #1
0
        /// <summary>
        /// Computing from refacto DLL to get Ring parameters when clicked on measure button
        /// </summary>
        private void DoRingCalculations()
        {
            double zeroDiopterR1 = 0.0;
            double sixDiopterR1  = 0.0;

            if (mycamera.isLiveMode() == false)
            {
                RingCapture_Click(null, null);
            }
            MessageBox.Show("please attach the JIG without any lens and press OK");
            //Capture
            RingCapture_Click(null, null);
            mycamera.getFrame();
            GetRingParameters();
            zeroDiopterR1 = rc.rc.R1;
            //GetSensitivity();
            showRingDetails();
            //Display msg box 6D
            if (mycamera.isLiveMode() == false)
            {
                RingCapture_Click(null, null);
            }
            MessageBox.Show("please keep +6D lens inside the JIG and press OK");
            //Capture
            RingCapture_Click(null, null);
            mycamera.getFrame();
            GetRingParameters();
            sixDiopterR1 = rc.rc.R1;
            //getRingParameters
            sensitivity             = sixDiopterR1 - zeroDiopterR1;
            MR.Sensitivity_tbx.Text = sensitivity.ToString("0.00");
            if (sensitivity < 23)
            {
                MR.Sensitivity_tbx.BackColor = Color.Red;
            }
            else
            {
                MR.Sensitivity_tbx.BackColor = Color.Green;
            }
        }