public bool Set_Auto(ECAM_AUTO_TYPE tsECam_Type, ECAM_AUTO_VALUE tsEcam_Value) { if (_Idriver_camera != null) { return(_Idriver_camera.Set_Auto(tsECam_Type, tsEcam_Value)); } return(false); }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public bool Set_Auto(ECAM_AUTO_TYPE type, ECAM_AUTO_VALUE value) { switch (type) { case ECAM_AUTO_TYPE.eExposure: switch (value) { case ECAM_AUTO_VALUE.Off: return(_camera.Parameters[PLCamera.ExposureAuto].TrySetValue(PLCamera.ExposureAuto.Off)); case ECAM_AUTO_VALUE.Once: return(_camera.Parameters[PLCamera.ExposureAuto].TrySetValue(PLCamera.ExposureAuto.Once)); case ECAM_AUTO_VALUE.Continuous: return(_camera.Parameters[PLCamera.ExposureAuto].TrySetValue(PLCamera.ExposureAuto.Continuous)); } break; case ECAM_AUTO_TYPE.eGain: switch (value) { case ECAM_AUTO_VALUE.Off: return(_camera.Parameters[PLCamera.GainAuto].TrySetValue(PLCamera.GainAuto.Off)); case ECAM_AUTO_VALUE.Once: return(_camera.Parameters[PLCamera.GainAuto].TrySetValue(PLCamera.GainAuto.Once)); case ECAM_AUTO_VALUE.Continuous: return(_camera.Parameters[PLCamera.GainAuto].TrySetValue(PLCamera.GainAuto.Continuous)); } break; case ECAM_AUTO_TYPE.eWhiteBalance: switch (value) { case ECAM_AUTO_VALUE.Off: return(_camera.Parameters[PLCamera.BalanceWhiteAuto].TrySetValue(PLCamera.BalanceWhiteAuto.Off)); case ECAM_AUTO_VALUE.Once: return(_camera.Parameters[PLCamera.BalanceWhiteAuto].TrySetValue(PLCamera.BalanceWhiteAuto.Once)); case ECAM_AUTO_VALUE.Continuous: return(_camera.Parameters[PLCamera.BalanceWhiteAuto].TrySetValue(PLCamera.BalanceWhiteAuto.Continuous)); } break; } return(false); }