diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 051f033..e2f25df 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -89,21 +89,10 @@ variables: stages: - build + - deploy - release # ---------- BUILD ---------- -EgwCoreLib.Razor:build: - stage: build - tags: - - win - variables: - APP_NAME: EgwCoreLib.Razor - SOL_NAME: EgwCoreLib - before_script: - - *nuget-fix - - dotnet restore "$env:SOL_NAME.sln" - script: - - dotnet build $env:APP_NAME/$env:APP_NAME.csproj EgwCoreLib.Utils:build: stage: build @@ -118,6 +107,50 @@ EgwCoreLib.Utils:build: script: - dotnet build $env:APP_NAME/$env:APP_NAME.csproj +EgwCoreLib.Razor:build: + stage: build + tags: + - win + variables: + APP_NAME: EgwCoreLib.Razor + SOL_NAME: EgwCoreLib + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" + script: + - dotnet build $env:APP_NAME/$env:APP_NAME.csproj + +EgwCoreLib.BlazorTest:build: + stage: build + tags: + - win + variables: + APP_NAME: EgwCoreLib.BlazorTest + SOL_NAME: EgwCoreLib + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" + script: + - dotnet build $env:APP_NAME/$env:APP_NAME.csproj + +# ----- Start DEPLOY develop (IIS01) ----- +EgwCoreLib.BlazorTest:IIS01:deploy: + stage: deploy + tags: + - win + variables: + APP_NAME: EgwCoreLib.BlazorTest + SOL_NAME: EgwCoreLib + before_script: + - *nuget-fix + - dotnet restore "$env:SOL_NAME.sln" + rules: + - if: $CI_COMMIT_BRANCH == 'develop' + needs: ["EgwCoreLib.BlazorTest:build"] + script: + - dotnet build $env:APP_NAME/$env:APP_NAME.csproj + - dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj + # ---------- Upload Debug/Unstable ---------- EgwCoreLib.Razor:release-dev: stage: release diff --git a/EgwCoreLib.BlazorTest/.config/dotnet-tools.json b/EgwCoreLib.BlazorTest/.config/dotnet-tools.json new file mode 100644 index 0000000..b0e38ab --- /dev/null +++ b/EgwCoreLib.BlazorTest/.config/dotnet-tools.json @@ -0,0 +1,5 @@ +{ + "version": 1, + "isRoot": true, + "tools": {} +} \ No newline at end of file diff --git a/EgwCoreLib.BlazorTest/Components/CmpFooter.razor b/EgwCoreLib.BlazorTest/Components/CmpFooter.razor new file mode 100644 index 0000000..2cd5543 --- /dev/null +++ b/EgwCoreLib.BlazorTest/Components/CmpFooter.razor @@ -0,0 +1,16 @@ +
+
+ EgwCoreLib v.@version +
+
+ @adesso + Egalware +
+
+ +@code { + protected DateTime adesso = DateTime.Now; + + Version version = typeof(Program).Assembly.GetName().Version; + +} \ No newline at end of file diff --git a/EgwCoreLib.BlazorTest/Components/CmpTop.razor b/EgwCoreLib.BlazorTest/Components/CmpTop.razor new file mode 100644 index 0000000..659c0de --- /dev/null +++ b/EgwCoreLib.BlazorTest/Components/CmpTop.razor @@ -0,0 +1,16 @@ +
+
+
+
+ + Home + +
+
+ +
+
+ +@code { + +} diff --git a/EgwCoreLib.BlazorTest/Components/SearchMod.razor b/EgwCoreLib.BlazorTest/Components/SearchMod.razor new file mode 100644 index 0000000..a1cdcf7 --- /dev/null +++ b/EgwCoreLib.BlazorTest/Components/SearchMod.razor @@ -0,0 +1,31 @@ + +
+ + +
+ +@code { + #region Public Properties + + [Parameter] + public EventCallback searchUpdated { get; set; } + + [Parameter] + public string searchVal { get; set; } = ""; + + #endregion Public Properties + + #region Private Methods + + private void reportChange() + { + searchUpdated.InvokeAsync(searchVal); + } + + private void reset() + { + searchVal = ""; + } + + #endregion Private Methods +} diff --git a/EgwCoreLib.BlazorTest/Components/TestJsInterop.razor b/EgwCoreLib.BlazorTest/Components/TestJsInterop.razor deleted file mode 100644 index fa4ee52..0000000 --- a/EgwCoreLib.BlazorTest/Components/TestJsInterop.razor +++ /dev/null @@ -1,9 +0,0 @@ -

TestJsInterop

- - - - -@code { - - protected string qrCodeVal { get; set; } = "Some text for clipboard-copy debug"; -} diff --git a/EgwCoreLib.BlazorTest/Data/TestData.cs b/EgwCoreLib.BlazorTest/Data/TestData.cs new file mode 100644 index 0000000..e49a900 --- /dev/null +++ b/EgwCoreLib.BlazorTest/Data/TestData.cs @@ -0,0 +1,24 @@ +using EgwCoreLib.BlazorTest.Pages; + +namespace EgwCoreLib.BlazorTest.Data +{ + public class TestData + { + public static Dictionary MenuList { get; set; } = new() + { + {"TestPdfViewer", "Test PdfViewer"}, + {"TestQrDisplay", "Test QrDisplay"}, + {"TestGraphCompo", "Test Graph Compo"}, + {"TestBarcodeReader", "Test BarcodeReader"}, + {"TestCal_01", "Test Cal.01"}, + {"TestCal_02", "Test Cal.02"}, + {"TestLoading", "Test Loading"}, + {"TestComponenti", "Test Componenti"}, + {"TestCerchi", "Test Cerchi"}, + {"TestGauges", "Test Gauges"}, + {"TestMultiline", "Test Multiline"}, + {"TestChart", "Test Chart"}, + + }; + } +} diff --git a/EgwCoreLib.BlazorTest/Data/WeatherForecast.cs b/EgwCoreLib.BlazorTest/Data/WeatherForecast.cs deleted file mode 100644 index 68354c2..0000000 --- a/EgwCoreLib.BlazorTest/Data/WeatherForecast.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace EgwCoreLib.BlazorTest.Data -{ - public class WeatherForecast - { - public DateTime Date { get; set; } - - public int TemperatureC { get; set; } - - public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); - - public string? Summary { get; set; } - } -} \ No newline at end of file diff --git a/EgwCoreLib.BlazorTest/Data/WeatherForecastService.cs b/EgwCoreLib.BlazorTest/Data/WeatherForecastService.cs deleted file mode 100644 index 4ece0c9..0000000 --- a/EgwCoreLib.BlazorTest/Data/WeatherForecastService.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace EgwCoreLib.BlazorTest.Data -{ - public class WeatherForecastService - { - private static readonly string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; - - public Task GetForecastAsync(DateTime startDate) - { - return Task.FromResult(Enumerable.Range(1, 25).Select(index => new WeatherForecast - { - Date = startDate.AddDays(index), - TemperatureC = Random.Shared.Next(-20, 55), - Summary = Summaries[Random.Shared.Next(Summaries.Length)] - }).ToArray()); - } - } -} \ No newline at end of file diff --git a/EgwCoreLib.BlazorTest/EgwCoreLib.BlazorTest.csproj b/EgwCoreLib.BlazorTest/EgwCoreLib.BlazorTest.csproj index 6cd8281..0996797 100644 --- a/EgwCoreLib.BlazorTest/EgwCoreLib.BlazorTest.csproj +++ b/EgwCoreLib.BlazorTest/EgwCoreLib.BlazorTest.csproj @@ -11,6 +11,10 @@ + + <_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS01.pubxml" /> + + diff --git a/EgwCoreLib.BlazorTest/Pages/FetchData.razor b/EgwCoreLib.BlazorTest/Pages/FetchData.razor deleted file mode 100644 index d11ed1c..0000000 --- a/EgwCoreLib.BlazorTest/Pages/FetchData.razor +++ /dev/null @@ -1,42 +0,0 @@ -@page "/fetchdata" - -Weather forecast - -@using EgwCoreLib.BlazorTest.Data -@inject WeatherForecastService ForecastService - -

Weather forecast

- -

This component demonstrates fetching data from a service.

- -@if (forecasts == null) -{ -

Loading...

-} -else -{ - - - - - - - - - - - @foreach (var forecast in forecasts) - { - - - - - - - } - -
DateTemp. (C)Temp. (F)Summary
@forecast.Date.ToShortDateString()@forecast.TemperatureC@forecast.TemperatureF@forecast.Summary
- -} - - diff --git a/EgwCoreLib.BlazorTest/Pages/FetchData.razor.cs b/EgwCoreLib.BlazorTest/Pages/FetchData.razor.cs deleted file mode 100644 index 7464c91..0000000 --- a/EgwCoreLib.BlazorTest/Pages/FetchData.razor.cs +++ /dev/null @@ -1,122 +0,0 @@ -using EgwCoreLib.BlazorTest.Data; -using EgwCoreLib.Razor; - -namespace EgwCoreLib.BlazorTest.Pages -{ - public partial class FetchData - { - #region Protected Properties - - protected List PageSizeEnab { get; set; } = new List(); - - #endregion Protected Properties - - #region Protected Methods - - protected override async Task OnInitializedAsync() - { - rawData = await ForecastService.GetForecastAsync(DateTime.Now); - PageSizeEnab = new List() - { - 4,8,12,16,20,24,28,32,36,40 - }; - await ReloadAllData(); - } - - protected async Task ReloadAllData() - { - await Task.Delay(1); - totalCount = rawData.Count(); - List currForecast = rawData.ToList(); - // effetuo sort... - if (!string.IsNullOrEmpty(sortField)) - { - switch (sortField) - { - case "TempC": - if (sortAsc) - { - currForecast = currForecast.OrderBy(x => x.TemperatureC).ToList(); - } - else - { - currForecast = currForecast.OrderByDescending(x => x.TemperatureC).ToList(); - } - break; - case "TempF": - if (sortAsc) - { - currForecast = currForecast.OrderBy(x => x.TemperatureF).ToList(); - } - else - { - currForecast = currForecast.OrderByDescending(x => x.TemperatureF).ToList(); - } - break; - case "Summary": - if (sortAsc) - { - currForecast = currForecast.OrderBy(x => x.Summary).ToList(); - } - else - { - currForecast = currForecast.OrderByDescending(x => x.Summary).ToList(); - } - break; - default: - case "Date": - if (sortAsc) - { - currForecast = currForecast.OrderBy(x => x.Date).ToList(); - } - else - { - currForecast = currForecast.OrderByDescending(x => x.Date).ToList(); - } - break; - } - } - - forecasts = currForecast.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList(); - } - - protected async Task SetCurrPage(int newNum) - { - currPage = newNum; - await ReloadAllData(); - } - - protected async Task SetNumRec(int newNum) - { - numRecord = newNum; - await ReloadAllData(); - } - - protected async Task SortRequested(Sorter.SortCallBack e) - { - sortField = e.ParamName; - sortAsc = e.IsAscending; - await ReloadAllData(); - } - - #endregion Protected Methods - - #region Private Fields - - private List? forecasts; - private WeatherForecast[] rawData { get; set; } = new WeatherForecast[1]; - private bool sortAsc = true; - private string sortField = ""; - - #endregion Private Fields - - #region Private Properties - - private int currPage { get; set; } = 1; - private bool isLoading { get; set; } = false; - private int numRecord { get; set; } = 8; - private int totalCount { get; set; } = 0; - - #endregion Private Properties - } -} \ No newline at end of file diff --git a/EgwCoreLib.BlazorTest/Pages/Index.razor b/EgwCoreLib.BlazorTest/Pages/Index.razor index b6e1a1b..d53a03a 100644 --- a/EgwCoreLib.BlazorTest/Pages/Index.razor +++ b/EgwCoreLib.BlazorTest/Pages/Index.razor @@ -1,123 +1,45 @@ @page "/" +@using EgwCoreLib.BlazorTest.Data -Index -
+EgwCoreLib Test Site -
-
- +
+
+
+

EgwCoreLib

- @valDecimale + Test componenti EgwCoreLib
-
- - - - - - - - - - - - Titolo - - - - - testo più lungo... 0123456789 - - - - -
-
- - - - - - - - - - - - -
-
-
-
-
-
- -
-
- -
-
-
-
-
-
-
-
-
-
-
- +
+
+
+ -
- -
-
- -
-
-
-
+
+
+
+ @foreach (var item in MenuList) + { +
+ + +
@item.Value
+
+
+ } +
+
+
+ @code { - protected List DDemo1 = new List(); - protected List DDemoIn2 = new List(); - protected List DDemoOut2 = new List(); - protected int currVal1 = 1000; - protected int currVal2 = 1000; - protected int maxVal = 1000; - - protected decimal valDecimale = 12345; - - protected override void OnInitialized() - { - DDemo1.Clear(); - currVal1 = 800; - DDemo1.Add(new CircleGaugeMulti.CircSegm() { Color = "#DCFD15", Value = 800 }); - DDemo1.Add(new CircleGaugeMulti.CircSegm() { Color = "#13FD67", Value = 300 }); - Random rnd = new Random(); - DDemoIn2.Clear(); - DDemoOut2.Clear(); - currVal2 = 1300; - DDemoIn2.Add(new CircleGaugeMulti.CircSegm() { Color = "#DCFD15", Value = 1000 }); - DDemoIn2.Add(new CircleGaugeMulti.CircSegm() { Color = "#13FD67", Value = 600 }); - DDemoOut2.Add(new CircleGaugeMulti.CircSegm() { Color = "#1367FD", Value = 300 }); - // DataDemo.Add(new CircleGaugeMulti.CircSegm() { Color = "#1515FD", Value = 700 }); - // currVal = rnd.Next(maxVal - 200, maxVal + 500); - // DataDemo.Add(new CircleGaugeMulti.CircSegm() { Color = "#13FD67", Value = currVal / 4 }); - // DataDemo.Add(new CircleGaugeMulti.CircSegm() { Color = "#ACFD15", Value = currVal / 4 }); - // DataDemo.Add(new CircleGaugeMulti.CircSegm() { Color = "#1515FD", Value = currVal / 2 }); - } + private Dictionary MenuList { get; set; } = TestData.MenuList; } \ No newline at end of file diff --git a/EgwCoreLib.BlazorTest/Pages/TestBarcodeReader.razor b/EgwCoreLib.BlazorTest/Pages/TestBarcodeReader.razor new file mode 100644 index 0000000..f6a73a9 --- /dev/null +++ b/EgwCoreLib.BlazorTest/Pages/TestBarcodeReader.razor @@ -0,0 +1,77 @@ +@page "/TestBarcodeReader" + +Test Barcode Reader + +
+

Test Barcode Reader

+
+ + + +
+ @*
*@ +
+ + + +
+ + +
+
+ +
+
+
+
+
+ +@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 listBord01 { get; set; } = new(); + protected List listBord02 { get; set; } = new(); + protected List listBord03 { get; set; } = new(); + + protected string qrCodeVal { get; set; } = "https://office.egalware.com/WDC/UI"; +} diff --git a/EgwCoreLib.BlazorTest/Pages/ProvaCalendar.razor b/EgwCoreLib.BlazorTest/Pages/TestCal_01.razor similarity index 95% rename from EgwCoreLib.BlazorTest/Pages/ProvaCalendar.razor rename to EgwCoreLib.BlazorTest/Pages/TestCal_01.razor index 6991040..475be80 100644 --- a/EgwCoreLib.BlazorTest/Pages/ProvaCalendar.razor +++ b/EgwCoreLib.BlazorTest/Pages/TestCal_01.razor @@ -1,4 +1,4 @@ -@page "/provacalendar" +@page "/TestCal_01" Index
diff --git a/EgwCoreLib.BlazorTest/Pages/ProvaCalendar.razor.cs b/EgwCoreLib.BlazorTest/Pages/TestCal_01.razor.cs similarity index 97% rename from EgwCoreLib.BlazorTest/Pages/ProvaCalendar.razor.cs rename to EgwCoreLib.BlazorTest/Pages/TestCal_01.razor.cs index 5508e44..d113298 100644 --- a/EgwCoreLib.BlazorTest/Pages/ProvaCalendar.razor.cs +++ b/EgwCoreLib.BlazorTest/Pages/TestCal_01.razor.cs @@ -1,6 +1,6 @@ namespace EgwCoreLib.BlazorTest.Pages { - public partial class ProvaCalendar + public partial class TestCal_01 { #region Protected Methods diff --git a/EgwCoreLib.BlazorTest/Pages/ProvaCalendar.razor.css b/EgwCoreLib.BlazorTest/Pages/TestCal_01.razor.css similarity index 100% rename from EgwCoreLib.BlazorTest/Pages/ProvaCalendar.razor.css rename to EgwCoreLib.BlazorTest/Pages/TestCal_01.razor.css diff --git a/EgwCoreLib.BlazorTest/Pages/ProvaCalendar.razor.less b/EgwCoreLib.BlazorTest/Pages/TestCal_01.razor.less similarity index 100% rename from EgwCoreLib.BlazorTest/Pages/ProvaCalendar.razor.less rename to EgwCoreLib.BlazorTest/Pages/TestCal_01.razor.less diff --git a/EgwCoreLib.BlazorTest/Pages/ProvaCalendar.razor.min.css b/EgwCoreLib.BlazorTest/Pages/TestCal_01.razor.min.css similarity index 100% rename from EgwCoreLib.BlazorTest/Pages/ProvaCalendar.razor.min.css rename to EgwCoreLib.BlazorTest/Pages/TestCal_01.razor.min.css diff --git a/EgwCoreLib.BlazorTest/Pages/TestCal.razor b/EgwCoreLib.BlazorTest/Pages/TestCal_02.razor similarity index 97% rename from EgwCoreLib.BlazorTest/Pages/TestCal.razor rename to EgwCoreLib.BlazorTest/Pages/TestCal_02.razor index 00ddb95..e11e943 100644 --- a/EgwCoreLib.BlazorTest/Pages/TestCal.razor +++ b/EgwCoreLib.BlazorTest/Pages/TestCal_02.razor @@ -1,4 +1,4 @@ -@page "/TestCal" +@page "/TestCal_02"

TestCal

diff --git a/EgwCoreLib.BlazorTest/Pages/TestCal.razor.cs b/EgwCoreLib.BlazorTest/Pages/TestCal_02.razor.cs similarity index 97% rename from EgwCoreLib.BlazorTest/Pages/TestCal.razor.cs rename to EgwCoreLib.BlazorTest/Pages/TestCal_02.razor.cs index 93513a4..e55c2b9 100644 --- a/EgwCoreLib.BlazorTest/Pages/TestCal.razor.cs +++ b/EgwCoreLib.BlazorTest/Pages/TestCal_02.razor.cs @@ -1,6 +1,6 @@ namespace EgwCoreLib.BlazorTest.Pages { - public partial class TestCal + public partial class TestCal_02 { #region Protected Methods diff --git a/EgwCoreLib.BlazorTest/Pages/TestCerchi.razor b/EgwCoreLib.BlazorTest/Pages/TestCerchi.razor new file mode 100644 index 0000000..a27a310 --- /dev/null +++ b/EgwCoreLib.BlazorTest/Pages/TestCerchi.razor @@ -0,0 +1,92 @@ +@page "/TestCerchi" + +TestGauges + +
+ +
+
+ +
+ @valDecimale +
+
+
+ + + + + + + + + + + + Titolo + + + + + testo più lungo... 0123456789 + + + + +
+
+ + + + + + + + + + + + +
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+
+
+
\ No newline at end of file diff --git a/EgwCoreLib.BlazorTest/Pages/TestCerchi.razor.cs b/EgwCoreLib.BlazorTest/Pages/TestCerchi.razor.cs new file mode 100644 index 0000000..9e6492c --- /dev/null +++ b/EgwCoreLib.BlazorTest/Pages/TestCerchi.razor.cs @@ -0,0 +1,37 @@ +using EgwCoreLib.Razor; + +namespace EgwCoreLib.BlazorTest.Pages +{ + public partial class TestCerchi + { + protected List DDemo1 = new List(); + protected List DDemoIn2 = new List(); + protected List DDemoOut2 = new List(); + + protected int currVal1 = 1000; + protected int currVal2 = 1000; + protected int maxVal = 1000; + + protected decimal valDecimale = 12345; + + protected override void OnInitialized() + { + DDemo1.Clear(); + currVal1 = 800; + DDemo1.Add(new CircleGaugeMulti.CircSegm() { Color = "#DCFD15", Value = 800 }); + DDemo1.Add(new CircleGaugeMulti.CircSegm() { Color = "#13FD67", Value = 300 }); + Random rnd = new Random(); + DDemoIn2.Clear(); + DDemoOut2.Clear(); + currVal2 = 1300; + DDemoIn2.Add(new CircleGaugeMulti.CircSegm() { Color = "#DCFD15", Value = 1000 }); + DDemoIn2.Add(new CircleGaugeMulti.CircSegm() { Color = "#13FD67", Value = 600 }); + DDemoOut2.Add(new CircleGaugeMulti.CircSegm() { Color = "#1367FD", Value = 300 }); + // DataDemo.Add(new CircleGaugeMulti.CircSegm() { Color = "#1515FD", Value = 700 }); + // currVal = rnd.Next(maxVal - 200, maxVal + 500); + // DataDemo.Add(new CircleGaugeMulti.CircSegm() { Color = "#13FD67", Value = currVal / 4 }); + // DataDemo.Add(new CircleGaugeMulti.CircSegm() { Color = "#ACFD15", Value = currVal / 4 }); + // DataDemo.Add(new CircleGaugeMulti.CircSegm() { Color = "#1515FD", Value = currVal / 2 }); + } + } +} \ No newline at end of file diff --git a/EgwCoreLib.BlazorTest/Pages/TestCompo.razor b/EgwCoreLib.BlazorTest/Pages/TestChart.razor similarity index 100% rename from EgwCoreLib.BlazorTest/Pages/TestCompo.razor rename to EgwCoreLib.BlazorTest/Pages/TestChart.razor diff --git a/EgwCoreLib.BlazorTest/Pages/TestComponenti.razor b/EgwCoreLib.BlazorTest/Pages/TestComponenti.razor new file mode 100644 index 0000000..d108886 --- /dev/null +++ b/EgwCoreLib.BlazorTest/Pages/TestComponenti.razor @@ -0,0 +1,109 @@ +@page "/TestComponenti" + +@inject NavigationManager NavMan + +Test + +
+
+

Test Componenti custom

+
+
+
+
+
+
+ Test Image +
+
+ +
+
+
+
+
+
+ Input password +
+
+
    +
  • + Standard + +
  • +
  • + Cambio label + +
  • +
  • + Show disabilitato + +
  • +
+
+
+
+
+
+
+ Input Speciali +
+
+ Test copia clipboard, GUID (presudo)random + +
+ Input numerico con gestione cifre (es x double) + +
+ @valDecimale +
+
+
+
+
+
+
+ QueryString +
+
+ + + Test valori QueryString +
    +
  • + Query string Nome: +
  • +
  • + @qsNome +
  • +
  • + Query string Intero: +
  • +
  • + @qsIntero +
  • +
+
+
+
+
+
+
+ + + +@code { + + protected string textToCopy = $"{Guid.NewGuid()}"; + protected decimal valDecimale = 12345; + + private string qsNome = ""; + private int qsIntero = 0; + + protected override void OnInitialized() + { + // base.OnInitialized(); + qsNome = NavMan.ExtractQueryStringByKey("Nome"); + qsIntero = NavMan.ExtractQueryStringByKey("Intero"); + } +} diff --git a/EgwCoreLib.BlazorTest/Pages/TestGauges.razor b/EgwCoreLib.BlazorTest/Pages/TestGauges.razor new file mode 100644 index 0000000..bc9bde4 --- /dev/null +++ b/EgwCoreLib.BlazorTest/Pages/TestGauges.razor @@ -0,0 +1,92 @@ +@page "/TestGauges" + +TestGauges + +
+ +
+
+ +
+ @valDecimale +
+
+
+ + + + + + + + + + + + Titolo + + + + + testo più lungo... 0123456789 + + + + +
+
+ + + + + + + + + + + + +
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+
+
+
\ No newline at end of file diff --git a/EgwCoreLib.BlazorTest/Pages/TestGauges.razor.cs b/EgwCoreLib.BlazorTest/Pages/TestGauges.razor.cs new file mode 100644 index 0000000..58bcf08 --- /dev/null +++ b/EgwCoreLib.BlazorTest/Pages/TestGauges.razor.cs @@ -0,0 +1,37 @@ +using EgwCoreLib.Razor; + +namespace EgwCoreLib.BlazorTest.Pages +{ + public partial class TestGauges + { + protected List DDemo1 = new List(); + protected List DDemoIn2 = new List(); + protected List DDemoOut2 = new List(); + + protected int currVal1 = 1000; + protected int currVal2 = 1000; + protected int maxVal = 1000; + + protected decimal valDecimale = 12345; + + protected override void OnInitialized() + { + DDemo1.Clear(); + currVal1 = 800; + DDemo1.Add(new CircleGaugeMulti.CircSegm() { Color = "#DCFD15", Value = 800 }); + DDemo1.Add(new CircleGaugeMulti.CircSegm() { Color = "#13FD67", Value = 300 }); + Random rnd = new Random(); + DDemoIn2.Clear(); + DDemoOut2.Clear(); + currVal2 = 1300; + DDemoIn2.Add(new CircleGaugeMulti.CircSegm() { Color = "#DCFD15", Value = 1000 }); + DDemoIn2.Add(new CircleGaugeMulti.CircSegm() { Color = "#13FD67", Value = 600 }); + DDemoOut2.Add(new CircleGaugeMulti.CircSegm() { Color = "#1367FD", Value = 300 }); + // DataDemo.Add(new CircleGaugeMulti.CircSegm() { Color = "#1515FD", Value = 700 }); + // currVal = rnd.Next(maxVal - 200, maxVal + 500); + // DataDemo.Add(new CircleGaugeMulti.CircSegm() { Color = "#13FD67", Value = currVal / 4 }); + // DataDemo.Add(new CircleGaugeMulti.CircSegm() { Color = "#ACFD15", Value = currVal / 4 }); + // DataDemo.Add(new CircleGaugeMulti.CircSegm() { Color = "#1515FD", Value = currVal / 2 }); + } + } +} \ No newline at end of file diff --git a/EgwCoreLib.BlazorTest/Pages/TestGraphCompo.razor b/EgwCoreLib.BlazorTest/Pages/TestGraphCompo.razor new file mode 100644 index 0000000..6e07a16 --- /dev/null +++ b/EgwCoreLib.BlazorTest/Pages/TestGraphCompo.razor @@ -0,0 +1,102 @@ +@page "/TestGraphCompo" + +Test + +
+

Test Componenti Arrow SVG

+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+

Test progBar singola linea

+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+

Test progBar multi linea

+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +@code { + private int currentCount = 0; + + protected Random rnd = new Random(); + + 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 listBord01 { get; set; } = new(); + protected List listBord02 { get; set; } = new(); + protected List listBord03 { get; set; } = new(); + +} diff --git a/EgwCoreLib.BlazorTest/Pages/TestLoading.razor b/EgwCoreLib.BlazorTest/Pages/TestLoading.razor index e9bdada..05cbeb4 100644 --- a/EgwCoreLib.BlazorTest/Pages/TestLoading.razor +++ b/EgwCoreLib.BlazorTest/Pages/TestLoading.razor @@ -1,14 +1,31 @@ @page "/TestLoading" -

TestLoading

-
- - -
-
- - -
- - +
+
+

Test Modale Loading

+
+
+
+
+
+ Tempo sim + +
+
+ Num steps + +
+ +
@realTime
+
+
+

Fake Progressbar

+

Modale che mostra avanzamento (progressbar con %) di un task lungo.

+

Devono essere definiti il numero degli step attesi e per ogni step la durata attesa di completamento.

+

Viene definito fake poiché l'avanzamento è artificialmente rallentato quando si approssima allo scadere di uno step per dare impressione di un sistema realmente (ri)calcolato di continuo, mentre al superamento di ogni step viene portato avanti il conteggio recuperando eventuali ritardi di stima.

+
+
+
+
+ \ No newline at end of file diff --git a/EgwCoreLib.BlazorTest/Pages/TestLoading.razor.cs b/EgwCoreLib.BlazorTest/Pages/TestLoading.razor.cs index 3648af6..a1ad99c 100644 --- a/EgwCoreLib.BlazorTest/Pages/TestLoading.razor.cs +++ b/EgwCoreLib.BlazorTest/Pages/TestLoading.razor.cs @@ -1,18 +1,24 @@ +using System.Diagnostics; + namespace EgwCoreLib.BlazorTest.Pages { public partial class TestLoading { #region Protected Properties - protected double expTime { get; set; } = 6; - protected int numSteps { get; set; } = 4; + protected double expTime { get; set; } = 5; + protected int numSteps { get; set; } = 10; #endregion Protected Properties #region Protected Methods + protected string realTime = ""; + protected async Task StartLongTimer() { + Stopwatch sw = new Stopwatch(); + sw.Start(); maxVal = numSteps * 10; double stdWait = expTime / numSteps; int nextWait = 1000; @@ -31,13 +37,15 @@ namespace EgwCoreLib.BlazorTest.Pages nextVal = maxVal; } await InvokeAsync(StateHasChanged); - // simulo ritardo importante (da 2 a 3 volte - nextWait = (int)(rnd.Next(2000, 3000) * stdWait); + // simulo ritardo importante (da 0 a 2 volte) + nextWait = (int)(rnd.Next(100, 2000) * stdWait); // attendo step successivi... await Task.Delay(nextWait); } await Task.Delay(1); currVal = maxVal; + sw.Stop(); + realTime = $"Real: {sw.Elapsed.TotalSeconds:N3}s"; await InvokeAsync(StateHasChanged); } diff --git a/EgwCoreLib.BlazorTest/Pages/TestPdfViewer.razor b/EgwCoreLib.BlazorTest/Pages/TestPdfViewer.razor new file mode 100644 index 0000000..e23ccb4 --- /dev/null +++ b/EgwCoreLib.BlazorTest/Pages/TestPdfViewer.razor @@ -0,0 +1,27 @@ +@page "/TestPdfViewer" + +
+
+
+
+

Test pdf display

+
+
+
+ File + +
+
+
+
+
+ +

Selezione: @FileSel

+
+
diff --git a/EgwCoreLib.BlazorTest/Pages/TestPdfViewer.razor.cs b/EgwCoreLib.BlazorTest/Pages/TestPdfViewer.razor.cs new file mode 100644 index 0000000..98e14eb --- /dev/null +++ b/EgwCoreLib.BlazorTest/Pages/TestPdfViewer.razor.cs @@ -0,0 +1,121 @@ +#if false +using CA.Blazor.Pdf; +using CA.Blazor.Pdf.Extensions; +#endif + +using Microsoft.AspNetCore.Components; +using System.Net.Http.Headers; + +namespace EgwCoreLib.BlazorTest.Pages +{ + public partial class TestPdfViewer + { + #region Public Fields + + public int CompoSel = 1; + + #endregion Public Fields + + #region Public Properties + + public string PdfBase64 { get; set; } = ""; + + #endregion Public Properties + + #region Protected Properties + + protected string FileSel + { + get => fileSel; + set + { + if (fileSel != value) + { + fileSel = value; + ReloadData().ConfigureAwait(false); + StateHasChanged(); + } + } + } + + protected string HeightSel + { + get => heightSel; + set + { + if (heightSel != value) + { + heightSel = value; + StateHasChanged(); + } + } + } + + [Inject] + protected NavigationManager NavMan { get; set; } = null!; + + #endregion Protected Properties + + #region Protected Methods + + protected override async Task OnInitializedAsync() + { + await ReloadData(); + await Task.Delay(1); + } + + #endregion Protected Methods + + #region Private Properties + + private string fileSel { get; set; } = "File01.pdf"; + private string heightSel { get; set; } = "400px"; + + private string baseUri = ""; + private string fileUrl = ""; + + private Dictionary heightList { get; set; } = new Dictionary() { { "200", "200px" }, { "400", "400px" }, { "600", "600px" }, { "800", "800px" }, { "1000", "1000px" } }; + + #endregion Private Properties + + #region Private Methods + + private async Task GetBase64Pdf(string apiUrl) + { + using (var httpClient = new HttpClient()) + { + httpClient.BaseAddress = new Uri(NavMan.BaseUri); + + // Make the API request to get the PDF content + var response = await httpClient.GetAsync(apiUrl); + + if (response.IsSuccessStatusCode) + { + // Convert the response content to Base64 + var pdfBytes = await response.Content.ReadAsByteArrayAsync(); + var base64String = Convert.ToBase64String(pdfBytes); + return $"data:application/pdf;base64,{base64String}"; + } + else + { + // Handle error scenarios based on your application needs For simplicity, we + // return an empty string in case of an error + return string.Empty; + } + } + } + + private async Task ReloadData() + { + baseUri = NavMan.BaseUri; + fileUrl = $"{baseUri}/test/{FileSel}"; + +#if false + // Call the helper method to retrieve the Base64-encoded PDF content + PdfBase64 = await GetBase64Pdf(apiUrl); +#endif + } + + #endregion Private Methods + } +} \ No newline at end of file diff --git a/EgwCoreLib.BlazorTest/Pages/TestQrDisplay.razor b/EgwCoreLib.BlazorTest/Pages/TestQrDisplay.razor new file mode 100644 index 0000000..ada0643 --- /dev/null +++ b/EgwCoreLib.BlazorTest/Pages/TestQrDisplay.razor @@ -0,0 +1,75 @@ +@page "/TestQrDisplay" + +Test Display QRCode + + +
+
+

Test Display QRCode

+
+
+
+
+
+
AZTEC
+
+
+ +
+
+ Quadrato, control point centrale +
+ @* *@ +
+
+
+
+
QR_CODE
+
+
+ +
+
+ Quadrato, 3 control point vertici +
+
+
+
+
+
DATA_MATRIX
+
+
+ +
+
+ Quadrato/Rettangolare (se codice lungo), linee controllo sx/basso +
+
+
+
+
+
PDF_417
+
+
+ + @* *@ +
+
+ Rettangolare, linee controllo verticali sx/dx differenti (verso) +
+
+
+
+
+
+ + + + + + + +@code { + + protected string qrCodeVal { get; set; } = "https://office.egalware.com/WDC/UI"; +} diff --git a/EgwCoreLib.BlazorTest/Pages/Test.razor b/EgwCoreLib.BlazorTest/Pages/ZZZ_TestOld.razor similarity index 99% rename from EgwCoreLib.BlazorTest/Pages/Test.razor rename to EgwCoreLib.BlazorTest/Pages/ZZZ_TestOld.razor index ba6d185..8ee1500 100644 --- a/EgwCoreLib.BlazorTest/Pages/Test.razor +++ b/EgwCoreLib.BlazorTest/Pages/ZZZ_TestOld.razor @@ -1,4 +1,4 @@ -@page "/Test" +@page "/TestOld" Test diff --git a/EgwCoreLib.BlazorTest/Pages/_Layout.cshtml b/EgwCoreLib.BlazorTest/Pages/_Layout.cshtml index 94afbf4..48d1302 100644 --- a/EgwCoreLib.BlazorTest/Pages/_Layout.cshtml +++ b/EgwCoreLib.BlazorTest/Pages/_Layout.cshtml @@ -8,10 +8,10 @@ - - - - + + + + @@ -28,7 +28,36 @@ 🗙
- + + + + + @*Gestione autoriconnessione: https://github.com/dotnet/aspnetcore/issues/38305 (vedere anche https://docs.microsoft.com/it-it/aspnet/core/blazor/fundamentals/signalr?view=aspnetcore-6.0#modify-the-reconnection-handler-blazor-server)*@ + diff --git a/EgwCoreLib.BlazorTest/Program.cs b/EgwCoreLib.BlazorTest/Program.cs index 3b09b5d..d254c51 100644 --- a/EgwCoreLib.BlazorTest/Program.cs +++ b/EgwCoreLib.BlazorTest/Program.cs @@ -1,4 +1,5 @@ -using EgwCoreLib.BlazorTest.Data; + +using EgwCoreLib.BlazorTest; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Web; @@ -7,7 +8,6 @@ var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddRazorPages(); builder.Services.AddServerSideBlazor(); -builder.Services.AddSingleton(); var app = builder.Build(); diff --git a/EgwCoreLib.BlazorTest/Properties/PublishProfiles/IIS01.pubxml b/EgwCoreLib.BlazorTest/Properties/PublishProfiles/IIS01.pubxml new file mode 100644 index 0000000..2e839b7 --- /dev/null +++ b/EgwCoreLib.BlazorTest/Properties/PublishProfiles/IIS01.pubxml @@ -0,0 +1,27 @@ + + + + + MSDeploy + true + Release + Any CPU + https://iis01.egalware.com/EgwCoreTest + false + 9e5a3295-08bf-4603-9fa3-d38a2f1100e5 + false + https://iis01.egalware.com:8172/MsDeploy.axd + Default Web Site/EgwCoreTest + + false + WMSVC + true + true + jenkins + <_SavePWD>true + <_TargetId>IISWebDeploy + net6.0 + + \ No newline at end of file diff --git a/EgwCoreLib.BlazorTest/Shared/MainLayout.razor b/EgwCoreLib.BlazorTest/Shared/MainLayout.razor index 0c2503c..2f45961 100644 --- a/EgwCoreLib.BlazorTest/Shared/MainLayout.razor +++ b/EgwCoreLib.BlazorTest/Shared/MainLayout.razor @@ -3,8 +3,11 @@ EgwCoreLib.BlazorTest
+
+ +
-
+
@@ -12,8 +15,13 @@ @Body -
- +
+
+@code{ + + protected bool navLarge { get; set; } = true; + protected string sideClass { get; set; } = "sidebar"; +} \ No newline at end of file diff --git a/EgwCoreLib.BlazorTest/Shared/MainLayout.razor.css b/EgwCoreLib.BlazorTest/Shared/MainLayout.razor.css index 551e4b2..8dc4822 100644 --- a/EgwCoreLib.BlazorTest/Shared/MainLayout.razor.css +++ b/EgwCoreLib.BlazorTest/Shared/MainLayout.razor.css @@ -8,22 +8,22 @@ main { flex: 1; } -.sidebar { - background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); +.sidebar, .sidebarSmall { + background-image: linear-gradient(180deg, rgb(5, 39, 103) 20%, #3aa6ff 90%); } .top-row { background-color: #f7f7f7; border-bottom: 1px solid #d6d5d5; - justify-content: flex-end; height: 3.5rem; - display: flex; align-items: center; + /*justify-content: space-evenly; + display: flex;*/ } .top-row ::deep a, .top-row .btn-link { white-space: nowrap; - margin-left: 1.5rem; + margin-left: 0.5rem; } .top-row a:first-child { @@ -45,13 +45,34 @@ main { } } +.bottom-row { + color: #dedede; + background-color: #000000; + height: 1.6rem; + align-items: center; +} + +@media (max-width: 640.99px) { + .main > div { + padding-left: 0.5rem !important; + padding-right: 0.5rem !important; + } +} + @media (min-width: 641px) { .page { flex-direction: row; } .sidebar { - width: 250px; + width: 230px; + height: 100vh; + position: sticky; + top: 0; + } + + .sidebarSmall { + width: 80px; height: 100vh; position: sticky; top: 0; @@ -64,7 +85,18 @@ main { } .top-row, article { - padding-left: 2rem !important; - padding-right: 1.5rem !important; + padding-left: 1rem !important; + padding-right: 1.0rem !important; + } + + .bottom-row { + position: fixed; + bottom: 0; + z-index: 1; + } + + .main > div { + /*padding-left: 0.5rem !important; + padding-right: 0.5rem !important;*/ } } diff --git a/EgwCoreLib.BlazorTest/Shared/NavMenu.razor b/EgwCoreLib.BlazorTest/Shared/NavMenu.razor index 8a334bd..23f9203 100644 --- a/EgwCoreLib.BlazorTest/Shared/NavMenu.razor +++ b/EgwCoreLib.BlazorTest/Shared/NavMenu.razor @@ -1,4 +1,5 @@ -