diff --git a/MP.Prog/Data/FileArchDataService.cs b/MP.Prog/Data/FileArchDataService.cs index 7d53343c..f99fd3f6 100644 --- a/MP.Prog/Data/FileArchDataService.cs +++ b/MP.Prog/Data/FileArchDataService.cs @@ -259,8 +259,9 @@ namespace MP.Prog.Data /// /// Aggiorna intero archivio scansionando dati x tutte le macchine che hanno un path valido /// + /// Numero giorni x ricerca all'indietro da data corrente / 0 = nessun limite /// - public async Task updateAllArchive() + public async Task updateAllArchive(int numDayPre) { string ruleName = "Rule01.json"; try @@ -316,7 +317,7 @@ namespace MP.Prog.Data Log.Info($"Conf rule generato:{Environment.NewLine}{rawRule}"); } - dbController.CheckFileArchived(item.IdxMacchina, item.BasePath, "*.*", currRule); + dbController.CheckFileArchived(item.IdxMacchina, item.BasePath, numDayPre, "*.*", currRule); } } catch (Exception exc) diff --git a/MP.Prog/MP.Prog.csproj b/MP.Prog/MP.Prog.csproj index fc16b061..bbc39c46 100644 --- a/MP.Prog/MP.Prog.csproj +++ b/MP.Prog/MP.Prog.csproj @@ -4,13 +4,8 @@ net5.0 - - - - - diff --git a/MP.Prog/Pages/Archive.razor b/MP.Prog/Pages/Archive.razor index cd593b00..c5e547e0 100644 --- a/MP.Prog/Pages/Archive.razor +++ b/MP.Prog/Pages/Archive.razor @@ -1,5 +1,7 @@ @page "/Archive" +@using MP.Prog.Components +
@@ -10,12 +12,19 @@
-
-
+
+
+ +
+
+
@@ -25,17 +34,17 @@
-
+
- +
-
+
@@ -63,14 +72,18 @@
+ @if (isLoading == true) + { +

Bingo!

+ } + @if (currRecord != null) { - + } - @if (ListRecords == null) + @if (ListRecords == null || isLoading == true) { - - RELOADING + } else if (totalCount == 0) { @@ -158,6 +171,6 @@ }
\ No newline at end of file diff --git a/MP.Prog/Pages/Archive.razor.cs b/MP.Prog/Pages/Archive.razor.cs index b7230ead..a44b46c1 100644 --- a/MP.Prog/Pages/Archive.razor.cs +++ b/MP.Prog/Pages/Archive.razor.cs @@ -5,6 +5,7 @@ using MP.Prog.Data; using System; using System.Collections.Generic; using System.Linq; +using System.Threading; using System.Threading.Tasks; namespace MP.Prog.Pages @@ -263,16 +264,20 @@ namespace MP.Prog.Pages pUpd.Wait(); } - protected async Task ForceCheck() + protected void ForceCheck(int maxHour) { - isLoading = true; - await DataService.updateAllArchive(); - currRecord = null; - SearchRecords = null; - ListRecords = null; - AppMService.File_Filter = SelectData.Init(5, 10); - isLoading = false; - await ReloadAllData(); + var pUpd = Task.Run(async () => + { + isLoading = true; + currRecord = null; + SearchRecords = null; + ListRecords = null; + await DataService.updateAllArchive(maxHour); + AppMService.File_Filter = SelectData.Init(5, 10); + isLoading = false; + await ReloadAllData(); + }); + pUpd.Wait(); } protected void ForceReload(int newNum) @@ -341,6 +346,18 @@ namespace MP.Prog.Pages currRecord = selRecord; } + protected async void TestLoading() + { + await InvokeAsync(() => + { + isLoading = !isLoading; + //StateHasChanged(); + //Thread.Sleep(500); + //Task.Delay(1); + //isLoading = false; + }); + } + protected async Task UpdateData() { currRecord = null; diff --git a/MP.Stats/MP.Stats.csproj b/MP.Stats/MP.Stats.csproj index 6f622334..4555e6e3 100644 --- a/MP.Stats/MP.Stats.csproj +++ b/MP.Stats/MP.Stats.csproj @@ -4,7 +4,7 @@ net5.0 MP.Stats 826e877c-ba70-4253-84cb-d0b1cafd4440 - 1.0.2109.0318 + 1.0.2109.1308 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 7c25555c..3f8966c0 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo statistiche MAPO -

Versione: 1.0.2109.0318

+

Versione: 1.0.2109.1308


Note di rilascio:
    diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index f39fda21..9aabad6d 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -1.0.2109.0318 +1.0.2109.1308 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index cb5c5903..20cd83ff 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.0.2109.0318 + 1.0.2109.1308 http://nexus.steamware.net/repository/SWS/MP-STATS/stable/0/MP.Stats.zip http://nexus.steamware.net/repository/SWS/MP-STATS/stable/0/ChangeLog.html false