Пример #1
0
        void webCamTimer_Tick(object sender, EventArgs e)
        {
            var bitmap = wCam.GetCurrentImage();

            if (bitmap == null)
            {
                return;
            }
            var reader = new BarcodeReader();
            var result = reader.Decode(bitmap);

            if (result != null)
            {
                txtTypeWebCam.Text    = result.BarcodeFormat.ToString();
                txtContentWebCam.Text = result.Text;
            }
        }
Пример #2
0
        void webCamTimer_Tick(object sender, EventArgs e)
        {
            var bitmap = wCam.GetCurrentImage();

            if (bitmap == null)
            {
                return;
            }
            Decode(bitmap, TryMultipleBarcodes, new List <BarcodeFormat> {
                BarcodeFormat.QR_CODE
            });
            //var reader = new BarcodeReader();
            //var result = reader.Decode(bitmap);
            //if (result != null)
            //{
            //    txtTypeWebCam.Text = result.BarcodeFormat.ToString();
            //    txtContentWebCam.Text = result.Text;
            //}
        }