53 lines
1.4 KiB
C#
53 lines
1.4 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
using WebDoorCreator.Data.Services;
|
|
using WebDoorCreator.UI.Data;
|
|
|
|
namespace WebDoorCreator.UI.Pages
|
|
{
|
|
public partial class ForceReload
|
|
{
|
|
#region Protected Properties
|
|
|
|
[Inject]
|
|
protected NavigationManager NavManager { get; set; } = null!;
|
|
|
|
[Inject]
|
|
protected WDCVocabularyService WDCVService { get; set; } = null!;
|
|
|
|
[Inject]
|
|
protected WebDoorCreatorService WDService { get; set; } = null!;
|
|
|
|
#endregion Protected Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
currVal = 0;
|
|
nextVal = 1;
|
|
await Task.Delay(100);
|
|
currVal++;
|
|
nextVal++;
|
|
await WDService.FlushCustomPattern("Cache");
|
|
currVal++;
|
|
nextVal++;
|
|
await Task.Delay(200);
|
|
currVal++;
|
|
nextVal++;
|
|
await WDCVService.ReloadVoc();
|
|
currVal++;
|
|
nextVal++;
|
|
await Task.Delay(200);
|
|
currVal++;
|
|
nextVal++;
|
|
NavManager.NavigateTo("OrdersHomePage", true);
|
|
}
|
|
|
|
private int currVal = 0;
|
|
private int nextVal = 1;
|
|
private int maxVal = 6;
|
|
private string titleMsg = "Clearing cache...";
|
|
|
|
#endregion Protected Methods
|
|
}
|
|
} |