public void StopPhotoModeAsync(OnPhotoModeStoppedCallback onPhotoModeStoppedCallback) { if (this.m_NativePtr == IntPtr.Zero) { throw new InvalidOperationException("You must create a Photo Capture Object before stopping its photo mode."); } if (onPhotoModeStoppedCallback == null) { throw new ArgumentException("onPhotoModeStoppedCallback"); } this.StopPhotoMode_Internal(this.m_NativePtr, onPhotoModeStoppedCallback); }
public void StopPhotoModeAsync(OnPhotoModeStoppedCallback onPhotoModeStoppedCallback) { CaptureBehaviour.Stop(); PhotoCaptureResult result = new PhotoCaptureResult(); result.resultType = CaptureResultType.Success; if (onPhotoModeStoppedCallback != null) { onPhotoModeStoppedCallback(result); } }
public void StopPhotoModeAsync(OnPhotoModeStoppedCallback onPhotoModeStoppedCallback) { PhotoCaptureResult result = new PhotoCaptureResult(); try { m_CaptureContext.StopCaptureMode(); result.resultType = CaptureResultType.Success; onPhotoModeStoppedCallback?.Invoke(result); } catch (Exception) { result.resultType = CaptureResultType.UnknownError; onPhotoModeStoppedCallback?.Invoke(result); throw; } }
private extern void StopPhotoMode_Internal(IntPtr photoCaptureObj, OnPhotoModeStoppedCallback onPhotoModeStoppedCallback);
private static void InvokeOnPhotoModeStoppedDelegate(OnPhotoModeStoppedCallback callback, long hResult) { callback(MakeCaptureResult(hResult)); }
public extern void StopPhotoModeAsync(OnPhotoModeStoppedCallback onPhotoModeStoppedCallback);