using System;
using System.Collections.Generic;
using System.Text;
using Intermec;
using Intermec.DataCollection;
namespace NIntermecScanner
{
/// <summary>
/// 此类是对Intermec扫描枪的封装
/// </summary>
public class TIntermecScanner : ICollect
{
public TIntermecScanner()
{
this.m_scanner = new BarcodeReader();
this.m_scanner.ThreadedRead( true );
this.m_scanner.BarcodeRead += new BarcodeReadEventHandler( m_scanner_BarcodeRead );
}
void m_scanner_BarcodeRead( object sender , BarcodeReadEventArgs bre )
{
if ( this.OnScanner != null )
OnScanner( sender , bre );
}
public void Stop_Scan()
{
if (m_scanner != null)
{
m_scanner.BarcodeRead -= new Intermec.DataCollection.BarcodeReadEventHandler(m_scanner_BarcodeRead);
m_scanner.Dispose();
m_scanner = null;
}
}
/// <summary>
/// 应用系统的全局枪
/// </summary>
BarcodeReader m_scanner;
public BarcodeReader P_Scanner
{
get
{
return m_scanner;
}
}
#region IScan 成员
public event dlg_ScanEventHandler OnScanner;
#endregion
}
}
winCE对Intermec扫描的封装
最新推荐文章于 2015-08-25 10:05:27 发布