資源簡介
調用zbar實現攝像頭讀取二維碼
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Windows.Forms;
using?System.Diagnostics;
using?System.IO;
using?System.Runtime.InteropServices;
namespace?攝像頭讀取條形碼
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
????????????Init();
????????}
????????void?pro_OutputDataReceived(object?sender?DataReceivedEventArgs?e)
????????{
????????????//可通過調用?CancelOutputRead?取消異步讀取操作。可通過調用方或事件處理程序取消讀取操作。取消之后,可以再次調用?BeginOutputReadLine?繼續進行異步讀取操作。
????????????if?(!string.IsNullOrEmpty(e.Data))
????????????{
????????????????//lin
- 上一篇:WPF的Ribbon 框架的應用
- 下一篇:C#自定義步驟條控件
評論
共有 條評論