Exemplo n.º 1
0
 public static UniversalCamera GetDefault()
 {
     if (_Default == null)
     {
         _Default = new UniversalCamera();
     }
     return _Default;
 }
Exemplo n.º 2
0
 public static UniversalCamera GetDefault()
 {
     if (_Default == null)
     {
         _Default = new UniversalCamera();
     }
     return(_Default);
 }
Exemplo n.º 3
0
 private async Task StopCameraPreview()
 {
     // Stop the camera preview
     if (Camera != null)
     {
         await Camera.StopPreview();
         Camera = null;
     }
 }
Exemplo n.º 4
0
        public async Task StopPreview()
        {
            // No camera available anymore
            this.CameraCaptureElement.Tag = "NoCamera";

            // Stop Camera preview
            await this.CameraMediaCapture.StopPreviewAsync();

            this.CameraMediaCapture.Dispose();
            this.CameraMediaCapture = null;

            // Reset Camera
            this.CameraCaptureElement.Source = null;
            _Default = null;
        }
Exemplo n.º 5
0
 private async Task StartCameraPreview()
 {
     // Load the camera preview
     Camera = UniversalCamera.GetDefault();
     await Camera.InitPreview(CameraPreview);
 }
Exemplo n.º 6
0
        public async Task StopPreview()
        {
            // No camera available anymore
            this.CameraCaptureElement.Tag = "NoCamera";

            // Stop Camera preview
            await this.CameraMediaCapture.StopPreviewAsync();
            this.CameraMediaCapture.Dispose();
            this.CameraMediaCapture = null;

            // Reset Camera
            this.CameraCaptureElement.Source = null;
            _Default = null;
        }