update e refresh
This commit is contained in:
@@ -15,7 +15,7 @@ namespace MP.Stats.Components
|
||||
|
||||
protected bool _showLoading = false;
|
||||
|
||||
protected string exportDir = $"{Directory.GetCurrentDirectory()}/temp";
|
||||
protected string exportDir = $"{Directory.GetCurrentDirectory()}\\temp";
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
@@ -72,9 +72,6 @@ namespace MP.Stats.Components
|
||||
}
|
||||
}
|
||||
|
||||
[Inject]
|
||||
private Services.BlazorTimer Timer { get; set; }
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Protected Properties
|
||||
@@ -93,7 +90,7 @@ namespace MP.Stats.Components
|
||||
|
||||
protected string fullPath
|
||||
{
|
||||
get => $"{exportDir}/{fileName}";
|
||||
get => $"{exportDir}\\{fileName}";
|
||||
}
|
||||
|
||||
protected int percLoading { get; set; } = 0;
|
||||
@@ -206,11 +203,14 @@ namespace MP.Stats.Components
|
||||
currPage = int.Parse(page);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#if false
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await Task.Run(() => showLoading = false);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<RootNamespace>MP.Stats</RootNamespace>
|
||||
<UserSecretsId>826e877c-ba70-4253-84cb-d0b1cafd4440</UserSecretsId>
|
||||
<Version>6.14.2109.3015</Version>
|
||||
<Version>6.14.2109.3018</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo statistiche MAPO</i>
|
||||
<h4>Versione: 6.14.2109.3015</h4>
|
||||
<h4>Versione: 6.14.2109.3018</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.14.2109.3015
|
||||
6.14.2109.3018
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.14.2109.3015</version>
|
||||
<version>6.14.2109.3018</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/MP.Stats.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Timers;
|
||||
|
||||
namespace MP.Stats.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Timer a consumo
|
||||
/// https://wellsb.com/csharp/aspnet/blazor-timer-navigate-programmatically/
|
||||
/// (da verificare)
|
||||
/// </summary>
|
||||
public class BlazorTimer
|
||||
{
|
||||
#region Private Fields
|
||||
|
||||
private Timer _timer;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Public Events
|
||||
|
||||
public event Action OnElapsed;
|
||||
|
||||
#endregion Public Events
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void NotifyTimerElapsed(Object source, ElapsedEventArgs e)
|
||||
{
|
||||
OnElapsed?.Invoke();
|
||||
_timer.Dispose();
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public void SetTimer(double interval)
|
||||
{
|
||||
_timer = new Timer(interval);
|
||||
_timer.Elapsed += NotifyTimerElapsed;
|
||||
_timer.Enabled = true;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
@@ -105,7 +105,6 @@ namespace MP.Stats
|
||||
services.AddRazorPages();
|
||||
services.AddServerSideBlazor();
|
||||
services.AddSingleton<IConfiguration>(Configuration);
|
||||
services.AddTransient<Services.BlazorTimer>();
|
||||
|
||||
services.AddSingleton<MpStatsService>();
|
||||
services.AddScoped<MessageService>();
|
||||
|
||||
Reference in New Issue
Block a user