Beispiel #1
0
        private void toolStripButtonEndCari_Click(object sender, EventArgs e)
        {
            int step = toolStripComboBox1.SelectedIndex;

            if (step < 3)
            {
                toolStripComboBox1.SelectedIndex++;
                step++;
            }
            if (step == 3)
            {
                toolStripComboBox1.SelectedIndex = 0;
            }
            switch (step)
            {
            case 0:
            {
                break;
            }

            case 1:
            {
                panelCaribrationLeft.Enabled = panelCaribrationRight.Enabled = true;
                numLeftHigh.Enabled          = numRightHigh.Enabled = true;
                numLeftLow.Enabled           = numRightLow.Enabled = true;
                CameraCoreInterface.SetCameraCaribrationStep(2);
                CameraCoreInterface.SetCameraCaribrationParam(LeftCameraName, (int)numLeftHigh.Value, (int)numLeftLow.Value, _cemraSettings.MinDotCount, _cemraSettings.MaxError);
                CameraCoreInterface.SetCameraCaribrationParam(RightCameraName, (int)numRightHigh.Value, (int)numRightLow.Value, _cemraSettings.MinDotCount, _cemraSettings.MaxError);
                break;
            }

            case 2:
            {
                numLeftHigh.Enabled = numRightHigh.Enabled = numLeftLow.Enabled = numRightLow.Enabled = false;
                CameraCoreInterface.SetCameraCaribrationStep(3);
                CameraCoreInterface.SetCameraCaribrationParam(LeftCameraName, (int)numLeftHigh.Value, (int)numLeftLow.Value, _cemraSettings.MinDotCount, _cemraSettings.MaxError);
                CameraCoreInterface.SetCameraCaribrationParam(RightCameraName, (int)numRightHigh.Value, (int)numRightLow.Value, _cemraSettings.MinDotCount, _cemraSettings.MaxError);
                break;
            }

            case 3:
            {
                CameraCoreInterface.SetCameraCaribrationStep(0);
                panelCaribrationLeft.Enabled    = panelCaribrationRight.Enabled = false;
                toolStripButtonCariMode.Checked = false;
                toolStripButtonEndCari.Enabled  = false;
                break;
            }
            }
        }
Beispiel #2
0
        private void toolStripButtonSetting_Click(object sender, EventArgs e)
        {
            CameraViewerSettings viewerSettings = new CameraViewerSettings();

            viewerSettings.StartPosition = FormStartPosition.CenterParent;
            viewerSettings.Settings      = _cemraSettings;
            viewerSettings.ShowDialog(_parentForm);
            _cemraSettings = viewerSettings.Settings;
            if (toolStripComboBox1.SelectedIndex > 0)
            {
                CameraCoreInterface.SetCameraCaribrationParam(LeftCameraName, (int)numLeftHigh.Value, (int)numLeftLow.Value, _cemraSettings.MinDotCount, _cemraSettings.MaxError);
                CameraCoreInterface.SetCameraCaribrationParam(RightCameraName, (int)numRightHigh.Value, (int)numRightLow.Value, _cemraSettings.MinDotCount, _cemraSettings.MaxError);
            }
        }
Beispiel #3
0
 private void numericUpDown3_ValueChanged(object sender, EventArgs e)
 {
     CameraCoreInterface.SetCameraCaribrationParam(RightCameraName, (int)numRightHigh.Value, (int)numRightLow.Value, _cemraSettings.MinDotCount, _cemraSettings.MaxError);
 }