示例#1
0
        private void CameraTypeChanged()
        {
            SimulatedCameraType cameraType = GetSelectedCameraType();

            if (settingsManager != null)
            {
                settingsManager.CameraTypeChanged(cameraType);
            }

            cbxBitDepth.Enabled = rbDigitalCamera.Checked || rbVideoSystem.Checked;
            if (rbAnalogueIntegrating.Checked || rbAnalogueNonIntegrating.Checked)
            {
                SetBitDepthSelection(8);
            }
        }
示例#2
0
        private void btnReset_Click(object sender, EventArgs e)
        {
            if (rbDriverDefaults.Checked)
            {
                Settings.Default.ResetDefaults();
                Settings.Default.Save();
            }
            else
            {
                SimulatedCameraType cameraType = SimulatedCameraType.AnalogueNonIntegrating;

                if (rbAnalogueNonIntegrating.Checked)
                {
                    cameraType = SimulatedCameraType.AnalogueNonIntegrating;
                }
                else if (rbAnalogueIntegrating.Checked)
                {
                    cameraType = SimulatedCameraType.AnalogueIntegrating;
                }
                else if (rbDigitalVideoCamera.Checked)
                {
                    cameraType = SimulatedCameraType.Digital;
                }
                else if (rbVideoSystem.Checked)
                {
                    cameraType = SimulatedCameraType.VideoSystem;
                }

                Settings.Default.Reset(cameraType);
                Settings.Default.Save();
            }

            DialogResult = DialogResult.OK;

            Close();
        }
示例#3
0
        internal void Reset(SimulatedCameraType cameraType)
        {
            switch (cameraType)
            {
            case SimulatedCameraType.AnalogueNonIntegrating:
                ResetAnalogueNonIntegratingDefaults();
                break;

            case SimulatedCameraType.AnalogueIntegrating:
                ResetAnalogueIntegratingDefaults();
                break;

            case SimulatedCameraType.Digital:
                ResetDigitalDefaults();
                break;

            case SimulatedCameraType.VideoSystem:
                ResetVideoSystemDefaults();
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
示例#4
0
        private void CameraTypeChangedInternal(SimulatedCameraType cameraType)
        {
            m_ucAnalogueCameraSettings.SetVisibility(cameraType == SimulatedCameraType.AnalogueIntegrating || cameraType == SimulatedCameraType.AnalogueNonIntegrating);

            m_ucIntegratingCameraSettings.SetVisibility(cameraType != SimulatedCameraType.AnalogueNonIntegrating);
        }
示例#5
0
 void ISettingsPagesManager.CameraTypeChanged(SimulatedCameraType cameraType)
 {
     CameraTypeChangedInternal(cameraType);
 }