From e77ec8d5ff45d5de51b832cbb04a8714f953a08e Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 30 Sep 2021 16:21:01 +0200 Subject: [PATCH] tolto timers inutilizzato --- GWMS.UI/Services/BlazorTimer.cs | 49 --------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 GWMS.UI/Services/BlazorTimer.cs diff --git a/GWMS.UI/Services/BlazorTimer.cs b/GWMS.UI/Services/BlazorTimer.cs deleted file mode 100644 index e03f61c..0000000 --- a/GWMS.UI/Services/BlazorTimer.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using System.Timers; - -namespace GWMS.UI.Services -{ - /// - /// Timer a consumo - /// https://wellsb.com/csharp/aspnet/blazor-timer-navigate-programmatically/ - /// (da verificare) - /// - 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 - } -} \ No newline at end of file