diff --git a/MP-TAB3/MP-TAB3.csproj b/MP-TAB3/MP-TAB3.csproj index 6b9504fc..f5cecbb8 100644 --- a/MP-TAB3/MP-TAB3.csproj +++ b/MP-TAB3/MP-TAB3.csproj @@ -3,7 +3,7 @@ net6.0 enable - 6.16.2503.809 + 6.16.2503.1008 enable MP_TAB3 diff --git a/MP-TAB3/Pages/StatusMap.razor b/MP-TAB3/Pages/StatusMap.razor index bd01ee07..b2c85453 100644 --- a/MP-TAB3/Pages/StatusMap.razor +++ b/MP-TAB3/Pages/StatusMap.razor @@ -1,11 +1,11 @@ @page "/status-map"
-
- @if (ListMSE == null || ListMSE.Count == 0 || isCalcSize) + @if (ListMSE == null || ListMSE.Count == 0 || isCalcSize) + { + if (ListMachineEnabled == null || ListMachineEnabled.Count == 0) { - if (ListMachineEnabled == null || ListMachineEnabled.Count == 0) - { +

Attenzione! @@ -20,38 +20,65 @@ LogOut

- } - else - { -
- -
- } +
} else { - int maxBlocks = calcMaxBlock(); - int currIdx = 0; - @foreach (var item in ListMSE) - { - currIdx++; -
- +
+
+
- @if (currIdx >= maxBlocks) +
+ } + } + else + { + int mseIdx = 0; + for (int i = 0; i < mapNRow; i++) + { +
+ @for (int j = 0; j < mapNCol; j++) { - currIdx = 0; - @((MarkupString)"
") - @((MarkupString)"
") + var currMse = MseById(mseIdx); + mseIdx++; + if (currMse != null) + { +
+ +
+ } + else + { +
 
+ } + } +
+ } + @*
+ @{ + int maxBlocks = calcMaxBlock(); + int currIdx = 0; + @foreach (var item in ListMSE) + { + currIdx++; +
+ +
+ @if (currIdx >= maxBlocks) + { + currIdx = 0; + @((MarkupString)"
") + @((MarkupString)"
") + } + } + // controllo se devo "chiudere riga... + int currNum = (currIdx % maxBlocks); + while (currNum < (maxBlocks)) + { + @((MarkupString)"
 
") + currNum++; } } - // controllo se devo "chiudere riga... - int currNum = (currIdx % maxBlocks); - while (currNum < (maxBlocks)) - { - @((MarkupString)"
 
") - currNum++; - } - } -
+
*@ + }
diff --git a/MP-TAB3/Pages/StatusMap.razor.cs b/MP-TAB3/Pages/StatusMap.razor.cs index cffe8fd6..6a1cb538 100644 --- a/MP-TAB3/Pages/StatusMap.razor.cs +++ b/MP-TAB3/Pages/StatusMap.razor.cs @@ -111,6 +111,58 @@ namespace MP_TAB3.Pages return answ; } + /// + /// Numero righe mappa: calcolato da num elementi e numMax x riga... + /// + protected int mapNRow + { + get + { + int answ = 1; + int numElems = ListMSE != null ? ListMSE.Count : 1; + answ = (int)Math.Ceiling((double)numElems / mapNCol); + return answ; + } + } + + /// + /// restituisce MSE dato indice + /// + /// Indice MSE richiesto + /// + protected MappaStatoExpl? MseById(int mseIdx) + { + MappaStatoExpl? answ = null; + if (ListMSE != null && ListMSE.Count > mseIdx) + { + answ = ListMSE[mseIdx]; + } + return answ; + } + + /// + /// Numero colonne mappa: calcolato larghezza riga... + /// + protected int mapNCol + { + get + { + int answ = 2; + if (Width > 450) + { + if (Width < 1024) + { + answ = (int)Math.Floor((decimal)Width / 200); + } + else + { + answ = (int)Math.Floor((decimal)Width / 220) - 1; + } + } + return answ; + } + } + protected async Task DoLogout() { string tgtUrl = "logout"; diff --git a/MP-TAB3/Resources/ChangeLog.html b/MP-TAB3/Resources/ChangeLog.html index 52865357..f782ea1f 100644 --- a/MP-TAB3/Resources/ChangeLog.html +++ b/MP-TAB3/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2503.809

+

Versione: 6.16.2503.1008


Note di rilascio: