日期:2014-05-17 浏览次数:21220 次
/*
Device開頭的都是PDA設備提供的API函數
Win32開頭的就是Win32相關API
這個設備是WIN CE 5.0系統
*/
public class DecodeEventArgs : EventArgs
{
private string barcode;
private byte type;
public DecodeEventArgs(string barcodeData, byte typeData)
{
barcode = barcodeData;
type = typeData;
}
public string Barcode
{
get { return barcode; }
set { barcode = value; }
}
public byte Type
{
get { return type; }
set { type = value; }
}
}
class Scanner
{
public event EventHandler<DecodeEventArgs> DecodeEvent;
private bool needClose = false;
private IntPtr[] hEvent = new IntPtr[2];
private IntPtr hNotify = IntPtr.Zero;
private Thread scanThread;
private bool isContinuousMode;
&n