Bozza gestione setup conf
This commit is contained in:
@@ -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<ConfigModel>? CurrConfig = null;
|
||||
|
||||
private bool enableSchedaTecnica = false;
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user