Pulizia metodi inutilizzati

This commit is contained in:
Samuele Locatelli
2022-09-15 15:46:39 +02:00
parent fcf1ec5ea9
commit 07c58c5738
2 changed files with 31 additions and 26 deletions
+8 -13
View File
@@ -14,7 +14,8 @@ namespace MP.SPEC.Components
public EventCallback<bool> PagerResetReq { get; set; }
[Parameter]
public SelectFluxParams SelFilter
public SelectFluxParams SelFilter { get; set; } = null!;
#if false
{
get => _selFilter;
set
@@ -22,13 +23,10 @@ namespace MP.SPEC.Components
if (!_selFilter.Equals(value))
{
_selFilter = value;
#if false
var pUpd = Task.Run(async () => await reloadData(true));
pUpd.Wait();
#endif
}
}
}
}
#endif
[Parameter]
public EventCallback<int> TotRecordChanged { get; set; }
@@ -153,9 +151,7 @@ namespace MP.SPEC.Components
#region Private Fields
private static System.Timers.Timer aTimer = null!;
private int _maxRecord = 100;
private string _selFlux = "*";
private string _selMacchina = "*";
private int _totalCount = 0;
private FluxLog? currRecord = null;
private List<FluxLog>? ListRecords;
@@ -165,7 +161,6 @@ namespace MP.SPEC.Components
#region Private Properties
private SelectFluxParams _selFilter { get; set; } = new SelectFluxParams();
private int currPage
{
@@ -182,7 +177,7 @@ namespace MP.SPEC.Components
private int MaxRecord
{
get => _selFilter.MaxRecord;
get => SelFilter.MaxRecord;
}
#if false
@@ -225,12 +220,12 @@ namespace MP.SPEC.Components
private string SelFlux
{
get => _selFilter.CodFlux;
get => SelFilter.CodFlux;
}
private string SelMacchina
{
get => _selFilter.IdxMacchina;
get => SelFilter.IdxMacchina;
}
#if false
+23 -13
View File
@@ -9,29 +9,35 @@ namespace MP.SPEC.Pages
{
#region Protected Fields
#if false
protected string _selFlux = "*";
protected string _selMacchina = "*";
protected string lastUpdate = "-";
protected DataPager pagerODL;
protected string lastUpdate = "-";
protected bool reqNew = false;
[Inject]
protected IJSRuntime JSRuntime { get; set; }
[Inject]
protected MpDataService MDService { get; set; }
#endif
protected DataPager pagerODL;
#endregion Protected Fields
#region Protected Properties
[Inject]
protected IJSRuntime JSRuntime { get; set; }
protected bool liveUpdate { get; set; } = true;
[Inject]
protected MpDataService MDService { get; set; }
#if false
protected bool liveUpdate { get; set; } = true;
#endif
[Inject]
protected MessageService MsgService { get; set; }
#if false
[Inject]
protected NavigationManager NavManager { get; set; }
#endif
#endregion Protected Properties
@@ -44,8 +50,8 @@ namespace MP.SPEC.Pages
protected void ForceReloadPage(int newNum)
{
//liveUpdate = newNum == 1;
currPage = newNum;
currFilter.LiveUpdate = (currPage == 1);
}
protected override async Task OnInitializedAsync()
@@ -56,12 +62,12 @@ namespace MP.SPEC.Pages
// resetto search
MsgService.SearchVal = "";
#if false
// carico dati
lastUpdate = $"Updated: {DateTime.Now:yyyy/MM/dd HH:mm:ss}";
#if false
await reloadFilters();
#endif
await reloadData();
#endif
isLoading = false;
}
@@ -119,6 +125,7 @@ namespace MP.SPEC.Pages
#region Private Methods
#if false
private async Task reloadData()
{
isLoading = true;
@@ -129,14 +136,17 @@ namespace MP.SPEC.Pages
}
isLoading = false;
await Task.Delay(1);
}
}
#endif
private async Task updateFilter(SelectFluxParams newParams)
{
isLoading = true;
currFilter = newParams;
liveUpdate = newParams.LiveUpdate;
#if false
liveUpdate = newParams.LiveUpdate;
#endif
await Task.Delay(1);
await InvokeAsync(() => StateHasChanged());
//await Task.Delay(1);