Merge branch 'release/FixCloseScanner'

This commit is contained in:
Samuele Locatelli
2021-11-25 17:17:19 +01:00
2 changed files with 10 additions and 7 deletions
+1 -2
View File
@@ -77,10 +77,9 @@
OnBarcodeReceived="LocalReceivedBarcodeText" />*@
/* ((e) => { BarCode = e; ShowScanBarcode = !ShowScanBarcode; }) */
<BarcodeReader ScanResult="(e) => ScanDoneHandler(e)"
ShowScanBarcode="ShowScanBarcode"
Close="() => ShowScanBarcode=!ShowScanBarcode"
Close="() => ResetScanner()"
ScanBtnTitle="Scan"
ResetBtnTitle="Reset"
CloseBtnTitle="Close"
+9 -5
View File
@@ -174,6 +174,7 @@ namespace GWMS.UI.Pages
protected DateTime vetoScan = DateTime.Now;
#if false
private async Task LocalReceivedBarcodeText(BarcodeReceivedEventArgs args)
{
DateTime adesso = DateTime.Now;
@@ -191,10 +192,9 @@ namespace GWMS.UI.Pages
var result = ProcessBarcode(ordCode);
}
}
}
}
#endif
//[Parameter]
//public EventCallback<string> ScanDone { get; set; }
protected void ScanDoneHandler(string value)
{
@@ -215,11 +215,10 @@ namespace GWMS.UI.Pages
private bool ShowScanBarcode { get; set; } = false;
public string? BarCode { get; set; }
private async Task ProcessBarcode(string Barcode)
{
if (doProcess(Barcode))
if (OrderCode != Barcode)
{
await InvokeAsync(() =>
{
@@ -310,6 +309,11 @@ namespace GWMS.UI.Pages
protected void ResetData()
{
}
protected void ResetScanner()
{
SelPlantId = 0;
forceReset();
}
protected void ToggleBCode()
{