diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index bc18d8dbc..4eac8f9b5 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -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() {