コード例 #1
0
        private void OnPhotoCameraInitialized(object sender, CameraOperationCompletedEventArgs e)
        {
            int width = Convert.ToInt32(PhotoCamera.PreviewResolution.Width);
            int height = Convert.ToInt32(PhotoCamera.PreviewResolution.Height);

            luminance = new PhotoCameraLuminanceSource(width, height);
            qrReader = new QRCodeReader();
            ean13Reader = new EAN13Reader();
            code39Reader = new Code39Reader();

            timer = new Timer((s) => ScanPreviewBuffer(), null, 0, 250);
        }
コード例 #2
0
        private void OnPhotoCameraInitialized(object sender, CameraOperationCompletedEventArgs e)
        {
            int width  = Convert.ToInt32(_photoCamera.PreviewResolution.Width);
            int height = Convert.ToInt32(_photoCamera.PreviewResolution.Height);

            _luminance = new PhotoCameraLuminanceSource(width, height);
            _reader    = new QRCodeReader();

            Dispatcher.BeginInvoke(() => {
                _previewTransform.Rotation = _photoCamera.Orientation;
                _timer.Start();
            });
        }
コード例 #3
0
ファイル: QR.xaml.cs プロジェクト: casablancas/MuseosApp
        private void OnPhotoCameraInitialized(object sender, CameraOperationCompletedEventArgs e)
        {
            int width = Convert.ToInt32(_photoCamera.PreviewResolution.Width);
            int height = Convert.ToInt32(_photoCamera.PreviewResolution.Height);
            
            _luminance = new PhotoCameraLuminanceSource(width, height);
            _reader = new QRCodeReader();

            Dispatcher.BeginInvoke(() => {
                _previewTransform.Rotation = _photoCamera.Orientation;
                _timer.Start();
            });
        }
コード例 #4
0
        private void OnPhotoCameraInitialized(object sender, CameraOperationCompletedEventArgs e)
        {
            int width  = Convert.ToInt32(_photoCamera.PreviewResolution.Width);
            int height = Convert.ToInt32(_photoCamera.PreviewResolution.Height);

            _luminance = new PhotoCameraLuminanceSource(width, height);
#if USE_ORIGINAL_IMPLEMENTATION
            _reader = new QRCodeReader();
#else
            _reader = new BarcodeReader(null, p => _luminance, null);
#endif

            Dispatcher.BeginInvoke(() => {
                _previewTransform.Rotation = _photoCamera.Orientation;
                _timer.Start();
            });
        }