diff --git a/EgwCoreLib.BlazorTest/Pages/TestLoading.razor b/EgwCoreLib.BlazorTest/Pages/TestLoading.razor index 51306b3..9e66ea2 100644 --- a/EgwCoreLib.BlazorTest/Pages/TestLoading.razor +++ b/EgwCoreLib.BlazorTest/Pages/TestLoading.razor @@ -11,4 +11,4 @@ - + diff --git a/EgwCoreLib.BlazorTest/Pages/TestLoading.razor.cs b/EgwCoreLib.BlazorTest/Pages/TestLoading.razor.cs index 24296ba..eaaecf0 100644 --- a/EgwCoreLib.BlazorTest/Pages/TestLoading.razor.cs +++ b/EgwCoreLib.BlazorTest/Pages/TestLoading.razor.cs @@ -4,7 +4,7 @@ namespace EgwCoreLib.BlazorTest.Pages { #region Protected Properties - protected double expTime { get; set; } = 20; + protected double expTime { get; set; } = 6; protected int numSteps { get; set; } = 4; #endregion Protected Properties @@ -18,12 +18,11 @@ namespace EgwCoreLib.BlazorTest.Pages int stepVal = maxVal / numSteps; // imposto i valori x progress.. maxVal = 100; - expTimeMSec = stdWait * 1000; + expTimeMSec = (int)(stdWait * 1000); //nextVal = stepVal; //currVal = 0; for (int currStep = 1; currStep <= numSteps; currStep++) { - //await Task.Delay(1); // aggiorno valori currVal = (currStep - 1) * stepVal; nextVal = currStep * stepVal; @@ -33,7 +32,8 @@ namespace EgwCoreLib.BlazorTest.Pages nextVal = maxVal; } await InvokeAsync(StateHasChanged); - nextWait = (int)(rnd.Next(2000, 2500) * stdWait); + // simulo ritardo importante (da 2 a 3 volte + nextWait = (int)(rnd.Next(2000, 3000) * stdWait); // attendo step successivi... await Task.Delay(nextWait); } @@ -47,11 +47,11 @@ namespace EgwCoreLib.BlazorTest.Pages #region Private Fields private int currVal = 100; - private double expTimeMSec = 10000; + private int expTimeMSec = 10000; private int maxVal = 100; private int nextVal = 100; private Random rnd = new Random(); - private string titleMsg = "Test Progress"; + private string titleMsg = "SIM Progress"; #endregion Private Fields } diff --git a/EgwCoreLib.Razor/ProgressDisplay.razor b/EgwCoreLib.Razor/ProgressDisplay.razor index 7c2164d..988f338 100644 --- a/EgwCoreLib.Razor/ProgressDisplay.razor +++ b/EgwCoreLib.Razor/ProgressDisplay.razor @@ -1,29 +1,28 @@ -@*
-
-

loading data

- -
-
-*@ - -@if (IsLoading) +@if (isLoading) { -