diff --git a/GPW.CORE.SMART/Components/DtCard.razor b/GPW.CORE.SMART/Components/DtCard.razor
index 7c3e79d..003e817 100644
--- a/GPW.CORE.SMART/Components/DtCard.razor
+++ b/GPW.CORE.SMART/Components/DtCard.razor
@@ -3,7 +3,15 @@
@($"{dtCurr:dddd dd MMMM}")
-
@($"{dtCurr:HH}:{dtCurr:mm}")
+
+
+ @($"{dtCurr:HH}")
+
+
:
+
+ @($"{dtCurr:mm}")
+
+
@if (showAction)
{
diff --git a/GPW.CORE.SMART/Components/DtCard.razor.cs b/GPW.CORE.SMART/Components/DtCard.razor.cs
index 2cb5028..b1acb54 100644
--- a/GPW.CORE.SMART/Components/DtCard.razor.cs
+++ b/GPW.CORE.SMART/Components/DtCard.razor.cs
@@ -52,11 +52,13 @@ namespace GPW.CORE.Smart.Components
});
pUpd.Wait();
}
+
public void ElapsedTimerUi(object? source, System.Timers.ElapsedEventArgs e)
{
var pUpd = Task.Run(async () =>
{
dtCurr = DateTime.Now;
+ cssSec = (dtCurr.Second % 2 == 0) ? "text-light" : "text-dark";
await Task.Delay(1);
await InvokeAsync(() => StateHasChanged());
});
@@ -71,23 +73,34 @@ namespace GPW.CORE.Smart.Components
timbTimer.Enabled = true;
timbTimer.Start();
}
+
public void StartTimerUI()
{
// timer che scatta dopo 3sec
- uiTimer = new System.Timers.Timer(2000);
+ uiTimer = new System.Timers.Timer(1000);
uiTimer.Elapsed += ElapsedTimerUi;
uiTimer.Enabled = true;
uiTimer.AutoReset = true;
uiTimer.Start();
}
+ #endregion Public Methods
+
+ #region Protected Properties
+
+ protected string cssSec { get; set; } = "text-light";
+
+ #endregion Protected Properties
+
+ #region Protected Methods
+
protected override void OnInitialized()
{
base.OnInitialized();
StartTimerUI();
}
- #endregion Public Methods
+ #endregion Protected Methods
#region Private Fields