@@ -16,13 +16,19 @@
- @if (!HideMenu)
- {
-
-
-
+
+ @if (!HideMenu)
+ {
+
+
+
+
-
- }
+ }
+ @if (IsReloading)
+ {
+
Reloading User Data...
+ }
+
diff --git a/MP-TAB3/Components/CmpTop.razor.cs b/MP-TAB3/Components/CmpTop.razor.cs
index a86ebaf3..ca340c2b 100644
--- a/MP-TAB3/Components/CmpTop.razor.cs
+++ b/MP-TAB3/Components/CmpTop.razor.cs
@@ -78,12 +78,21 @@ namespace MP_TAB3.Components
}
}
+ private bool IsReloading = false;
+
+ private string CssReload
+ {
+ get => IsReloading ? "bg-primary bg-gradient" : "";
+ }
+
protected async Task ForceReload()
{
Stopwatch sw = new Stopwatch();
sw.Start();
Log.Info("Start ForceReload");
+ IsReloading = true;
ResetClass = "btn-warning";
+ MsgServ.IsReloading = true;
await InvokeAsync(StateHasChanged);
var currToken = await MsgServ.GetCurrOperDtoLSAsync();
var lastOpr = await MsgServ.GetLastMatrOprAsync();
@@ -101,11 +110,12 @@ namespace MP_TAB3.Components
await EA_ReloadMStor.InvokeAsync(true);
// calcolo tempo esecuzione
sw.Stop();
- int delta = 250 - (int)sw.ElapsedMilliseconds;
- delta = delta > 0 ? delta : 50;
+ int delta = 150 - (int)sw.ElapsedMilliseconds;
+ delta = delta > 0 ? delta : 10;
await Task.Delay(delta);
ResetClass = "btn-primary";
- // await InvokeAsync(StateHasChanged);
+ MsgServ.IsReloading = false;
+ IsReloading = false;
Log.Info($"ForceReload completed in {sw.Elapsed.TotalMilliseconds}ms");
// ricarica pagina!
NavMan.NavigateTo("status-map", true);
diff --git a/MP-TAB3/Components/MachineBlock.razor.cs b/MP-TAB3/Components/MachineBlock.razor.cs
index efe76cbd..feb4696e 100644
--- a/MP-TAB3/Components/MachineBlock.razor.cs
+++ b/MP-TAB3/Components/MachineBlock.razor.cs
@@ -420,9 +420,14 @@ namespace MP_TAB3.Components
TabDServ.DataInvalidated -= TabDServ_DataInvalidated;
}
+ ///
+ /// Rilettura dettagli
+ ///
+ ///
private async Task loadDetails()
{
- if (CRecMSE != null)
+ // verifico di non essere in reloading e di avere dati...
+ if (!MServ.IsReloading && CRecMSE != null)
{
bool doForce = false;
if (SDService.MachNumPzGet(IdxMaccCur) != CRecMSE.PezziProd || SDService.MachProdStGet(IdxMaccCur).IdxOdl != CRecMSE.IdxOdl || (datiProdAct != null && datiProdAct.PzTotODL != CRecMSE.PezziProd))
diff --git a/MP-TAB3/Components/PlaceholderDetail.razor b/MP-TAB3/Components/PlaceholderDetail.razor
index 9e419a1f..5a4328e9 100644
--- a/MP-TAB3/Components/PlaceholderDetail.razor
+++ b/MP-TAB3/Components/PlaceholderDetail.razor
@@ -1,8 +1,8 @@
-
-
+
+
-
+
@@ -14,7 +14,7 @@
-
+
@@ -26,9 +26,9 @@
-
-
-
+
+
+
diff --git a/MP-TAB3/Components/PlaceholderStatusMap.razor.css b/MP-TAB3/Components/PlaceholderStatusMap.razor.css
index c5ab75ff..39f93b99 100644
--- a/MP-TAB3/Components/PlaceholderStatusMap.razor.css
+++ b/MP-TAB3/Components/PlaceholderStatusMap.razor.css
@@ -9,7 +9,7 @@
}
@media (min-width: 600px) {
.pholderHeight {
- height: 5.1rem;
+ height: 6.6rem;
}
}
@media (min-width: 768px) {
diff --git a/MP-TAB3/Components/PlaceholderStatusMap.razor.less b/MP-TAB3/Components/PlaceholderStatusMap.razor.less
index 008fe881..c3abc26d 100644
--- a/MP-TAB3/Components/PlaceholderStatusMap.razor.less
+++ b/MP-TAB3/Components/PlaceholderStatusMap.razor.less
@@ -12,7 +12,7 @@
@media (min-width: 600px) {
.pholderHeight {
- height: 5.1rem;
+ height: 6.6rem;
}
}
diff --git a/MP-TAB3/Components/PlaceholderStatusMap.razor.min.css b/MP-TAB3/Components/PlaceholderStatusMap.razor.min.css
index 3fde6d89..f2208fc7 100644
--- a/MP-TAB3/Components/PlaceholderStatusMap.razor.min.css
+++ b/MP-TAB3/Components/PlaceholderStatusMap.razor.min.css
@@ -1 +1 @@
-.pholderHeight{height:5.5rem;object-fit:cover;}@media(min-width:430px){.pholderHeight{height:5.8rem;}}@media(min-width:600px){.pholderHeight{height:5.1rem;}}@media(min-width:768px){.pholderHeight{height:7.6rem;}}@media(min-width:800px){.pholderHeight{height:8.2rem;}}@media(min-width:1025px){.pholderHeight{height:7.2rem;}}
\ No newline at end of file
+.pholderHeight{height:5.5rem;object-fit:cover;}@media(min-width:430px){.pholderHeight{height:5.8rem;}}@media(min-width:600px){.pholderHeight{height:6.6rem;}}@media(min-width:768px){.pholderHeight{height:7.6rem;}}@media(min-width:800px){.pholderHeight{height:8.2rem;}}@media(min-width:1025px){.pholderHeight{height:7.2rem;}}
\ No newline at end of file
diff --git a/MP-TAB3/Components/ProdConfirm.razor b/MP-TAB3/Components/ProdConfirm.razor
index 5f078b10..f200bbbf 100644
--- a/MP-TAB3/Components/ProdConfirm.razor
+++ b/MP-TAB3/Components/ProdConfirm.razor
@@ -1,19 +1,19 @@
-
+
-
+
@if (enableMagPrint)
{
-
+
}
@if (odlOk)
{
-
+
diff --git a/MP-TAB3/MP-TAB3.csproj b/MP-TAB3/MP-TAB3.csproj
index 6d27d4a1..58e9e7ed 100644
--- a/MP-TAB3/MP-TAB3.csproj
+++ b/MP-TAB3/MP-TAB3.csproj
@@ -3,7 +3,7 @@
net6.0
enable
- 6.16.2503.2915
+ 6.16.2503.2916
enable
MP_TAB3
diff --git a/MP-TAB3/Pages/StatusMap.razor.cs b/MP-TAB3/Pages/StatusMap.razor.cs
index 4d6d7fe9..6578bb47 100644
--- a/MP-TAB3/Pages/StatusMap.razor.cs
+++ b/MP-TAB3/Pages/StatusMap.razor.cs
@@ -305,21 +305,31 @@ namespace MP_TAB3.Pages
///
private void DataPipe_EA_NewMessage(object? sender, EventArgs e)
{
- PubSubEventArgs currArgs = (PubSubEventArgs)e;
- // conversione on-the-fly List
--> allarmi
- if (!string.IsNullOrEmpty(currArgs.newMessage))
+#if false
+ // se fossi in update resetto...
+ if (MsgServ.IsReloading)
{
- try
- {
- List? dataList = JsonConvert.DeserializeObject>(currArgs.newMessage);
- if (dataList != null)
- {
- InvokeAsync(() => SaveData(dataList));
- }
- }
- catch
- { }
+ AllDataMSE = null;
}
+ else
+ {
+ }
+#endif
+ PubSubEventArgs currArgs = (PubSubEventArgs)e;
+ // conversione on-the-fly List --> allarmi
+ if (!string.IsNullOrEmpty(currArgs.newMessage))
+ {
+ try
+ {
+ List? dataList = JsonConvert.DeserializeObject>(currArgs.newMessage);
+ if (dataList != null)
+ {
+ InvokeAsync(() => SaveData(dataList));
+ }
+ }
+ catch
+ { }
+ }
InvokeAsync(() =>
{
StateHasChanged();
diff --git a/MP-TAB3/Resources/ChangeLog.html b/MP-TAB3/Resources/ChangeLog.html
index 315c5b6e..962ee509 100644
--- a/MP-TAB3/Resources/ChangeLog.html
+++ b/MP-TAB3/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MAPOSPEC
- Versione: 6.16.2503.2915
+ Versione: 6.16.2503.2916
Note di rilascio:
-
diff --git a/MP-TAB3/Resources/VersNum.txt b/MP-TAB3/Resources/VersNum.txt
index 2f24b11f..299da3d2 100644
--- a/MP-TAB3/Resources/VersNum.txt
+++ b/MP-TAB3/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2503.2915
+6.16.2503.2916
diff --git a/MP-TAB3/Resources/manifest.xml b/MP-TAB3/Resources/manifest.xml
index ab0be4ce..6e0cf90d 100644
--- a/MP-TAB3/Resources/manifest.xml
+++ b/MP-TAB3/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2503.2915
+ 6.16.2503.2916
https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/MP-TAB3.zip
https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/ChangeLog.html
false
diff --git a/MP.Data/Services/MessageService.cs b/MP.Data/Services/MessageService.cs
index d4c51f81..ed5f11d3 100644
--- a/MP.Data/Services/MessageService.cs
+++ b/MP.Data/Services/MessageService.cs
@@ -411,6 +411,11 @@ namespace MP.Data.Services
return answ;
}
+ ///
+ /// Semaforo x indicare fasi di reload attive e così non effettuare alcune operazioni...
+ ///
+ public bool IsReloading { get; set; } = false;
+
///
/// Restituisce il record OperatoreDTO da localstorage
///
@@ -541,10 +546,14 @@ namespace MP.Data.Services
///
public async Task SaveMse(List currListMSE)
{
- foreach (var item in currListMSE)
+ // procedo SOLO SE non sono in reloading...
+ if (!IsReloading)
{
- string serVal = JsonConvert.SerializeObject(item);
- await localStorage.SetItemAsync(machineMse(item.IdxMacchina), serVal);
+ foreach (var item in currListMSE)
+ {
+ string serVal = JsonConvert.SerializeObject(item);
+ await localStorage.SetItemAsync(machineMse(item.IdxMacchina), serVal);
+ }
}
}