Review metodo disegno blocchi in status MAP x TAB3
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>6.16.2503.809</Version>
|
||||
<Version>6.16.2503.1008</Version>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP_TAB3</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
@page "/status-map"
|
||||
|
||||
<div class="pe-0">
|
||||
<div class="row mb-2">
|
||||
@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)
|
||||
{
|
||||
<div class="row mb-2">
|
||||
<div class="col alert alert-primary p-5 mx-3 text-center">
|
||||
<h1 class="fs-1">
|
||||
<b>Attenzione!</b>
|
||||
@@ -20,38 +20,65 @@
|
||||
<i class="fa fa-lg fa-sign-out pe-2" aria-hidden="true"></i> LogOut
|
||||
</NavLink>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="p-3">
|
||||
<EgwCoreLib.Razor.LoadingData DisplaySize="LoadingData.CtrlSize.Large"></EgwCoreLib.Razor.LoadingData>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
int maxBlocks = calcMaxBlock();
|
||||
int currIdx = 0;
|
||||
@foreach (var item in ListMSE)
|
||||
{
|
||||
currIdx++;
|
||||
<div class="col ps-0 pe-1">
|
||||
<MachineBlock RecMSE="@item" FullMode="true" Width="@Width" Height="@Height" ShowCard="@ShowCard" doBlink="@doBlink"></MachineBlock>
|
||||
<div class="row mb-2">
|
||||
<div class="p-3">
|
||||
<EgwCoreLib.Razor.LoadingData DisplaySize="LoadingData.CtrlSize.Large"></EgwCoreLib.Razor.LoadingData>
|
||||
</div>
|
||||
@if (currIdx >= maxBlocks)
|
||||
</div>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int mseIdx = 0;
|
||||
for (int i = 0; i < mapNRow; i++)
|
||||
{
|
||||
<div class="row mb-2">
|
||||
@for (int j = 0; j < mapNCol; j++)
|
||||
{
|
||||
currIdx = 0;
|
||||
@((MarkupString)"</div>")
|
||||
@((MarkupString)"<div class=\"row mb-2\">")
|
||||
var currMse = MseById(mseIdx);
|
||||
mseIdx++;
|
||||
if (currMse != null)
|
||||
{
|
||||
<div class="col ps-0 pe-1">
|
||||
<MachineBlock RecMSE="currMse" FullMode="true" Width="@Width" Height="@Height" ShowCard="@ShowCard" doBlink="@doBlink"></MachineBlock>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="col ps-0 pe-1 bloccoMacc"> </div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
@* <div class="row mb-2">
|
||||
@{
|
||||
int maxBlocks = calcMaxBlock();
|
||||
int currIdx = 0;
|
||||
@foreach (var item in ListMSE)
|
||||
{
|
||||
currIdx++;
|
||||
<div class="col ps-0 pe-1">
|
||||
<MachineBlock RecMSE="@item" FullMode="true" Width="@Width" Height="@Height" ShowCard="@ShowCard" doBlink="@doBlink"></MachineBlock>
|
||||
</div>
|
||||
@if (currIdx >= maxBlocks)
|
||||
{
|
||||
currIdx = 0;
|
||||
@((MarkupString)"</div>")
|
||||
@((MarkupString)"<div class=\"row mb-2\">")
|
||||
}
|
||||
}
|
||||
// controllo se devo "chiudere riga...
|
||||
int currNum = (currIdx % maxBlocks);
|
||||
while (currNum < (maxBlocks))
|
||||
{
|
||||
@((MarkupString)"<div class=\"col ps-0 pe-1 bloccoMacc\"> </div>")
|
||||
currNum++;
|
||||
}
|
||||
}
|
||||
// controllo se devo "chiudere riga...
|
||||
int currNum = (currIdx % maxBlocks);
|
||||
while (currNum < (maxBlocks))
|
||||
{
|
||||
@((MarkupString)"<div class=\"col ps-0 pe-1 bloccoMacc\"> </div>")
|
||||
currNum++;
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div> *@
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -111,6 +111,58 @@ namespace MP_TAB3.Pages
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Numero righe mappa: calcolato da num elementi e numMax x riga...
|
||||
/// </summary>
|
||||
protected int mapNRow
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 1;
|
||||
int numElems = ListMSE != null ? ListMSE.Count : 1;
|
||||
answ = (int)Math.Ceiling((double)numElems / mapNCol);
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// restituisce MSE dato indice
|
||||
/// </summary>
|
||||
/// <param name="mseIdx">Indice MSE richiesto</param>
|
||||
/// <returns></returns>
|
||||
protected MappaStatoExpl? MseById(int mseIdx)
|
||||
{
|
||||
MappaStatoExpl? answ = null;
|
||||
if (ListMSE != null && ListMSE.Count > mseIdx)
|
||||
{
|
||||
answ = ListMSE[mseIdx];
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Numero colonne mappa: calcolato larghezza riga...
|
||||
/// </summary>
|
||||
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";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 6.16.2503.809</h4>
|
||||
<h4>Versione: 6.16.2503.1008</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2503.809
|
||||
6.16.2503.1008
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2503.809</version>
|
||||
<version>6.16.2503.1008</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/MP-TAB3.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user