Exemple #1
0
        public BarCode()
        {
            InitializeComponent();

            _reader = new EAN13Reader();

            _timer = new DispatcherTimer();
            _timer.Interval = TimeSpan.FromMilliseconds(250);
            _timer.Tick += (o, arg) => ScanPreviewBuffer();
        }
        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);
        }