예제 #1
0
        private void OnPhotoCameraInitialized(object sender, CameraOperationCompletedEventArgs e)
        {
            int width = Convert.ToInt32(_photoCamera.PreviewResolution.Width);
            int height = Convert.ToInt32(_photoCamera.PreviewResolution.Height);

            this._luminance = new PhotoCameraLuminanceSource(width, height);
            this._reader = new BarcodeReader();
            _reader.Options.TryHarder = true;

            Dispatcher.BeginInvoke(() => _previewTransform.Rotation = _photoCamera.Orientation);

            _photoCamera.Resolution = _photoCamera.AvailableResolutions.First();

            _isInitialized = true;
        }
예제 #2
0
        private void OnPhotoCameraInitialized(object sender, CameraOperationCompletedEventArgs e)
        {
            int width  = Convert.ToInt32(_photoCamera.PreviewResolution.Width);
            int height = Convert.ToInt32(_photoCamera.PreviewResolution.Height);

            this._luminance           = new PhotoCameraLuminanceSource(width, height);
            this._reader              = new BarcodeReader();
            _reader.Options.TryHarder = true;

            Dispatcher.BeginInvoke(() => _previewTransform.Rotation = _photoCamera.Orientation);

            _photoCamera.Resolution = _photoCamera.AvailableResolutions.First();

            _isInitialized = true;
        }