ScanEventHandler
Namespace: Wisej.Web.Ext.Barcode
Assembly: Wisej.Web.Ext.Barcode (4.1.0.0)
Represents the method that will handle the ScanSuccess event.
- C#
- VB.NET
public delegate void ScanEventHandler(Object sender, ScanEventArgs e)
Public Delegate Sub ScanEventHandler(ByVal sender As [Object], ByVal e As ScanEventArgs)
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
| Name | Type | Description |
|---|---|---|
| sender | Object | The source of the event. |
| e | ScanEventArgs | A ScanEventArgs that contains the event data. |
Fired By
| Name | Description |
|---|---|
| BarcodeReader.ScanSuccess | Fired when the user scans a barcode. |
| BarcodeReader.ScanError | Fired when no barcode is detected in Manual mode. |