private void btnReset_Click(object sender, EventArgs e) { if (rbDriverDefaults.Checked) { Settings.Default.Reset(); } else { SiumulatedCameraType cameraType = SiumulatedCameraType.AnalogueNonIntegrating; if (rbAnalogueNonIntegrating.Checked) { cameraType = SiumulatedCameraType.AnalogueNonIntegrating; } else if (rbAnalogueIntegrating.Checked) { cameraType = SiumulatedCameraType.AnalogueIntegrating; } else if (rbDigitalVideoCamera.Checked) { cameraType = SiumulatedCameraType.Digital; } else if (rbVideoSystem.Checked) { cameraType = SiumulatedCameraType.VideoSystem; } Settings.Default.Reset(cameraType); Settings.Default.Save(); } DialogResult = DialogResult.OK; Close(); }
public void Reset() { VideoCaptureDeviceName = DEFAULT_VIDEO_CAPTURE_DEVICE_NAME; SupportedActionsList = DEFAULT_SUPPORTED_ACTIONS_LIST; ExposureMin = DEFAULT_EXPOSURE_MIN; ExposureMax = DEFAULT_EXPOSURE_MAX; CameraType = DEFAULT_CAMERA_TYPE; CameraFrameRate = DEFAULT_CAMERA_FRAME_RATE; SupportedExposuresList = DEFAULT_SUPPORTED_EXPOSURES_LIST; SensorName = DEFAULT_SENSOR_NAME; SensorType = DEFAULT_SENSOR_TYPE; BitDepth = DEFAULT_BIT_DEPTH; SourceBitmapFilesLocation = DEFAULT_BITMAPS_LOCATION; }
private void CameraTypeChanged() { SiumulatedCameraType cameraType = GetSelectedCameraType(); if (settingsManager != null) { settingsManager.CameraTypeChanged(cameraType); } cbxBitDepth.Enabled = rbDigitalCamera.Checked || rbVideoSystem.Checked; if (rbAnalogueIntegrating.Checked || rbAnalogueNonIntegrating.Checked) { SetBitDepthSelection(8); } }
public void Load() { using (RegistryKey key = EnsureRegistryKey()) { VideoCaptureDeviceName = (string)key.GetValue("VideoCaptureDeviceName", DEFAULT_VIDEO_CAPTURE_DEVICE_NAME); SupportedActionsList = (string)key.GetValue("SupportedActionsList", DEFAULT_SUPPORTED_ACTIONS_LIST); ExposureMin = double.Parse((string)key.GetValue("ExposureMin", DEFAULT_EXPOSURE_MIN), CultureInfo.InvariantCulture); ExposureMax = double.Parse((string)key.GetValue("ExposureMax", DEFAULT_EXPOSURE_MAX), CultureInfo.InvariantCulture); CameraType = (SiumulatedCameraType)key.GetValue("CameraType", DEFAULT_CAMERA_TYPE); CameraFrameRate = (AnalogueCameraFrameRate)key.GetValue("CameraFrameRate", DEFAULT_CAMERA_FRAME_RATE); SupportedExposuresList = (string)key.GetValue("SupportedExposuresList", DEFAULT_SUPPORTED_EXPOSURES_LIST); SensorName = (string)key.GetValue("SensorName", DEFAULT_SENSOR_NAME); SensorType = (string)key.GetValue("SensorType", DEFAULT_SENSOR_TYPE); BitDepth = (int)key.GetValue("BitDepth", DEFAULT_BIT_DEPTH); SourceBitmapFilesLocation = (string)key.GetValue("SourceBitmapFilesLocation", DEFAULT_BITMAPS_LOCATION); } }
internal void Reset(SiumulatedCameraType cameraType) { switch (cameraType) { case SiumulatedCameraType.AnalogueNonIntegrating: ResetAnalogueNonIntegratingDefaults(); break; case SiumulatedCameraType.AnalogueIntegrating: ResetAnalogueIntegratingDefaults(); break; case SiumulatedCameraType.Digital: ResetDigitalDefaults(); break; case SiumulatedCameraType.VideoSystem: ResetVideoSystemDefaults(); break; default: throw new ArgumentOutOfRangeException(); } }
private void CameraTypeChangedInternal(SiumulatedCameraType cameraType) { m_ucAnalogueCameraSettings.Enabled = cameraType == SiumulatedCameraType.AnalogueIntegrating || cameraType == SiumulatedCameraType.AnalogueNonIntegrating; m_ucIntegratingCameraSettings.Enabled = cameraType != SiumulatedCameraType.AnalogueNonIntegrating; }
void ISettingsPagesManager.CameraTypeChanged(SiumulatedCameraType cameraType) { CameraTypeChangedInternal(cameraType); }