diff --git a/MP-TAB3/Components/ControlsMan.razor b/MP-TAB3/Components/ControlsMan.razor index 7709e613..713a7ef4 100644 --- a/MP-TAB3/Components/ControlsMan.razor +++ b/MP-TAB3/Components/ControlsMan.razor @@ -7,7 +7,7 @@
@if (enableControlli) { - @if (RecMSE.IdxOdl > 0) + @if (RecMSE != null && RecMSE.IdxOdl > 0) { diff --git a/MP-TAB3/Components/OdlMan.razor.cs b/MP-TAB3/Components/OdlMan.razor.cs index 78bb9850..8090d76a 100644 --- a/MP-TAB3/Components/OdlMan.razor.cs +++ b/MP-TAB3/Components/OdlMan.razor.cs @@ -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 /// private int IdxOdlAltra { get; set; } = 0; + private bool isLoading { get; set; } = false; + private string lblWarnBody { get => odlOk ? Traduci("ConfProdBeforeContinueBody") : Traduci("setOdlBeforeContinueBody"); diff --git a/MP-TAB3/Components/ProdStat.razor b/MP-TAB3/Components/ProdStat.razor index e8e36b83..a70ec005 100644 --- a/MP-TAB3/Components/ProdStat.razor +++ b/MP-TAB3/Components/ProdStat.razor @@ -8,6 +8,10 @@ { @($"ODL: {RecMSE.IdxOdl}") } + else + { + n.a. + }
@@ -17,18 +21,21 @@
Data di inizio
-
- @if (RecMSE != null) - { + @if (RecMSE != null) + { +
@($"{RecMSE.DataInizioOdl:yyyy/MM/dd}") - } -
-
- @if (RecMSE != null) - { +
+
@($"{RecMSE.DataInizioOdl:HH: mm}") - } -
+
+ } + else + { +
+ n.a. +
+ }
@@ -36,11 +43,20 @@
Cod Articolo
-
- @RecMSE.CodArticolo -
-
-
+ @if (RecMSE != null) + { +
+ @RecMSE.CodArticolo +
+
+
+ } + else + { +
+ n.a. +
+ }
@@ -48,11 +64,20 @@
Nr Pezzi lanciati
-
- @($"{RecMSE.NumPezzi}") pz. -
-
-
+ @if (RecMSE != null) + { +
+ @($"{RecMSE.NumPezzi}") pz. +
+
+
+ } + else + { +
+ n.a. +
+ }
@@ -60,11 +85,20 @@
Nr Pezzi confermati
-
- @($"{RecMSE.PezziConf}") pz. -
-
-
+ @if (RecMSE != null) + { +
+ @($"{RecMSE.PezziConf}") pz. +
+
+
+ } + else + { +
+ n.a. +
+ }
@@ -74,11 +108,20 @@
Nr pezzi fatti
-
- (@($"{RecMSE.PezziProd}") pz.) -
-
-
+ @if (RecMSE != null) + { +
+ (@($"{RecMSE.PezziProd}") pz.) +
+
+
+ } + else + { +
+ n.a. +
+ }
@@ -86,14 +129,23 @@
Efficienza globale
-
- @RecMSE.OEE_tot -
-
- - (@RecMSE.OEE_RT_tot) - -
+ @if (RecMSE != null) + { +
+ @RecMSE.OEE_tot +
+
+ + (@RecMSE.OEE_RT_tot) + +
+ } + else + { +
+ n.a. +
+ }
@@ -101,14 +153,23 @@
Efficienza lavoro
-
- @RecMSE.OEE_wrk -
-
- - (@RecMSE.OEE_RT_wrk) - -
+ @if (RecMSE != null) + { +
+ @RecMSE.OEE_wrk +
+
+ + (@RecMSE.OEE_RT_wrk) + +
+ } + else + { +
+ n.a. +
+ }
@@ -116,42 +177,53 @@
Efficienza teorica
-
- @RecMSE.OEE_run -
-
- - (@RecMSE.OEE_RT_run) - -
+ @if (RecMSE != null) + { +
+ @RecMSE.OEE_run +
+
+ + (@RecMSE.OEE_RT_run) + +
+ } + else + { +
+ n.a. +
+ }
- - - - - - -
Tc medio
-
- - @($"{RecMSE.TCMedio:0.###}") - -
-
- - (@($"{RecMSE.TCMedioRt:0.###}")) - -
+ @if (RecMSE != null) + { +
+ + @($"{RecMSE.TCMedio:0.###}") + +
+
+ + (@($"{RecMSE.TCMedioRt:0.###}")) + +
+ } + else + { +
+ n.a. +
+ }
@@ -159,14 +231,23 @@
Tc lavoro
-
- @($"{RecMSE.TCLav:0.###}") -
-
- - (@($"{RecMSE.TCLavRT:0.###}")) - -
+ @if (RecMSE != null) + { +
+ @($"{RecMSE.TCLav:0.###}") +
+
+ + (@($"{RecMSE.TCLavRT:0.###}")) + +
+ } + else + { +
+ n.a. +
+ }
@@ -174,14 +255,23 @@
Tc tecnico
-
- @($"{RecMSE.TCEff:0.###}") -
-
- - (@($"{RecMSE.TCEffRT:0.###}")) - -
+ @if (RecMSE != null) + { +
+ @($"{RecMSE.TCEff:0.###}") +
+
+ + (@($"{RecMSE.TCEffRT:0.###}")) + +
+ } + else + { +
+ n.a. +
+ }
@@ -189,11 +279,20 @@
Tc impostato
-
- @($"{RecMSE.TCAssegnato:0.###}") -
-
-
+ @if (RecMSE != null) + { +
+ @($"{RecMSE.TCAssegnato:0.###}") +
+
+
+ } + else + { +
+ n.a. +
+ }
\ No newline at end of file diff --git a/MP-TAB3/MP-TAB3.csproj b/MP-TAB3/MP-TAB3.csproj index 7e9382bf..8d19880d 100644 --- a/MP-TAB3/MP-TAB3.csproj +++ b/MP-TAB3/MP-TAB3.csproj @@ -3,7 +3,7 @@ net6.0 enable - 6.16.2402.616 + 6.16.2402.619 enable MP_TAB3 diff --git a/MP-TAB3/NLog.config b/MP-TAB3/NLog.config index b32ba10a..10411f3f 100644 --- a/MP-TAB3/NLog.config +++ b/MP-TAB3/NLog.config @@ -39,8 +39,8 @@ Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace) to "f" --> + - \ No newline at end of file diff --git a/MP-TAB3/Pages/Alarms.razor.cs b/MP-TAB3/Pages/Alarms.razor.cs index 6fccf627..de6fd6db 100644 --- a/MP-TAB3/Pages/Alarms.razor.cs +++ b/MP-TAB3/Pages/Alarms.razor.cs @@ -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; diff --git a/MP-TAB3/Pages/CardDemo.razor b/MP-TAB3/Pages/CardDemo.razor deleted file mode 100644 index 8581926d..00000000 --- a/MP-TAB3/Pages/CardDemo.razor +++ /dev/null @@ -1,58 +0,0 @@ -@page "/CardDemo" - -@if (CardTitles == null || CardTitles.Count == 0) -{ -
-
- waiting on browser -
- @for (int i = 0; i < 9; i++) - { -
- - -
- } -
-} -else -{ - -
-
- loaded on browser -
- @foreach (var item in CardTitles) - { -
- -
- Demo content page for @item -
-
- This is an example Blazor component! -
-
-
- } -
-} - -@code { - - protected List? CardTitles { get; set; } - - protected override async Task OnInitializedAsync() - { - CardTitles = null; - await Task.Delay(300); - CardTitles = new List(); - await InvokeAsync(StateHasChanged); - await Task.Delay(300); - for (int i = 0; i < 9; i++) - { - CardTitles.Add($"Card {i + 1:00}"); - } - await Task.Delay(10); - } -} \ No newline at end of file diff --git a/MP-TAB3/Pages/Controls.razor.cs b/MP-TAB3/Pages/Controls.razor.cs index 192b6cd9..0668beed 100644 --- a/MP-TAB3/Pages/Controls.razor.cs +++ b/MP-TAB3/Pages/Controls.razor.cs @@ -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; diff --git a/MP-TAB3/Pages/Declarations.razor.cs b/MP-TAB3/Pages/Declarations.razor.cs index 30e3a328..ab991087 100644 --- a/MP-TAB3/Pages/Declarations.razor.cs +++ b/MP-TAB3/Pages/Declarations.razor.cs @@ -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; diff --git a/MP-TAB3/Pages/Index.razor b/MP-TAB3/Pages/Index.razor index c7d708b6..a31caef8 100644 --- a/MP-TAB3/Pages/Index.razor +++ b/MP-TAB3/Pages/Index.razor @@ -3,18 +3,4 @@ -@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); - } -} diff --git a/MP-TAB3/Pages/Index.razor.cs b/MP-TAB3/Pages/Index.razor.cs new file mode 100644 index 00000000..3c9cb87a --- /dev/null +++ b/MP-TAB3/Pages/Index.razor.cs @@ -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 + } +} \ No newline at end of file diff --git a/MP-TAB3/Pages/IobInfo.razor.cs b/MP-TAB3/Pages/IobInfo.razor.cs index a896a503..d33ea89f 100644 --- a/MP-TAB3/Pages/IobInfo.razor.cs +++ b/MP-TAB3/Pages/IobInfo.razor.cs @@ -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; diff --git a/MP-TAB3/Pages/Logout.razor.cs b/MP-TAB3/Pages/Logout.razor.cs index 2d599b96..60973fab 100644 --- a/MP-TAB3/Pages/Logout.razor.cs +++ b/MP-TAB3/Pages/Logout.razor.cs @@ -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] diff --git a/MP-TAB3/Pages/MachineDetail.razor.cs b/MP-TAB3/Pages/MachineDetail.razor.cs index 36bb419f..a74043db 100644 --- a/MP-TAB3/Pages/MachineDetail.razor.cs +++ b/MP-TAB3/Pages/MachineDetail.razor.cs @@ -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; diff --git a/MP-TAB3/Pages/Notes.razor.cs b/MP-TAB3/Pages/Notes.razor.cs index 29458d6c..62ac74b4 100644 --- a/MP-TAB3/Pages/Notes.razor.cs +++ b/MP-TAB3/Pages/Notes.razor.cs @@ -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; diff --git a/MP-TAB3/Pages/ODL.razor.cs b/MP-TAB3/Pages/ODL.razor.cs index bcb50c75..238d4da1 100644 --- a/MP-TAB3/Pages/ODL.razor.cs +++ b/MP-TAB3/Pages/ODL.razor.cs @@ -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 diff --git a/MP-TAB3/Pages/Parameters.razor.cs b/MP-TAB3/Pages/Parameters.razor.cs index 0fb04ca4..b4cddaaa 100644 --- a/MP-TAB3/Pages/Parameters.razor.cs +++ b/MP-TAB3/Pages/Parameters.razor.cs @@ -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; diff --git a/MP-TAB3/Pages/ProdPlan.razor.cs b/MP-TAB3/Pages/ProdPlan.razor.cs index 8d18add5..c7e206f2 100644 --- a/MP-TAB3/Pages/ProdPlan.razor.cs +++ b/MP-TAB3/Pages/ProdPlan.razor.cs @@ -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 diff --git a/MP-TAB3/Pages/ProdStop.razor.cs b/MP-TAB3/Pages/ProdStop.razor.cs index e2c268cf..2a167041 100644 --- a/MP-TAB3/Pages/ProdStop.razor.cs +++ b/MP-TAB3/Pages/ProdStop.razor.cs @@ -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; diff --git a/MP-TAB3/Pages/RegNewDevice.razor.cs b/MP-TAB3/Pages/RegNewDevice.razor.cs index dbfc4f4a..3b202b3c 100644 --- a/MP-TAB3/Pages/RegNewDevice.razor.cs +++ b/MP-TAB3/Pages/RegNewDevice.razor.cs @@ -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(); + //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 - } } \ No newline at end of file diff --git a/MP-TAB3/Pages/Scrap.razor.cs b/MP-TAB3/Pages/Scrap.razor.cs index 76d40e31..aea77e19 100644 --- a/MP-TAB3/Pages/Scrap.razor.cs +++ b/MP-TAB3/Pages/Scrap.razor.cs @@ -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 = ""; } } \ No newline at end of file diff --git a/MP-TAB3/Pages/TCHistory.razor.cs b/MP-TAB3/Pages/TCHistory.razor.cs index 9f76c4b1..36e58def 100644 --- a/MP-TAB3/Pages/TCHistory.razor.cs +++ b/MP-TAB3/Pages/TCHistory.razor.cs @@ -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(); + //GC.Collect(); + } + + #endregion Public Methods #region Protected Fields protected string BaseAddr = ""; diff --git a/MP-TAB3/Pages/TechSheet.razor.cs b/MP-TAB3/Pages/TechSheet.razor.cs index e4ed94e7..e46cc31c 100644 --- a/MP-TAB3/Pages/TechSheet.razor.cs +++ b/MP-TAB3/Pages/TechSheet.razor.cs @@ -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; diff --git a/MP-TAB3/Pages/User.razor b/MP-TAB3/Pages/User.razor index 370ef7a8..d8352e48 100644 --- a/MP-TAB3/Pages/User.razor +++ b/MP-TAB3/Pages/User.razor @@ -100,206 +100,5 @@ } -@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("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(); -} diff --git a/MP-TAB3/Pages/User.razor.cs b/MP-TAB3/Pages/User.razor.cs new file mode 100644 index 00000000..7d0d12f9 --- /dev/null +++ b/MP-TAB3/Pages/User.razor.cs @@ -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("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 + } +} \ No newline at end of file diff --git a/MP-TAB3/Pages/WorkShift.razor.cs b/MP-TAB3/Pages/WorkShift.razor.cs index b92689d9..640f137f 100644 --- a/MP-TAB3/Pages/WorkShift.razor.cs +++ b/MP-TAB3/Pages/WorkShift.razor.cs @@ -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; diff --git a/MP-TAB3/Resources/ChangeLog.html b/MP-TAB3/Resources/ChangeLog.html index cbfbf3ab..bfc9a17e 100644 --- a/MP-TAB3/Resources/ChangeLog.html +++ b/MP-TAB3/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2402.616

+

Versione: 6.16.2402.619


Note di rilascio:
  • diff --git a/MP-TAB3/Resources/VersNum.txt b/MP-TAB3/Resources/VersNum.txt index 2ee1e493..582707bf 100644 --- a/MP-TAB3/Resources/VersNum.txt +++ b/MP-TAB3/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2402.616 +6.16.2402.619 diff --git a/MP-TAB3/Resources/manifest.xml b/MP-TAB3/Resources/manifest.xml index dda7bb10..9e9c1e61 100644 --- a/MP-TAB3/Resources/manifest.xml +++ b/MP-TAB3/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2402.616 + 6.16.2402.619 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/MonDataFeeder.cs b/MP.Data/Services/MonDataFeeder.cs index ddb2a8c6..3299cb87 100644 --- a/MP.Data/Services/MonDataFeeder.cs +++ b/MP.Data/Services/MonDataFeeder.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; namespace MP.Data.Services { - public class MonDataFeeder : StatusData + public class MonDataFeeder : StatusData, IDisposable { #region Public Constructors diff --git a/MP.Data/Services/TabDataService.cs b/MP.Data/Services/TabDataService.cs index 8f7695fb..19062abb 100644 --- a/MP.Data/Services/TabDataService.cs +++ b/MP.Data/Services/TabDataService.cs @@ -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) {