aggiunto load
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>WebDoorCreator - Egalware</i>
|
||||
<h4>Version: 0.9.2308.3116</h4>
|
||||
<h4>Version: 0.9.2308.3117</h4>
|
||||
<br /> Release note:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.9.2308.3116
|
||||
0.9.2308.3117
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>0.9.2308.3116</version>
|
||||
<version>0.9.2308.3117</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/WDC/stable/WDC.UI.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/WDC/stable/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -4,27 +4,32 @@
|
||||
<div class="d-flex justify-content-between my-2">
|
||||
<div class="col-5 text-center fw-bold border border-secondary rounded d-flex justify-content-between">
|
||||
<div>
|
||||
@if (files2Chk != null && files2Chk.Count() > 0)
|
||||
@*@if (files2Chk != null && files2Chk.Count() > 0)
|
||||
{
|
||||
<button class="btn btn-info">Scan again</button>
|
||||
}
|
||||
<button class="btn btn-info">Scan again</button>
|
||||
}*@
|
||||
</div>
|
||||
<div>Candidate</div>
|
||||
<div></div>
|
||||
</div>
|
||||
<div class="col-2 text-center"><button class="btn btn-dark" @onclick="()=>scanB()">Scan Dir New</button></div>
|
||||
<div class="col-2 text-center"><button class="btn btn-dark" @onclick="()=>doScan()">Scan Dir New</button></div>
|
||||
<div class="col-5 text-center fw-bold border border-secondary rounded d-flex justify-content-between">
|
||||
<div></div>
|
||||
<div>Current</div>
|
||||
<div>
|
||||
@if (files2Chk != null && files2Chk.Count() > 0)
|
||||
@*@if (files2Chk != null && files2Chk.Count() > 0)
|
||||
{
|
||||
<button class="btn btn-info">Scan again</button>
|
||||
}
|
||||
<button class="btn btn-info">Scan again</button>
|
||||
}*@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if (files2Chk != null && files2Chk.Count() > 0)
|
||||
@if (isLoading)
|
||||
{
|
||||
|
||||
<ProgressDisplay RefreshInterval="100" Title="@titleMsg" MaxVal="@maxVal" CurrVal="@currVal" NextVal="@nextVal" ExpTimeMSec="@expTimeMSec" DisplaySize="ProgressDisplay.ModalSize.Medium" ModalCss="card alert-primary" SlowLimit="0.4"></ProgressDisplay>
|
||||
}
|
||||
else if (files2Chk != null && files2Chk.Count() > 0)
|
||||
{
|
||||
<table class="table table-striped" style="min-height: 50rem;">
|
||||
<thead>
|
||||
@@ -116,4 +121,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,8 +10,46 @@ namespace WebDoorCreator.UI.Components.FilesMan
|
||||
{
|
||||
protected List<DoorOpTypeModel> tempDOT = new List<DoorOpTypeModel>();
|
||||
|
||||
protected double expTime { get; set; } = 6;
|
||||
protected int numSteps { get; set; } = 4;
|
||||
private Dictionary<string, FileDTO> files2Chk = new Dictionary<string, FileDTO>();
|
||||
private int currVal = 100;
|
||||
private int expTimeMSec = 10000;
|
||||
private int maxVal = 100;
|
||||
private int nextVal = 100;
|
||||
private Random rnd = new Random();
|
||||
private string titleMsg = "Scanning directories";
|
||||
|
||||
protected async Task StartLongTimer()
|
||||
{
|
||||
double stdWait = expTime / numSteps;
|
||||
int nextWait = 1000;
|
||||
int stepVal = maxVal / numSteps;
|
||||
// imposto i valori x progress..
|
||||
maxVal = 100;
|
||||
expTimeMSec = (int)(stdWait * 1000);
|
||||
//nextVal = stepVal;
|
||||
//currVal = 0;
|
||||
for (int currStep = 1; currStep <= numSteps; currStep++)
|
||||
{
|
||||
// aggiorno valori
|
||||
currVal = (currStep - 1) * stepVal;
|
||||
nextVal = currStep * stepVal;
|
||||
// se max mi fermo...
|
||||
if (nextVal > maxVal)
|
||||
{
|
||||
nextVal = maxVal;
|
||||
}
|
||||
await InvokeAsync(StateHasChanged);
|
||||
// simulo ritardo importante (da 2 a 3 volte
|
||||
nextWait = (int)(rnd.Next(2000, 3000) * stdWait);
|
||||
// attendo step successivi...
|
||||
await Task.Delay(nextWait);
|
||||
}
|
||||
await Task.Delay(1);
|
||||
currVal = maxVal;
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
[Inject]
|
||||
protected IConfiguration configuration { get; set; } = null!;
|
||||
|
||||
@@ -20,6 +58,7 @@ namespace WebDoorCreator.UI.Components.FilesMan
|
||||
|
||||
protected string txt1 { get; set; } = "";
|
||||
protected string txt2 { get; set; } = "";
|
||||
protected bool isLoading { get; set; } = false;
|
||||
|
||||
private string rootPathNew
|
||||
{
|
||||
@@ -102,8 +141,10 @@ namespace WebDoorCreator.UI.Components.FilesMan
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task scanB()
|
||||
protected async Task doScan()
|
||||
{
|
||||
isLoading = true;
|
||||
await StartLongTimer();
|
||||
files2Chk = new Dictionary<string, FileDTO>();
|
||||
tempDOT.Clear();
|
||||
await WDCService.populateHws();
|
||||
@@ -137,6 +178,7 @@ namespace WebDoorCreator.UI.Components.FilesMan
|
||||
}
|
||||
|
||||
files2Chk = files2Chk.Where(x => x.Value.status > 0).ToDictionary(x => x.Key, x => x.Value);
|
||||
isLoading = false;
|
||||
}
|
||||
protected async Task changeDoAct(KeyValuePair<string, FileDTO> currObj)
|
||||
{
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>0.9.2308.3116</Version>
|
||||
<Version>0.9.2308.3117</Version>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UserSecretsId>aspnet-WebDoorCreator.UI-dfe95fed-1398-4144-bd43-8b3a765d6608</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
@@ -38,7 +38,7 @@
|
||||
<PackageReference Include="Blazored.LocalStorage" Version="4.3.0" />
|
||||
<PackageReference Include="Blazored.SessionStorage" Version="2.3.0" />
|
||||
<PackageReference Include="DiffMatchPatch" Version="1.0.3" />
|
||||
<PackageReference Include="EgwCoreLib.Razor" Version="1.4.2307.3111" />
|
||||
<PackageReference Include="EgwCoreLib.Razor" Version="1.4.2308.216" />
|
||||
<PackageReference Include="EgwCoreLib.Utils" Version="1.4.2307.3111" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.14" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.14" />
|
||||
|
||||
Reference in New Issue
Block a user