BarcodeReadEventArgs Constructor

Constructor for the BarcodeReadEventArgs class.

Namespace: Honeywell.Mobility.DataCollection

Assembly: Honeywell.Mobility.DataCollection.FF3.5 (in Honeywell.Mobility.DataCollection.FF3.5.dll)

Syntax

[C#]
public BarcodeReadEventArgs(
    byte[] inpDataBuffer,
    int inpBytesInBuffer,
    string inpStrBarcodeData,
    int inpDataType,
    int inpSymbologyID,
    string strSymbologyName,
    int inpPortId,
    string strPortName,
    string strPortDeviceType
)
[Visual Basic]
Public Sub New ( _
    inpDataBuffer As Byte(), _
    inpBytesInBuffer As Integer, _
    inpStrBarcodeData As String, _
    inpDataType As Integer, _
    inpSymbologyID As Integer, _
    strSymbologyName As String, _
    inpPortId As Integer, _
    strPortName As String, _
    strPortDeviceType As String _
)

Parameters

inpDataBuffer
Type: System.Byte[]
Buffer that contains the data read.

inpBytesInBuffer
Type: System.Int32
Size of the data buffer in bytes.

inpStrBarcodeData
Type: System.String
String of bar code data.

inpDataType
Type: System.Int32
Bar code data type.

inpSymbologyID
Type: System.Int32
Bar code symbology ID.

strSymbologyName
Type: System.String
Symbology name.

inpPortId
Type: System.Int32
Scanner port ID.

strPortName
Type: System.String
Port name.

strPortDeviceType
Type: System.String
Port device type.

Examples

[C#]
using Honeywell.Mobility.DataCollection;
namespace DataCollection
{
    public partial class frmBarcodeReader : Form
    {
        private Honeywell.Mobility.DataCollection.BarcodeReader bcr;
  
        public frmBarcodeReader()
        {
            InitializeComponent();

            try
            {
                bcr = new Honeywell.Mobility.DataCollection.BarcodeReader();
                bcr.BarcodeRead += new BarcodeReadEventHandler(bcr1_BarcodeRead);
                bcr.PostRead = true;
            }
            catch (BarcodeReaderException bcrexp)
            {
                MessageBox.Show(bcrexp.Message);
            }
        }

        void bcr_BarcodeRead(object sender, Honeywell.Mobility.DataCollection.BarcodeReadEventArgs bre)
        {
            try
            {
                this.listBox1.Items.Add("StrBarcodeData = " + bre.StrBarcodeData);
                this.listBox1.Items.Add("SymbologyId = " + bre.SymbologyId);
                this.listBox1.Items.Add("SymbologyName = " + bre.SymbologyName);
                this.listBox1.Items.Add("DataType = " + bre.DataType);
                this.listBox1.Items.Add("BytesInBuffer = " + bre.BytesInBuffer);
                this.listBox1.Items.Add("PortId = " + bre.PortId);
                this.listBox1.Items.Add("PortName = " + bre.PortName);
                this.listBox1.Items.Add("PortDeviceType = " + bre.PortDeviceType);
            }
            catch (BarcodeReaderException bcrexp)
            {
                MessageBox.Show(bcrexp.Message);
            }
        }
    }
}
[VB.NET]
Imports Honeywell.Mobility.DataCollection
Public Class BarcodeReader
    Private WithEvents bcr As Honeywell.Mobility.DataCollection.BarcodeReader

    Private Sub BarcodeReader_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Try
            bcr = New Honeywell.Mobility.DataCollection.BarcodeReader()
            bcr.PostRead = True


        Catch bcrexp As BarcodeReaderException
            MessageBox.Show(bcrexp.Message)
        End Try
    End Sub

    Private Sub bcr_BarcodeRead(ByVal sender As Object, ByVal bre As Honeywell.Mobility.DataCollection.BarcodeReadEventArgs) Handles bcr.BarcodeRead  
        ListBox1.Items.Add("StrBarcodeData = " + bre.StrBarcodeData)
        ListBox1.Items.Add("SymbologyId = " + bre.SymbologyId.ToString())
        ListBox1.Items.Add("SymbologyName = " + bre.SymbologyName)
        ListBox1.Items.Add("DataType = " + bre.DataType)
        ListBox1.Items.Add("BytesInBuffer = " + bre.BytesInBuffer)
        ListBox1.Items.Add("PortId = " + bre.PortId.ToString())
        ListBox1.Items.Add("PortName = " + bre.PortName)
        ListBox1.Items.Add("PortDeviceType = " + bre.PortDeviceType)
    End Sub
End Class

More Information

BarcodeReadEventArgs Class