ScannerNotifyEventArgs Constructor

Constructor for the ScannerNotifyEventArgs class.

Namespace: Honeywell.Mobility.DataCollection

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

Syntax

[C#]
public BarcodeReadEventArgs(
    int inpPortId,
    string inpPortName,
    string inpPortDeviceType,
    int inpPortStateId,
    string inpPortStateName
)
[Visual Basic]
Public Sub New ( _
    inpPortId As Integer, _
    iPortName As String, _
    inpPortDeviceType As String _
    inpPortStateId As Integer, _
    inpPortStateName As String _
)

Parameters

inpPortId
Type: System.Int32
Scanner port ID.

inpPortName
Type: System.String
Port name.

inpPortDeviceType
Type: System.String
Port device type.

inpPortStateId
Type: System.Int32
Type of port state change that has occurred.

inpPortStateName
Type: System.String
Name of port state change that has occurred.

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.ScannerNotify += new ScannerNotifyEventHandler(bcr_ScannerNotify);
}
catch (BarcodeReaderException bcrexp)
{
MessageBox.Show(bcrexp.Message);
}
}
void bcr_ScannerNotify(object sender, ScannerNotifyEventArgs snotify)
{
this.listBox1.Items.Add("PortId = " + snotify.PortId.ToString());
this.listBox1.Items.Add("PortName = " + snotify.PortName);
this.listBox1.Items.Add("Type = " + snotify.PortDeviceType);
this.listBox1.Items.Add("PortStateId = " + snotify.PortStateId.ToString());
this.listBox1.Items.Add("PortStateName = " + snotify.PortStateName);
}
}
}
[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()
        Catch bcrexp As BarcodeReaderException 
            MessageBox.Show(bcrexp.Message)
        End Try
    End Sub

    Private Sub bcr_ScannerNotify(ByVal sender As Object, ByVal snotify As Honeywell.Mobility.DataCollection.ScannerNotifyEventArgs) Handles bcr.ScannerNotify   
        ListBox1.Items.Add("PortId = " + snotify.PortId.ToString())
        ListBox1.Items.Add("PortName = " + snotify.PortName)
        ListBox1.Items.Add("Type = " + snotify.PortDeviceType)
        ListBox1.Items.Add("PortStateId = " + snotify.PortStateId.ToString())
        ListBox1.Items.Add("PortStateName = " + snotify.PortStateName)
    End Sub
End Class

More Information

ScannerNotifyEventArgs Class