Skip to main content

ScanEventHandler

Namespace: Wisej.Web.Ext.Barcode

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

Represents the method that will handle the ScanSuccess event.

public delegate void ScanEventHandler(Object sender, ScanEventArgs e)

The same delegate is also used for the ScanError event.

Example:

this.barcodeReader1.ScanSuccess += new ScanEventHandler(barcodeReader1_Scan);
this.barcodeReader1.ScanError += new ScanEventHandler(barcodeReader1_Scan);

private void barcodeReader1_Scan(object sender, ScanEventArgs e)
{
this.labelStatus.Text = e.Success
? $"Scanned: {e.Data}"
: $"Scan failed: {e.Data}";
}

Parameters​

NameTypeDescription
senderObjectThe source of the event.
eScanEventArgsA ScanEventArgs that contains the event data.

Fired By​

NameDescription
BarcodeReader.ScanSuccessFired when the user scans a barcode.
BarcodeReader.ScanErrorFired when no barcode is detected in Manual mode.