Adjust Clock Code

This commit is contained in:
DB p 2022-10-03 15:06:44 +09:00
parent cd79a2a0c5
commit 52cd8a8c33

View file

@ -22,6 +22,7 @@ using Flow.Launcher.Infrastructure.Hotkey;
using Flow.Launcher.Plugin.SharedCommands;
using System.Windows.Threading;
using System.Globalization;
using System.Reflection.Emit;
namespace Flow.Launcher
{
@ -47,11 +48,15 @@ namespace Flow.Launcher
_settings = settings;
DispatcherTimer timer = new DispatcherTimer();
timer.Interval = new TimeSpan(0, 0, 1);
timer.Tick += Timer_Tick;
var timer = new Timer
{
Interval = 1000,
};
timer.Tick += (s, evt) =>
{
ClockDisplay();
};
timer.Start();
InitializeComponent();
InitializePosition();
animationSound.Open(new Uri(AppDomain.CurrentDomain.BaseDirectory + "Resources\\open.wav"));
@ -61,10 +66,6 @@ namespace Flow.Launcher
{
InitializeComponent();
}
private void Timer_Tick(object sender, EventArgs e)
{
ClockDisplay();
}
public void ClockDisplay()
{