From ecc84f119c5dc1faf6d17a1b4eb07ee0e1027caf Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 9 Apr 2025 07:37:23 +0200 Subject: [PATCH] Update versione JS XZing x barcode --- .../Pages/TestBarcodeReader.razor | 56 ++++++++++++------- EgwCoreLib.BlazorTest/Program.cs | 4 ++ EgwCoreLib.Razor/BarcodeReader.razor.cs | 3 + EgwCoreLib.Razor/EgwCoreLib.Razor.csproj | 4 +- 4 files changed, 44 insertions(+), 23 deletions(-) diff --git a/EgwCoreLib.BlazorTest/Pages/TestBarcodeReader.razor b/EgwCoreLib.BlazorTest/Pages/TestBarcodeReader.razor index 07343cf..4c4ebe9 100644 --- a/EgwCoreLib.BlazorTest/Pages/TestBarcodeReader.razor +++ b/EgwCoreLib.BlazorTest/Pages/TestBarcodeReader.razor @@ -5,31 +5,39 @@

Test Barcode Reader

- - + @if (ShowScanBarcode) + { + + -
-
- - +
+
+ + + -
- - -
-
- +
+ + +
+
+ +
-
+ } + else + { + + }
@@ -48,4 +56,10 @@ } protected string qrCodeVal { get; set; } = "https://office.egalware.com/WDC/UI"; + + protected void ToggleCodeScan() + { + ShowScanBarcode = !ShowScanBarcode; + } + private bool ShowScanBarcode = true; } diff --git a/EgwCoreLib.BlazorTest/Program.cs b/EgwCoreLib.BlazorTest/Program.cs index 14b7b33..a7dfe61 100644 --- a/EgwCoreLib.BlazorTest/Program.cs +++ b/EgwCoreLib.BlazorTest/Program.cs @@ -1,6 +1,7 @@ using EgwCoreLib.BlazorTest; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Web; +using Microsoft.AspNetCore.Mvc.RazorPages; using Radzen; var builder = WebApplication.CreateBuilder(args); @@ -28,6 +29,9 @@ if (!app.Environment.IsDevelopment()) app.UseHsts(); } + +app.UsePathBase("/BlazorTest/"); + // disabilita risposta compressa in debug if (!app.Environment.IsDevelopment()) { diff --git a/EgwCoreLib.Razor/BarcodeReader.razor.cs b/EgwCoreLib.Razor/BarcodeReader.razor.cs index d65730d..19492c3 100644 --- a/EgwCoreLib.Razor/BarcodeReader.razor.cs +++ b/EgwCoreLib.Razor/BarcodeReader.razor.cs @@ -172,6 +172,9 @@ namespace EgwCoreLib.Razor { if (!firstRender) return; Storage = new StorageService(JS); +#if false + module = await JS.InvokeAsync("import", "./_content/EgwCoreLib.Razor/BarcodeReader.razor.js" + "?v=" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version); +#endif module = await JS.InvokeAsync("import", "./_content/EgwCoreLib.Razor/BarcodeReader.razor.js" + "?v=" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version); Instance = DotNetObjectReference.Create(this); if (Options == null) diff --git a/EgwCoreLib.Razor/EgwCoreLib.Razor.csproj b/EgwCoreLib.Razor/EgwCoreLib.Razor.csproj index 77bf6d2..b680d11 100644 --- a/EgwCoreLib.Razor/EgwCoreLib.Razor.csproj +++ b/EgwCoreLib.Razor/EgwCoreLib.Razor.csproj @@ -75,8 +75,8 @@ - - + +