From 9a646703d42a54bfc2f10b0e118acf28dc8b1fb4 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Fri, 13 Oct 2023 16:16:13 +0200 Subject: [PATCH] divisione grafica dimensione schermo --- MP-TAB-SERV/Components/MachineBlock.razor | 159 ++++++++++--------- MP-TAB-SERV/Components/MachineBlock.razor.cs | 28 +++- MP-TAB-SERV/MP-TAB-SERV.csproj | 2 +- MP-TAB-SERV/Resources/ChangeLog.html | 2 +- MP-TAB-SERV/Resources/VersNum.txt | 2 +- MP-TAB-SERV/Resources/manifest.xml | 2 +- 6 files changed, 115 insertions(+), 80 deletions(-) diff --git a/MP-TAB-SERV/Components/MachineBlock.razor b/MP-TAB-SERV/Components/MachineBlock.razor index 8171feca..de896110 100644 --- a/MP-TAB-SERV/Components/MachineBlock.razor +++ b/MP-TAB-SERV/Components/MachineBlock.razor @@ -103,94 +103,103 @@ else - *@@* -
- @*@RecMSE.CodMacchina - @RecMSE.CodMacchina -
-
-
-
- @RecMSE.Nome -
-
-
-
-
-
-
- @RecMSE.DescrizioneStato:   @(formatDurata(RecMSE.Durata)) -
-
-
-
- Confermati -
-
- @($"{RecMSE.PezziConf:N0}") -
-
-
-
- Prodotti -
-
- @($"{RecMSE.PezziProd:N0}") -
-
-
-
- Ordinati -
-
- @($"{RecMSE.NumPezzi:N0}") -
-
-
-
-
*@ -
-
-
-
- @RecMSE.Nome -
- @RecMSE.DescrizioneStato:   @(formatDurata(RecMSE.Durata)) + if (Width > 640) + { +
+ @*@RecMSE.CodMacchina*@ + @RecMSE.CodMacchina +
+
+
+
+ @RecMSE.Nome +
+
- @if (showCard) - { - -
-
- @**@ - +
+
+
+ @RecMSE.DescrizioneStato:   @(formatDurata(RecMSE.Durata))
-
-
-
-
@($"{RecMSE.PezziConf:N0}")
-
-
-
-
@($"{RecMSE.PezziProd:N0}")
+
+
+
+ +
+
+
+
+
+   @($" {RecMSE.PezziConf:N0}") +
+
+
+
+   @($" {RecMSE.PezziProd:N0}") +
+
-
ART.
-
@RecMSE.CodArticolo
+
ART:
+
@($"{RecMSE.CodArticolo}")
-
ORD.
+
ODL:
+
@($"ODL{RecMSE.IdxOdl:00000000}")
+
+
+
PODL:
@($"ODL{RecMSE.IdxOdl:00000000}")
- @*
@($"PODL{RecMSE.IdxPOdl:00000000}")
-
@($"ODL{RecMSE.IdxOdl:00000000}")
*@
- } +
-
+ + } + else + { + +
+
+
+
+ @RecMSE.Nome +
+ @RecMSE.DescrizioneStato:   @(formatDurata(RecMSE.Durata)) +
+
+ @if (showCard) + { +
+
+ +
+
+
+
+
@($"{RecMSE.PezziConf:N0}")
+
+
+
+
@($"{RecMSE.PezziProd:N0}")
+
+
+
ART.
+
@RecMSE.CodArticolo
+
+
+
ORD.
+
@($"ODL{RecMSE.IdxOdl:00000000}")
+
+
+
+ } +
+
+ } } else { diff --git a/MP-TAB-SERV/Components/MachineBlock.razor.cs b/MP-TAB-SERV/Components/MachineBlock.razor.cs index 2ff08e52..8506709b 100644 --- a/MP-TAB-SERV/Components/MachineBlock.razor.cs +++ b/MP-TAB-SERV/Components/MachineBlock.razor.cs @@ -1,7 +1,10 @@ using EgwCoreLib.Razor; using global::Microsoft.AspNetCore.Components; +using Microsoft.JSInterop; using MP.Data.DatabaseModels; using MP.Data.Services; +using NLog.Fluent; +using static MP_TAB_SERV.Pages.User; namespace MP_TAB_SERV.Components { @@ -21,6 +24,8 @@ namespace MP_TAB_SERV.Components [Parameter] public bool showCard { get; set; } + [Inject] + protected IJSRuntime JSRuntime { get; set; } = null!; #endregion Public Properties @@ -31,9 +36,25 @@ namespace MP_TAB_SERV.Components protected int currVal1 = 1000; protected int currMaxVal = 1000; protected int maxVal = 1000; + public int Height { get; set; } = 0; + public int Width { get; set; } = 0; + public string currIpv4 { get; set; } = ""; + + public class WindowDimension + { + public int Width { get; set; } + public int Height { get; set; } + } + protected async Task getWDim() + { + var dimension = await JSRuntime.InvokeAsync("getWindowDimensions"); + Height = dimension.Height; + Width = dimension.Width; + } protected async Task setGaugeVals() { + await Task.Delay(1); if (RecMSE != null) { innerCircleVals.Clear(); @@ -156,7 +177,12 @@ namespace MP_TAB_SERV.Components #region Protected Methods protected override async Task OnAfterRenderAsync(bool firstRender) - { + {//await Task.Delay(500); + if (firstRender) + { + await getWDim(); + StateHasChanged(); + } isLoading = RecMSE == null; await Task.Delay(1); //return base.OnAfterRenderAsync(firstRender); diff --git a/MP-TAB-SERV/MP-TAB-SERV.csproj b/MP-TAB-SERV/MP-TAB-SERV.csproj index 8ab77ec4..0e3dee8c 100644 --- a/MP-TAB-SERV/MP-TAB-SERV.csproj +++ b/MP-TAB-SERV/MP-TAB-SERV.csproj @@ -3,7 +3,7 @@ net6.0 enable - 6.16.2310.1314 + 6.16.2310.1316 enable MP_TAB_SERV diff --git a/MP-TAB-SERV/Resources/ChangeLog.html b/MP-TAB-SERV/Resources/ChangeLog.html index eac5f061..660e7b43 100644 --- a/MP-TAB-SERV/Resources/ChangeLog.html +++ b/MP-TAB-SERV/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2310.1314

+

Versione: 6.16.2310.1316


Note di rilascio:
  • diff --git a/MP-TAB-SERV/Resources/VersNum.txt b/MP-TAB-SERV/Resources/VersNum.txt index 3d616a74..07f390c0 100644 --- a/MP-TAB-SERV/Resources/VersNum.txt +++ b/MP-TAB-SERV/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2310.1314 +6.16.2310.1316 diff --git a/MP-TAB-SERV/Resources/manifest.xml b/MP-TAB-SERV/Resources/manifest.xml index 971a50e0..27c237c6 100644 --- a/MP-TAB-SERV/Resources/manifest.xml +++ b/MP-TAB-SERV/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2310.1314 + 6.16.2310.1316 https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/MP-TAB-SERV.zip https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/ChangeLog.html false