Skip to main content

ScanEventArgs

Namespace: Wisej.Web.Ext.Barcode

Assembly: Wisej.Web.Ext.Barcode (4.1.0.0)

Provides data for the ScanSuccess event of the BarcodeReader component.

public class ScanEventArgs : EventArgs

Constructors​

Instance member ScanEventArgs(data, success)​

Initializes a new instance of the ScanEventArgs class.

NameTypeDescription
dataStringThe data encoded in the barcode, or the error message when the scan failed.
successBooleantrue if a barcode was detected; otherwise false.

Example:

The following example fires the ScanSuccess event from a derived reader, for example to simulate a scan in a test:

public class TestBarcodeReader : BarcodeReader
{
public void SimulateScan(string data)
{
OnScanSuccess(new ScanEventArgs(data, true));
}
}

Properties​

Instance member Data​

String: Returns the scanned data.

Instance member Success​

Boolean: Returns whether a barcode was detected.

Used By​

NameDescription
ScanEventHandlerRepresents the method that will handle the ScanSuccess event.