diff --git a/MP-TAB-SERV/Pages/MachineDetail.razor.cs b/MP-TAB-SERV/Pages/MachineDetail.razor.cs index bd9e2fba..54d06e05 100644 --- a/MP-TAB-SERV/Pages/MachineDetail.razor.cs +++ b/MP-TAB-SERV/Pages/MachineDetail.razor.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Components; using MP.Data.DatabaseModels; using MP.Data.Services; +using NLog.Fluent; namespace MP_TAB_SERV.Pages { @@ -13,6 +14,8 @@ namespace MP_TAB_SERV.Pages [Inject] protected MessageService MsgServ { get; set; } = null!; + [Inject] + protected TabDataService TabServ { get; set; } = null!; #endregion Protected Properties @@ -68,8 +71,33 @@ namespace MP_TAB_SERV.Pages CurrMSE = await MsgServ.GetMachineMse(IdxMacc); } } + // recupero parametri configurazione... + await setupConf(); } + private async Task setupConf() + { + CurrConfig = await TabServ.ConfigGetAll(); +#if false + if (CurrConfig != null && CurrConfig.Count > 0) + { + // sistemo i parametri opzionali... + getConfValInt("keepAliveMin", ref keepAliveMin); + getConfValInt("MON_maxCol", ref maxCol); + int intDoAnim = 0; + getConfValInt("doAnimate", ref intDoAnim); + doAnimate = intDoAnim == 1; + getConfValInt("pageRefreshSec", ref slowRefreshSec); + getConfVal("sART", ref showArt); + Log.Info($"setupConf | Effettuato setup parametri | keepAlive: {keepAliveMin} | MaxCol: {maxCol} | doAnimate: {doAnimate} | slowRefreshSec: {slowRefreshSec}"); + } +#endif + } + + private List? CurrConfig = null; + + private bool enableSchedaTecnica = false; + #endregion Private Methods } } \ No newline at end of file diff --git a/MP.Data/Services/TabDataService.cs b/MP.Data/Services/TabDataService.cs index 94b5a472..2de020f9 100644 --- a/MP.Data/Services/TabDataService.cs +++ b/MP.Data/Services/TabDataService.cs @@ -113,8 +113,6 @@ namespace MP.Data.Services sw.Stop(); Log.Debug($"ConfigGetAll | {source} | {sw.Elapsed.TotalMilliseconds}ms"); return result; - - //return Task.FromResult(dbController.ConfigGetAll().ToList()); } public void Dispose()