コード例 #1
0
 private void StopCamera()
 {
     if (_device != null)
     {
         _device.Dispose();
         _device = null;
     }
 }
コード例 #2
0
        private async System.Threading.Tasks.Task StartCamera()
        {
            if (_device == null)
            {
                _device                   = new BarcodeCaptureDevice();
                _device.AutoFocus         = true;
                _device.AutoDetectBarcode = true;
                await _device.InitAsync();

                previewTransform.Rotation   = _device._device.SensorRotationInDegrees;
                barcodeUITransform.Rotation = _device._device.SensorRotationInDegrees;
                _device.BindVideoBrush(previewVideo);

                _device.BarcodeDetected += BarcodeDetected;
            }
        }