private string GetStringProperty(uint aPropertyId) { CameraAlreadyDisposedException.ThrowIf(_disposed); string result; SDKHelper.CheckError(EDSDK.EdsGetPropertyData(_pointer, aPropertyId, 0, out result)); return(result); }
private void SendShootCommand(IImageHandler imageHandler, uint command, int value) { CameraAlreadyDisposedException.ThrowIf(_disposed); lock (_synchronizationObject) { SDKHelper.CheckError(EDSDK.EdsSendCommand(_pointer, command, value)); _imageHandler = imageHandler; } }
public void PressShutterButton(IImageHandler imageHandler) { CameraAlreadyDisposedException.ThrowIf(_disposed); lock (_synchronizationObject) { SDKHelper.CheckError(EDSDK.EdsSendCommand(_pointer, EDSDK.CameraCommand_PressShutterButton, (int)EDSDK.EdsShutterButton.CameraCommand_ShutterButton_Completely_NonAF)); SDKHelper.CheckError(EDSDK.EdsSendCommand(_pointer, EDSDK.CameraCommand_PressShutterButton, (int)EDSDK.EdsShutterButton.CameraCommand_ShutterButton_OFF)); _imageHandler = imageHandler; } }
public uint[] GetAvailableValues(uint aPropertyType) { CameraAlreadyDisposedException.ThrowIf(_disposed); EDSDK.EdsPropertyDesc propertyDesc; try { SDKHelper.CheckError(EDSDK.EdsGetPropertyDesc(_pointer, aPropertyType, out propertyDesc)); int[] result = new int[propertyDesc.NumElements]; Array.Copy(propertyDesc.PropDesc, result, result.Length); return(Array.ConvertAll(result, new Converter <int, uint>(int32 => Convert.ToUInt32(int32)))); } catch (SDKInvalidParameterExeption) { return(new uint[0]); } }
public void KeepALive() { CameraAlreadyDisposedException.ThrowIf(_disposed); SDKHelper.CheckError(EDSDK.EdsSendCommand(_pointer, EDSDK.CameraCommand_ExtendShutDownTimer, 0)); }
public void LockUI() { CameraAlreadyDisposedException.ThrowIf(_disposed); SDKHelper.CheckError(EDSDK.EdsSendStatusCommand(_pointer, EDSDK.CameraState_UILock, 0)); }
public void SetProperty <T>(uint propertyId, T value) { CameraAlreadyDisposedException.ThrowIf(_disposed); SDKHelper.CheckError(EDSDK.EdsSetPropertyData(_pointer, propertyId, 0, sizeof(int), value)); }