diff --git a/EgwCoreLib.BlazorTest/Pages/TestPdfViewer.razor b/EgwCoreLib.BlazorTest/Pages/TestPdfViewer.razor new file mode 100644 index 0000000..02c751e --- /dev/null +++ b/EgwCoreLib.BlazorTest/Pages/TestPdfViewer.razor @@ -0,0 +1,24 @@ +@page "/TestPdfViewer" + +
+
+
+
+

Test pdf display

+
+
+ +
+
+
+
+

Selezione: @FileSel

+ +
+
diff --git a/EgwCoreLib.BlazorTest/Pages/TestPdfViewer.razor.cs b/EgwCoreLib.BlazorTest/Pages/TestPdfViewer.razor.cs new file mode 100644 index 0000000..5bb0a6f --- /dev/null +++ b/EgwCoreLib.BlazorTest/Pages/TestPdfViewer.razor.cs @@ -0,0 +1,19 @@ +namespace EgwCoreLib.BlazorTest.Pages +{ + public partial class TestPdfViewer + { + protected string FileSel + { + get => fileSel; + set + { + if (fileSel != value) + { + fileSel = value; + StateHasChanged(); + } + } + } + private string fileSel { get; set; } = "File01.pdf"; + } +} \ No newline at end of file diff --git a/EgwCoreLib.BlazorTest/Pages/_Layout.cshtml b/EgwCoreLib.BlazorTest/Pages/_Layout.cshtml index f3cbc14..48d1302 100644 --- a/EgwCoreLib.BlazorTest/Pages/_Layout.cshtml +++ b/EgwCoreLib.BlazorTest/Pages/_Layout.cshtml @@ -44,9 +44,17 @@ onConnectionUp: () => console.log("Client reconnected!") } }).then(() => { - Blazor.defaultReconnectionHandler._reconnectCallback = function (d) { - document.location.reload(); - } + Object.defineProperty(Blazor.defaultReconnectionHandler, '_reconnectionDisplay', { + get() { + return this.__reconnectionDisplay; + }, + set(value) { + this.__reconnectionDisplay = { + show: () => value.show(), + update: (d) => value.update(d), + rejected: (d) => document.location.reload() + } + } }); }); diff --git a/EgwCoreLib.BlazorTest/wwwroot/test/File01.pdf b/EgwCoreLib.BlazorTest/wwwroot/test/File01.pdf new file mode 100644 index 0000000..de5ec71 Binary files /dev/null and b/EgwCoreLib.BlazorTest/wwwroot/test/File01.pdf differ diff --git a/EgwCoreLib.BlazorTest/wwwroot/test/File02.pdf b/EgwCoreLib.BlazorTest/wwwroot/test/File02.pdf new file mode 100644 index 0000000..d7dc79c Binary files /dev/null and b/EgwCoreLib.BlazorTest/wwwroot/test/File02.pdf differ diff --git a/EgwCoreLib.BlazorTest/wwwroot/test/File03.pdf b/EgwCoreLib.BlazorTest/wwwroot/test/File03.pdf new file mode 100644 index 0000000..9bd45aa Binary files /dev/null and b/EgwCoreLib.BlazorTest/wwwroot/test/File03.pdf differ diff --git a/EgwCoreLib.BlazorTest/wwwroot/test/File04.pdf b/EgwCoreLib.BlazorTest/wwwroot/test/File04.pdf new file mode 100644 index 0000000..7bcc17f Binary files /dev/null and b/EgwCoreLib.BlazorTest/wwwroot/test/File04.pdf differ diff --git a/EgwCoreLib.BlazorTest/wwwroot/test/File05.pdf b/EgwCoreLib.BlazorTest/wwwroot/test/File05.pdf new file mode 100644 index 0000000..5860114 Binary files /dev/null and b/EgwCoreLib.BlazorTest/wwwroot/test/File05.pdf differ diff --git a/EgwCoreLib.Razor/EgwCoreLib.Razor.csproj b/EgwCoreLib.Razor/EgwCoreLib.Razor.csproj index 9a99e29..06ac4f4 100644 --- a/EgwCoreLib.Razor/EgwCoreLib.Razor.csproj +++ b/EgwCoreLib.Razor/EgwCoreLib.Razor.csproj @@ -33,6 +33,7 @@ + @@ -52,6 +53,7 @@ true PreserveNewest + diff --git a/EgwCoreLib.Razor/PdfViewer.razor b/EgwCoreLib.Razor/PdfViewer.razor index 2c8e950..3465e75 100644 --- a/EgwCoreLib.Razor/PdfViewer.razor +++ b/EgwCoreLib.Razor/PdfViewer.razor @@ -1,12 +1,10 @@ -
- @if (isMobile) - { -

Mobile

-