78 lines
2.6 KiB
Plaintext
78 lines
2.6 KiB
Plaintext
@page "/TestBarcodeReader"
|
|
|
|
<PageTitle>Test Barcode Reader</PageTitle>
|
|
|
|
<div class="card my-2">
|
|
<div class="card-header"><h4>Test Barcode Reader</h4></div>
|
|
<div class="card-body">
|
|
<BarcodeReader ScanResult="(e) => ScanDoneHandler(e)"
|
|
ScanBtnTitle="Scan"
|
|
ResetBtnTitle="Reset"
|
|
CloseBtnTitle="Close"
|
|
UseBuiltinDiv="false"
|
|
@ref="barcodeReaderCustom"
|
|
SelectDeviceBtnTitle="Select Device">
|
|
</BarcodeReader>
|
|
|
|
<div @ref="barcodeReaderCustom.Element" class="d-flex justify-content-center">
|
|
@* <div style="width: 480px; max-width: 100%"> *@
|
|
<div class="col-12 col-md-8 col-lg-6">
|
|
<button class="btn btn-outline-success p-2 m-1 w-25" data-action="startButton">Scan</button>
|
|
<button class="btn btn-outline-success p-2 m-1 w-25" data-action="resetButton">Reset</button>
|
|
|
|
<div data-action="sourceSelectPanel" style="display:none">
|
|
<label for="sourceSelect">Source:</label>
|
|
<select data-action="sourceSelect" style="max-width:100%" class="form-control">
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<video id="video" playsinline="true" autoplay="true" class="w-100 h-100 border rounded shadow" muted="true"></video>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@code {
|
|
private int currentCount = 0;
|
|
|
|
protected BarcodeReader barcodeReaderCustom { get; set; } = null!;
|
|
protected Random rnd = new Random();
|
|
protected async Task ScanDoneHandler(string value)
|
|
{
|
|
await Task.Delay(1);
|
|
}
|
|
private void IncrementCount()
|
|
{
|
|
currentCount++;
|
|
}
|
|
|
|
protected override void OnInitialized()
|
|
{
|
|
base.OnInitialized();
|
|
listBord01 = new();
|
|
listBord01.Add("");
|
|
listBord01.Add("White");
|
|
listBord01.Add("");
|
|
listBord01.Add("");
|
|
listBord02 = new();
|
|
listBord02.Add("");
|
|
listBord02.Add("White");
|
|
listBord02.Add("");
|
|
listBord02.Add("White");
|
|
listBord03 = new();
|
|
listBord03.Add("");
|
|
listBord03.Add("White");
|
|
listBord03.Add("");
|
|
listBord03.Add("Blue");
|
|
|
|
}
|
|
|
|
|
|
protected List<string> listBord01 { get; set; } = new();
|
|
protected List<string> listBord02 { get; set; } = new();
|
|
protected List<string> listBord03 { get; set; } = new();
|
|
|
|
protected string qrCodeVal { get; set; } = "https://office.egalware.com/WDC/UI";
|
|
}
|