Пример #1
0
 protected virtual void RaiseCameraEvent(CameraEventBase eventBase)
 {
     EventHandler<CameraEventBase> handler = CameraErrorEvent;
     if (handler != null) handler(this, eventBase);
 }
 private void ImageProcessorOnCameraErrorEvent(object sender, CameraEventBase cameraError)
 {
     var handler = CameraErrorEvent;
     if (handler != null)
         handler(this, cameraError);
 }
Пример #3
0
        private void ImageProcessorOnCameraErrorEvent(object sender, CameraEventBase cameraErrorInfo)
        {
            switch (cameraErrorInfo.EventType)
            {
                case CameraEventType.Shutdown:
                    TakingPicture = false;
                    //_dialogService.ShowInfo(cameraErrorInfo.Message);
                    Dispose();
                    break;
                case CameraEventType.Error:
                    TakingPicture = false;

                    ErrorEvent ev = cameraErrorInfo as ErrorEvent;
                    if (ev != null && ev.ErrorCode == ReturnValue.TakePictureAutoFocusNG)
                    {
                       // _dialogService.ShowInfo("Не удалось сфокусироваться. Пожалуйста, повторите попытку.");
                        Dispose();
                        Initialize();
                    }
                    break;
            }
        }