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 static uint TakePhotos(IntPtr[] camera, int Count) { uint err = 0; uint success; for (int i = 0; i < Count; i++) { success = EDSDK.EdsSendCommand(camera[i], EDSDK.CameraCommand_TakePicture, 0); //Take Picture if (success != EDSDK.EDS_ERR_OK) { Console.WriteLine("Fail to takePic,camera num is:" + i.ToString() + "\t" + success.ToString()); err = (uint)i; } } return(err); }
public void TakePhoto() { uint err; TakingPhoto = true; err = EDSDK.EdsSendCommand(camObj, EDSDK.CameraCommand_TakePicture, 0); if (err != EDSDK.EDS_ERR_OK) { if (errorEvent != null) { errorEvent("Failed to take picture"); } return; } while (TakingPhoto) { System.Threading.Thread.Sleep(1); System.Windows.Forms.Application.DoEvents(); } }
public void TakePhotoRapidFire() { uint err; do { TakingPhoto = true; err = EDSDK.EdsSendCommand(camObj, EDSDK.CameraCommand_TakePicture, 0); if (err != EDSDK.EDS_ERR_OK && err != EDSDK.EDS_ERR_DEVICE_BUSY) { if (errorEvent != null) { errorEvent("Failed to take picture"); } return; } else { System.Threading.Thread.Sleep(100); } } while (err == EDSDK.EDS_ERR_DEVICE_BUSY); }
public void ShutterPressed(int state) { UInt32 returnValue = EDSDK.EdsSendCommand(this.Handle, (uint)CameraCommand.PressShutterButton, state); ReturnValueManager.HandleFunctionReturnValue(returnValue); }
/// <summary> /// Take a single photo /// </summary> public void TakePhoto() { UInt32 returnValue = EDSDK.EdsSendCommand(this.Handle, (uint)CameraCommand.TakePicture, 0); ReturnValueManager.HandleFunctionReturnValue(returnValue); }
public void MoveFocus(uint value) { SDKHelper.CheckError(EDSDK.EdsSendCommand(_pointer, EDSDK.CameraCommand_DriveLensEvf, (int)value)); }
public void KeepALive() { CameraAlreadyDisposedException.ThrowIf(_disposed); SDKHelper.CheckError(EDSDK.EdsSendCommand(_pointer, EDSDK.CameraCommand_ExtendShutDownTimer, 0)); }
private void btn_shoot_click(object sender, RoutedEventArgs e) { //EdsError = EDSDK.EdsSendCommand(camera, EDSDK.CameraCommand_TakePicture, 0); EdsError = EDSDK.EdsSendCommand(camera, EDSDK.CameraCommand_PressShutterButton, (int)EDSDK.EdsShutterButton.CameraCommand_ShutterButton_Completely); EdsError = EDSDK.EdsSendCommand(camera, EDSDK.CameraCommand_PressShutterButton, (int)EDSDK.EdsShutterButton.CameraCommand_ShutterButton_OFF); }