Aggiunta metodi dispose su tutte le pagine

This commit is contained in:
Samuele Locatelli
2024-02-06 19:28:57 +01:00
parent 1d056d1960
commit 3ced4656bd
32 changed files with 729 additions and 429 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
<div class="mb-1 fs-6">
@if (enableControlli)
{
@if (RecMSE.IdxOdl > 0)
@if (RecMSE != null && RecMSE.IdxOdl > 0)
{
<button class="btn btn-primary btn-lg text-light w-100 mb-1" @onclick="ToggleBtn">
<i class="fa fa-wrench"></i> @ConfTitle
+1 -1
View File
@@ -85,7 +85,7 @@
<div class="col-12">
Check articolo in revisione
</div>
@if (cancelSetupEnabled && RecMSE.PezziConf == 0)
@if (cancelSetupEnabled && RecMSE != null && RecMSE.PezziConf == 0)
{
<div class="col-12 col-md-6 p-2">
<button class="btn btn-lg btn-danger w-100" @onclick="OdlAnnullaSetup">Annulla Setup ODL <i class="fa-solid fa-ban me-1"></i></button>
+2 -2
View File
@@ -1092,8 +1092,6 @@ namespace MP_TAB3.Components
private string IdxMaccSel = "";
private int idxPOdlSel = 0;
private bool inAttr = false;
private bool isInProd = false;
private bool isLoading = false;
private bool isMaster = false;
private bool isMulti = false;
private bool isProcessing = false;
@@ -1175,6 +1173,8 @@ namespace MP_TAB3.Components
/// </summary>
private int IdxOdlAltra { get; set; } = 0;
private bool isLoading { get; set; } = false;
private string lblWarnBody
{
get => odlOk ? Traduci("ConfProdBeforeContinueBody") : Traduci("setOdlBeforeContinueBody");
+191 -92
View File
@@ -8,6 +8,10 @@
{
<span>@($"ODL: {RecMSE.IdxOdl}")</span>
}
else
{
<span>n.a.</span>
}
</div>
</div>
@@ -17,18 +21,21 @@
<div class="small">
<span>Data di inizio</span>
</div>
<div class="text-center fw-bold">
@if (RecMSE != null)
{
@if (RecMSE != null)
{
<div class="text-center fw-bold">
<span>@($"{RecMSE.DataInizioOdl:yyyy/MM/dd}")</span>
}
</div>
<div class="text-center small">
@if (RecMSE != null)
{
</div>
<div class="text-center small">
<span>@($"{RecMSE.DataInizioOdl:HH: mm}")</span>
}
</div>
</div>
}
else
{
<div class="text-center fw-bold">
n.a.
</div>
}
</div>
</div>
<div class="col-3 p-1 flex-fill">
@@ -36,11 +43,20 @@
<div class="small">
<span>Cod Articolo</span>
</div>
<div class="text-center fw-bold">
<span>@RecMSE.CodArticolo</span>
</div>
<div class="text-center small">
</div>
@if (RecMSE != null)
{
<div class="text-center fw-bold">
<span>@RecMSE.CodArticolo</span>
</div>
<div class="text-center small">
</div>
}
else
{
<div class="text-center fw-bold">
n.a.
</div>
}
</div>
</div>
<div class="col-3 p-1 flex-fill">
@@ -48,11 +64,20 @@
<div class="small">
<span>Nr Pezzi lanciati</span>
</div>
<div class="text-center fw-bold">
<span>@($"{RecMSE.NumPezzi}") pz.</span>
</div>
<div class="text-center small">
</div>
@if (RecMSE != null)
{
<div class="text-center fw-bold">
<span>@($"{RecMSE.NumPezzi}") pz.</span>
</div>
<div class="text-center small">
</div>
}
else
{
<div class="text-center fw-bold">
n.a.
</div>
}
</div>
</div>
<div class="col-3 p-1 flex-fill">
@@ -60,11 +85,20 @@
<div class="small text-nowrap" style="font-size: .8rem">
<span>Nr Pezzi confermati</span>
</div>
<div class="text-center fw-bold">
<span>@($"{RecMSE.PezziConf}") pz.</span>
</div>
<div class="text-center small">
</div>
@if (RecMSE != null)
{
<div class="text-center fw-bold">
<span>@($"{RecMSE.PezziConf}") pz.</span>
</div>
<div class="text-center small">
</div>
}
else
{
<div class="text-center fw-bold">
n.a.
</div>
}
</div>
</div>
</div>
@@ -74,11 +108,20 @@
<div class="small">
<span>Nr pezzi fatti</span>
</div>
<div class="text-center fw-bold">
<span>(@($"{RecMSE.PezziProd}") pz.)</span>
</div>
<div class="text-center small">
</div>
@if (RecMSE != null)
{
<div class="text-center fw-bold">
<span>(@($"{RecMSE.PezziProd}") pz.)</span>
</div>
<div class="text-center small">
</div>
}
else
{
<div class="text-center fw-bold">
n.a.
</div>
}
</div>
</div>
<div class="col-3 p-1 flex-fill">
@@ -86,14 +129,23 @@
<div class="small">
<span>Efficienza globale</span>
</div>
<div class="text-center fw-bold">
<span>@RecMSE.OEE_tot</span>
</div>
<div class="text-center small">
<span>
(@RecMSE.OEE_RT_tot)
</span>
</div>
@if (RecMSE != null)
{
<div class="text-center fw-bold">
<span>@RecMSE.OEE_tot</span>
</div>
<div class="text-center small">
<span>
(@RecMSE.OEE_RT_tot)
</span>
</div>
}
else
{
<div class="text-center fw-bold">
n.a.
</div>
}
</div>
</div>
<div class="col-3 p-1 flex-fill">
@@ -101,14 +153,23 @@
<div class="small">
<span>Efficienza lavoro</span>
</div>
<div class="text-center fw-bold">
<span>@RecMSE.OEE_wrk</span>
</div>
<div class="text-center small">
<span>
(@RecMSE.OEE_RT_wrk)
</span>
</div>
@if (RecMSE != null)
{
<div class="text-center fw-bold">
<span>@RecMSE.OEE_wrk</span>
</div>
<div class="text-center small">
<span>
(@RecMSE.OEE_RT_wrk)
</span>
</div>
}
else
{
<div class="text-center fw-bold">
n.a.
</div>
}
</div>
</div>
<div class="col-3 p-1 flex-fill">
@@ -116,42 +177,53 @@
<div class="small text-nowrap" style="font-size: .8rem">
<span>Efficienza teorica</span>
</div>
<div class="text-center fw-bold">
<span>@RecMSE.OEE_run</span>
</div>
<div class="text-center small">
<span>
(@RecMSE.OEE_RT_run)
</span>
</div>
@if (RecMSE != null)
{
<div class="text-center fw-bold">
<span>@RecMSE.OEE_run</span>
</div>
<div class="text-center small">
<span>
(@RecMSE.OEE_RT_run)
</span>
</div>
}
else
{
<div class="text-center fw-bold">
n.a.
</div>
}
</div>
</div>
</div>
<div class="d-flex justify-content-between ">
<div class="col-3 p-1 flex-fill">
<div class="cardFullHeight p-1">
<div class="small">
<span>Tc medio</span>
</div>
<div class="text-center fw-bold">
<span>
@($"{RecMSE.TCMedio:0.###}")
</span>
</div>
<div class="text-center small">
<span>
(@($"{RecMSE.TCMedioRt:0.###}"))
</span>
</div>
@if (RecMSE != null)
{
<div class="text-center fw-bold">
<span>
@($"{RecMSE.TCMedio:0.###}")
</span>
</div>
<div class="text-center small">
<span>
(@($"{RecMSE.TCMedioRt:0.###}"))
</span>
</div>
}
else
{
<div class="text-center fw-bold">
n.a.
</div>
}
</div>
</div>
<div class="col-3 p-1 flex-fill">
@@ -159,14 +231,23 @@
<div class="small">
<span>Tc lavoro</span>
</div>
<div class="text-center fw-bold">
<span>@($"{RecMSE.TCLav:0.###}")</span>
</div>
<div class="text-center small">
<span>
(@($"{RecMSE.TCLavRT:0.###}"))
</span>
</div>
@if (RecMSE != null)
{
<div class="text-center fw-bold">
<span>@($"{RecMSE.TCLav:0.###}")</span>
</div>
<div class="text-center small">
<span>
(@($"{RecMSE.TCLavRT:0.###}"))
</span>
</div>
}
else
{
<div class="text-center fw-bold">
n.a.
</div>
}
</div>
</div>
<div class="col-3 p-1 flex-fill">
@@ -174,14 +255,23 @@
<div class="small">
<span>Tc tecnico</span>
</div>
<div class="text-center fw-bold">
<span>@($"{RecMSE.TCEff:0.###}")</span>
</div>
<div class="text-center small">
<span>
(@($"{RecMSE.TCEffRT:0.###}"))
</span>
</div>
@if (RecMSE != null)
{
<div class="text-center fw-bold">
<span>@($"{RecMSE.TCEff:0.###}")</span>
</div>
<div class="text-center small">
<span>
(@($"{RecMSE.TCEffRT:0.###}"))
</span>
</div>
}
else
{
<div class="text-center fw-bold">
n.a.
</div>
}
</div>
</div>
<div class="col-3 p-1 flex-fill">
@@ -189,11 +279,20 @@
<div class="small text-nowrap" style="font-size: .8rem">
<span>Tc impostato</span>
</div>
<div class="text-center fw-bold">
<span> @($"{RecMSE.TCAssegnato:0.###}")</span>
</div>
<div class="text-center small">
</div>
@if (RecMSE != null)
{
<div class="text-center fw-bold">
<span> @($"{RecMSE.TCAssegnato:0.###}")</span>
</div>
<div class="text-center small">
</div>
}
else
{
<div class="text-center fw-bold">
n.a.
</div>
}
</div>
</div>
</div>
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<Version>6.16.2402.616</Version>
<Version>6.16.2402.619</Version>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP_TAB3</RootNamespace>
</PropertyGroup>
+1 -1
View File
@@ -39,8 +39,8 @@
Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace) to "f"
<logger name="*" minlevel="Debug" writeTo="f" />
-->
<!--<logger name="*" minlevel="Info" writeTo="consoleTarget" />-->
<logger name="*" minlevel="Trace" writeTo="consoleTarget" />
<!--<logger name="Microsoft.*" maxlevel="Info" final="true" />-->
<logger name="*" minlevel="Info" writeTo="fileTarget" />
</rules>
</nlog>
+12 -1
View File
@@ -4,8 +4,19 @@ using MP.Data.Services;
namespace MP_TAB3.Pages
{
public partial class Alarms
public partial class Alarms : IDisposable
{
#region Public Methods
public void Dispose()
{
IdxMacc = "";
CurrMSE = null;
//GC.Collect();
}
#endregion Public Methods
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
-58
View File
@@ -1,58 +0,0 @@
@page "/CardDemo"
@if (CardTitles == null || CardTitles.Count == 0)
{
<div class="row">
<div class="col-12 my-2 alert alert-secondary fs-3">
waiting on browser
</div>
@for (int i = 0; i < 9; i++)
{
<div class="col-4 my-2">
<CardTest Title="Loading" DoPlaceholder="true" CardCss="bg-secondary">
</CardTest>
</div>
}
</div>
}
else
{
<div class="row">
<div class="col-12 my-2 alert alert-success fs-3">
loaded on browser
</div>
@foreach (var item in CardTitles)
{
<div class="col-4 my-2">
<CardTest Title="@item">
<div>
Demo content page for <b>@item</b>
</div>
<div>
This is an example Blazor component!
</div>
</CardTest>
</div>
}
</div>
}
@code {
protected List<string>? CardTitles { get; set; }
protected override async Task OnInitializedAsync()
{
CardTitles = null;
await Task.Delay(300);
CardTitles = new List<string>();
await InvokeAsync(StateHasChanged);
await Task.Delay(300);
for (int i = 0; i < 9; i++)
{
CardTitles.Add($"Card {i + 1:00}");
}
await Task.Delay(10);
}
}
+12 -1
View File
@@ -4,8 +4,19 @@ using MP.Data.Services;
namespace MP_TAB3.Pages
{
public partial class Controls
public partial class Controls : IDisposable
{
#region Public Methods
public void Dispose()
{
IdxMacc = "";
CurrMSE = null;
//GC.Collect();
}
#endregion Public Methods
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
+12 -1
View File
@@ -4,8 +4,19 @@ using MP.Data.Services;
namespace MP_TAB3.Pages
{
public partial class Declarations
public partial class Declarations : IDisposable
{
#region Public Methods
public void Dispose()
{
IdxMacc = "";
CurrMSE = null;
//GC.Collect();
}
#endregion Public Methods
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
-14
View File
@@ -3,18 +3,4 @@
<img src="images/LogoEgw.png" />
@code {
protected override async Task OnInitializedAsync()
{
await Task.Delay(1);
}
protected override async Task OnAfterRenderAsync(bool firstRender)
{
await Task.Delay(1);
}
protected override async Task OnParametersSetAsync()
{
await Task.Delay(1);
}
}
+33
View File
@@ -0,0 +1,33 @@
namespace MP_TAB3.Pages
{
public partial class Index : IDisposable
{
#region Public Methods
public void Dispose()
{
//GC.Collect();
}
#endregion Public Methods
#region Protected Methods
protected override async Task OnAfterRenderAsync(bool firstRender)
{
await Task.Delay(1);
}
protected override async Task OnInitializedAsync()
{
await Task.Delay(1);
}
protected override async Task OnParametersSetAsync()
{
await Task.Delay(1);
}
#endregion Protected Methods
}
}
+12 -1
View File
@@ -4,8 +4,19 @@ using MP.Data.Services;
namespace MP_TAB3.Pages
{
public partial class IobInfo
public partial class IobInfo : IDisposable
{
#region Public Methods
public void Dispose()
{
IdxMacc = "";
CurrMSE = null;
//GC.Collect();
}
#endregion Public Methods
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
+10 -1
View File
@@ -6,8 +6,17 @@ using Newtonsoft.Json;
namespace MP_TAB3.Pages
{
public partial class Logout
public partial class Logout : IDisposable
{
#region Public Methods
public void Dispose()
{
//GC.Collect();
}
#endregion Public Methods
#region Protected Properties
[Inject]
+12 -1
View File
@@ -5,8 +5,19 @@ using NLog;
namespace MP_TAB3.Pages
{
public partial class MachineDetail
public partial class MachineDetail : IDisposable
{
#region Public Methods
public void Dispose()
{
IdxMacc = "";
CurrMSE = null;
//GC.Collect();
}
#endregion Public Methods
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
+12 -1
View File
@@ -4,8 +4,19 @@ using MP.Data.Services;
namespace MP_TAB3.Pages
{
public partial class Notes
public partial class Notes : IDisposable
{
#region Public Methods
public void Dispose()
{
IdxMacc = "";
CurrMSE = null;
//GC.Collect();
}
#endregion Public Methods
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
+20 -10
View File
@@ -5,8 +5,19 @@ using NLog;
namespace MP_TAB3.Pages
{
public partial class ODL
public partial class ODL : IDisposable
{
#region Public Methods
public void Dispose()
{
IdxMacc = "";
CurrMSE = null;
//GC.Collect();
}
#endregion Public Methods
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
@@ -71,20 +82,19 @@ namespace MP_TAB3.Pages
try
{
if (string.IsNullOrEmpty(IdxMacc))
{
IdxMacc = await MsgServ.IdxMaccGet();
}
// recupero MSE macchina....
if (!string.IsNullOrEmpty(IdxMacc))
{
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
}
{
IdxMacc = await MsgServ.IdxMaccGet();
}
// recupero MSE macchina....
if (!string.IsNullOrEmpty(IdxMacc))
{
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
}
}
catch (Exception exc)
{
Log.Error($"Eccezione in ReloadData{Environment.NewLine}{exc}");
}
}
#endregion Private Methods
+12 -1
View File
@@ -4,8 +4,19 @@ using MP.Data.Services;
namespace MP_TAB3.Pages
{
public partial class Parameters
public partial class Parameters : IDisposable
{
#region Public Methods
public void Dispose()
{
IdxMacc = "";
CurrMSE = null;
//GC.Collect();
}
#endregion Public Methods
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
+18 -2
View File
@@ -5,8 +5,19 @@ using NLog;
namespace MP_TAB3.Pages
{
public partial class ProdPlan
public partial class ProdPlan : IDisposable
{
#region Public Methods
public void Dispose()
{
IdxMacc = "";
CurrMSE = null;
//GC.Collect();
}
#endregion Public Methods
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
@@ -44,9 +55,14 @@ namespace MP_TAB3.Pages
#endregion Protected Methods
#region Private Methods
#region Private Fields
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
#region Private Methods
private async Task ReloadData()
{
try
+12 -1
View File
@@ -7,8 +7,19 @@ using NLog;
namespace MP_TAB3.Pages
{
public partial class ProdStop
public partial class ProdStop : IDisposable
{
#region Public Methods
public void Dispose()
{
IdxMacc = "";
CurrMSE = null;
//GC.Collect();
}
#endregion Public Methods
#region Protected Fields
protected int dltMinRealtime = 1;
+30 -22
View File
@@ -9,12 +9,25 @@ using Newtonsoft.Json;
namespace MP_TAB3.Pages
{
public partial class RegNewDevice
public partial class RegNewDevice : IDisposable
{
#region Public Methods
public void Dispose()
{
txtError = "";
matrOpr = 0;
oprsList = new List<AnagOperatoriModel>();
//GC.Collect();
}
#endregion Public Methods
#region Protected Fields
protected int expDays = 1;
protected string txtError = "";
protected DateTime vetoScan = DateTime.Now;
#endregion Protected Fields
@@ -41,16 +54,14 @@ namespace MP_TAB3.Pages
}
}
protected EgwCoreLib.Razor.BarcodeReader barcodeReaderCustom { get; set; } = null!;
protected string CurrOprTknLS { get; set; } = null!;
protected string CurrOprTknRedis { get; set; } = null!;
protected int matrOpr
{
get
{
return _matrOpr;
}
get { return _matrOpr; }
set => _matrOpr = value;
}
@@ -64,27 +75,16 @@ namespace MP_TAB3.Pages
protected AnagOperatoriModel rigaOpr { get; set; } = null!;
[Inject]
protected TabDataService TDService { get; set; } = null!;
[Inject]
protected SharedMemService SMServ { get; set; } = null!;
[Inject]
protected TabDataService TDService { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected async Task ToggleCodeScan()
{
await Task.Delay(1);
ShowScanBarcode = !ShowScanBarcode;
}
protected string txtError = "";
protected string Traduci(string lemma)
{
return SMServ.Traduci($"EN_{lemma}".ToUpper());
}
protected async Task FirstLogIn()
{
rigaOpr = await TDService.OperatoreSearch(matrOpr, authKey);
@@ -157,15 +157,23 @@ namespace MP_TAB3.Pages
}
}
protected async Task ToggleCodeScan()
{
await Task.Delay(1);
ShowScanBarcode = !ShowScanBarcode;
}
protected string Traduci(string lemma)
{
return SMServ.Traduci($"EN_{lemma}".ToUpper());
}
#endregion Protected Methods
#region Private Properties
private bool ShowScanBarcode { get; set; } = false;
protected EgwCoreLib.Razor.BarcodeReader barcodeReaderCustom { get; set; } = null!;
#endregion Private Properties
}
}
+23 -7
View File
@@ -4,8 +4,19 @@ using MP.Data.Services;
namespace MP_TAB3.Pages
{
public partial class Scrap
public partial class Scrap : IDisposable
{
#region Public Methods
public void Dispose()
{
IdxMacc = "";
CurrMSE = null;
//GC.Collect();
}
#endregion Public Methods
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
@@ -41,8 +52,19 @@ namespace MP_TAB3.Pages
await InvokeAsync(StateHasChanged);
}
protected void SetMacc(string selIdxMacc)
{
IdxMaccSubSel = selIdxMacc;
}
#endregion Protected Methods
#region Private Fields
private string IdxMaccSubSel = "";
#endregion Private Fields
#region Private Methods
private async Task ReloadData()
@@ -59,11 +81,5 @@ namespace MP_TAB3.Pages
}
#endregion Private Methods
protected void SetMacc(string selIdxMacc)
{
IdxMaccSubSel = selIdxMacc;
}
private string IdxMaccSubSel = "";
}
}
+12 -1
View File
@@ -5,8 +5,19 @@ using NLog;
namespace MP_TAB3.Pages
{
public partial class TCHistory
public partial class TCHistory : IDisposable
{
#region Public Methods
public void Dispose()
{
IdxMacc = "";
TotalCount = 0;
ListComplete = new List<ODLExpModel>();
//GC.Collect();
}
#endregion Public Methods
#region Protected Fields
protected string BaseAddr = "";
+12 -1
View File
@@ -4,8 +4,19 @@ using MP.Data.Services;
namespace MP_TAB3.Pages
{
public partial class TechSheet
public partial class TechSheet : IDisposable
{
#region Public Methods
public void Dispose()
{
IdxMacc = "";
CurrMSE = null;
//GC.Collect();
}
#endregion Public Methods
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
-201
View File
@@ -100,206 +100,5 @@
}
</div>
@code {
[Inject]
private MessageService MsgServ { get; set; } = null!;
protected async Task setTcMode(string tcMode)
{
await Task.Delay(1);
tcModIns = tcMode;
}
protected async Task setLang(string lang)
{
await Task.Delay(1);
langIns = lang;
}
protected async Task setDefCardMode(string defCardMode)
{
await Task.Delay(1);
defCardModeIns = defCardMode;
}
private int MatrOpr
{
get => MsgServ.MatrOpr;
}
private string UserName
{
get => MsgServ.CognomeNome;
}
protected string btnMsStyle
{
get
{
string answ = "";
if (tcModIns == "ms")
{
answ = "btn-primary";
}
else
{
answ = "btn-outline-secondary";
}
return answ;
}
}
protected string btnMcStyle
{
get
{
string answ = "";
if (tcModIns == "mc")
{
answ = "btn-primary";
}
else
{
answ = "btn-outline-secondary";
}
return answ;
}
}
protected string btnShrinkStyle
{
get
{
string answ = "";
if (defCardModeIns == "shrink")
{
answ = "btn-primary";
}
else
{
answ = "btn-outline-secondary";
}
return answ;
}
}
protected string btnFullStyle
{
get
{
string answ = "";
if (defCardModeIns == "full")
{
answ = "btn-primary";
}
else
{
answ = "btn-outline-secondary";
}
return answ;
}
}
protected string _tcModIns { get; set; } = "";
protected string tcModIns
{
get => _tcModIns;
set
{
if (_tcModIns != value)
{
_tcModIns = value;
MsgServ.UserPrefSet("TcMode", value);
}
}
}
protected string _langIns { get; set; } = "EN";
protected string langIns
{
get => _langIns;
set
{
if (_langIns != value)
{
_langIns = value;
MsgServ.UserPrefSet("Lang", value);
}
}
}
protected string _defCardMode { get; set; } = "";
protected string defCardModeIns
{
get => _defCardMode;
set
{
if (_defCardMode != value)
{
_defCardMode = value;
MsgServ.UserPrefSet("DefCardMode", value);
}
}
}
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 override Task OnAfterRenderAsync(bool firstRender)
{
//await Task.Delay(500);
if (firstRender)
{
await getWDim();
StateHasChanged();
Log.Debug($"Dimensioni schermo: {Width}x{Height}");
}
}
[Inject]
protected SharedMemService MStor { get; set; } = null!;
protected int dtScadLogin { get; set; } = 0;
protected async override Task OnInitializedAsync()
{
tcModIns = MsgServ.UserPrefSetup("TcMode", "ms");
langIns = MsgServ.UserPrefSetup("Lang", "IT");
defCardModeIns = MsgServ.UserPrefSetup("DefCardMode", "full");
dtScadLogin = MStor.GetConfInt("TAB_dtTimerScadLogin");
await Task.Delay(1);
if (string.IsNullOrEmpty(currIpv4))
{
// ricalcolo e salvo...
if (httpContextAccessor.HttpContext != null)
{
var remoteIp = $"{httpContextAccessor.HttpContext.Connection?.RemoteIpAddress}";
// provo a recuperare ipV4...
currIpv4 = EgwCoreLib.Razor.Data.IpUtils.getLocalIpv4(remoteIp);
}
}
}
protected async Task getWDim()
{
var dimension = await JSRuntime.InvokeAsync<WindowDimension>("getWindowDimensions");
Height = dimension.Height;
Width = dimension.Width;
}
protected string mainSize
{
get
{
string answ = "col-12";
if (Width > 1021)
{
answ = "col-6";
}
return answ;
}
}
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
}
+261
View File
@@ -0,0 +1,261 @@
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
using MP.Data.DatabaseModels;
using MP.Data.Services;
using NLog;
namespace MP_TAB3.Pages
{
public partial class User : IDisposable
{
#region Public Properties
public string currIpv4 { get; set; } = "";
public int Height { get; set; } = 0;
public int Width { get; set; } = 0;
#endregion Public Properties
#region Public Methods
public void Dispose()
{
//GC.Collect();
}
#endregion Public Methods
#region Public Classes
public class WindowDimension
{
#region Public Properties
public int Height { get; set; }
public int Width { get; set; }
#endregion Public Properties
}
#endregion Public Classes
#region Protected Properties
protected string _defCardMode { get; set; } = "";
protected string _langIns { get; set; } = "EN";
protected string _tcModIns { get; set; } = "";
protected string btnFullStyle
{
get
{
string answ = "";
if (defCardModeIns == "full")
{
answ = "btn-primary";
}
else
{
answ = "btn-outline-secondary";
}
return answ;
}
}
protected string btnMcStyle
{
get
{
string answ = "";
if (tcModIns == "mc")
{
answ = "btn-primary";
}
else
{
answ = "btn-outline-secondary";
}
return answ;
}
}
protected string btnMsStyle
{
get
{
string answ = "";
if (tcModIns == "ms")
{
answ = "btn-primary";
}
else
{
answ = "btn-outline-secondary";
}
return answ;
}
}
protected string btnShrinkStyle
{
get
{
string answ = "";
if (defCardModeIns == "shrink")
{
answ = "btn-primary";
}
else
{
answ = "btn-outline-secondary";
}
return answ;
}
}
protected string defCardModeIns
{
get => _defCardMode;
set
{
if (_defCardMode != value)
{
_defCardMode = value;
MsgServ.UserPrefSet("DefCardMode", value);
}
}
}
protected int dtScadLogin { get; set; } = 0;
protected string langIns
{
get => _langIns;
set
{
if (_langIns != value)
{
_langIns = value;
MsgServ.UserPrefSet("Lang", value);
}
}
}
protected string mainSize
{
get
{
string answ = "col-12";
if (Width > 1021)
{
answ = "col-6";
}
return answ;
}
}
[Inject]
protected SharedMemService MStor { get; set; } = null!;
protected string tcModIns
{
get => _tcModIns;
set
{
if (_tcModIns != value)
{
_tcModIns = value;
MsgServ.UserPrefSet("TcMode", value);
}
}
}
#endregion Protected Properties
#region Protected Methods
protected async Task getWDim()
{
var dimension = await JSRuntime.InvokeAsync<WindowDimension>("getWindowDimensions");
Height = dimension.Height;
Width = dimension.Width;
}
protected override async Task OnAfterRenderAsync(bool firstRender)
{
//await Task.Delay(500);
if (firstRender)
{
await getWDim();
StateHasChanged();
Log.Debug($"Dimensioni schermo: {Width}x{Height}");
}
}
protected override async Task OnInitializedAsync()
{
tcModIns = MsgServ.UserPrefSetup("TcMode", "ms");
langIns = MsgServ.UserPrefSetup("Lang", "IT");
defCardModeIns = MsgServ.UserPrefSetup("DefCardMode", "full");
dtScadLogin = MStor.GetConfInt("TAB_dtTimerScadLogin");
await Task.Delay(1);
if (string.IsNullOrEmpty(currIpv4))
{
// ricalcolo e salvo...
if (httpContextAccessor.HttpContext != null)
{
var remoteIp = $"{httpContextAccessor.HttpContext.Connection?.RemoteIpAddress}";
// provo a recuperare ipV4...
currIpv4 = EgwCoreLib.Razor.Data.IpUtils.getLocalIpv4(remoteIp);
}
}
}
protected async Task setDefCardMode(string defCardMode)
{
await Task.Delay(1);
defCardModeIns = defCardMode;
}
protected async Task setLang(string lang)
{
await Task.Delay(1);
langIns = lang;
}
protected async Task setTcMode(string tcMode)
{
await Task.Delay(1);
tcModIns = tcMode;
}
#endregion Protected Methods
#region Private Fields
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
#region Private Properties
private int MatrOpr
{
get => MsgServ.MatrOpr;
}
[Inject]
private MessageService MsgServ { get; set; } = null!;
private string UserName
{
get => MsgServ.CognomeNome;
}
#endregion Private Properties
}
}
+12 -1
View File
@@ -4,8 +4,19 @@ using MP.Data.Services;
namespace MP_TAB3.Pages
{
public partial class WorkShift
public partial class WorkShift : IDisposable
{
#region Public Methods
public void Dispose()
{
IdxMacc = "";
CurrMSE = null;
currTurni = new TurniMaccModel();
//GC.Collect();
}
#endregion Public Methods
#region Protected Properties
protected MappaStatoExpl? CurrMSE { get; set; } = null;
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 6.16.2402.616</h4>
<h4>Versione: 6.16.2402.619</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2402.616
6.16.2402.619
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2402.616</version>
<version>6.16.2402.619</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>
+1 -1
View File
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace MP.Data.Services
{
public class MonDataFeeder : StatusData
public class MonDataFeeder : StatusData, IDisposable
{
#region Public Constructors
+1 -1
View File
@@ -2142,7 +2142,7 @@ namespace MP.Data.Services
result = dbTabController.RegScartiGetFilt(idxMacchina, idxODL, dataFrom, dataTo, showMulti);
// serializzp e salvo...
rawData = JsonConvert.SerializeObject(result);
await redisDb.StringSetAsync(currKey, rawData, UltraLongCache);
await redisDb.StringSetAsync(currKey, rawData, LongCache);
}
if (result == null)
{