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.
- C#
- VB.NET
public class ScanEventArgs : EventArgs
Public Class ScanEventArgs
Inherits EventArgs
Constructors
ScanEventArgs(data, success)
Initializes a new instance of the ScanEventArgs class.
| Name | Type | Description |
|---|---|---|
| data | String | The data encoded in the barcode, or the error message when the scan failed. |
| success | Boolean | true 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
Data
String: Returns the scanned data.
Success
Boolean: Returns whether a barcode was detected.
Used By
| Name | Description |
|---|---|
| ScanEventHandler | Represents the method that will handle the ScanSuccess event. |