Collegato refresh period da edit conf
This commit is contained in:
@@ -15,18 +15,6 @@ namespace MP.SPEC.Components
|
||||
|
||||
[Parameter]
|
||||
public SelectFluxParams SelFilter { get; set; } = null!;
|
||||
#if false
|
||||
{
|
||||
get => _selFilter;
|
||||
set
|
||||
{
|
||||
if (!_selFilter.Equals(value))
|
||||
{
|
||||
_selFilter = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> TotRecordChanged { get; set; }
|
||||
@@ -76,7 +64,7 @@ namespace MP.SPEC.Components
|
||||
// misuro tempo esecuzione
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
int deltaTime = tOutPeriod - (int)ts.TotalMilliseconds;
|
||||
int deltaTime = RefreshPeriod - (int)ts.TotalMilliseconds;
|
||||
aTimer.Interval = deltaTime > 100 ? deltaTime : 100;
|
||||
aTimer.Start();
|
||||
}
|
||||
@@ -99,7 +87,7 @@ namespace MP.SPEC.Components
|
||||
public void StartTimer()
|
||||
{
|
||||
//int.TryParse(Configuration["ReloadStatusTimer"], out tOutPeriod);
|
||||
aTimer = new System.Timers.Timer(tOutPeriod);
|
||||
aTimer = new System.Timers.Timer(RefreshPeriod);
|
||||
aTimer.Elapsed += ElapsedTimer;
|
||||
aTimer.Enabled = true;
|
||||
//aTimer.AutoReset = true;
|
||||
@@ -119,6 +107,12 @@ namespace MP.SPEC.Components
|
||||
[Inject]
|
||||
protected MessageService MessageService { get; set; } = null!;
|
||||
|
||||
protected int RefreshPeriod
|
||||
{
|
||||
get => SelFilter.TempoAgg;
|
||||
}
|
||||
//protected int RefreshPeriod { get; set; } = 5000;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
@@ -164,7 +158,6 @@ namespace MP.SPEC.Components
|
||||
|
||||
#region Private Properties
|
||||
|
||||
|
||||
private int currPage
|
||||
{
|
||||
get => MessageService.currPage;
|
||||
@@ -183,38 +176,6 @@ namespace MP.SPEC.Components
|
||||
get => SelFilter.MaxRecord;
|
||||
}
|
||||
|
||||
#if false
|
||||
[Parameter]
|
||||
public bool LiveUpdate
|
||||
{
|
||||
get => _liveUpdate;
|
||||
set
|
||||
{
|
||||
_liveUpdate = value;
|
||||
// var pUpd = Task.Run(async () => await reloadData(false)); pUpd.Wait();
|
||||
}
|
||||
}
|
||||
private bool _liveUpdate { get; set; }
|
||||
#endif
|
||||
|
||||
#if false
|
||||
|
||||
[Parameter]
|
||||
public int MaxRecord
|
||||
{
|
||||
get => _maxRecord;
|
||||
set
|
||||
{
|
||||
if (_maxRecord != value)
|
||||
{
|
||||
_maxRecord = value;
|
||||
var pUpd = Task.Run(async () => await reloadData(true));
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
private int numRecord
|
||||
{
|
||||
get => MessageService.numRecord;
|
||||
@@ -231,38 +192,6 @@ namespace MP.SPEC.Components
|
||||
get => SelFilter.IdxMacchina;
|
||||
}
|
||||
|
||||
#if false
|
||||
[Parameter]
|
||||
public string SelFlux
|
||||
{
|
||||
get => _selFlux;
|
||||
set
|
||||
{
|
||||
if (_selFlux != value)
|
||||
{
|
||||
_selFlux = value;
|
||||
//var pUpd = Task.Run(async () => await reloadData(false));
|
||||
//pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public string SelMacchina
|
||||
{
|
||||
get => _selMacchina;
|
||||
set
|
||||
{
|
||||
if (_selMacchina != value)
|
||||
{
|
||||
_selMacchina = value;
|
||||
//var pUpd = Task.Run(async () => await reloadData(false));
|
||||
//pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
private int totalCount
|
||||
{
|
||||
get => _totalCount;
|
||||
@@ -276,8 +205,6 @@ namespace MP.SPEC.Components
|
||||
}
|
||||
}
|
||||
|
||||
private int tOutPeriod { get; set; } = 5000;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
Reference in New Issue
Block a user