From 597a94cce42dba0c224d4366b29a351d915694c9 Mon Sep 17 00:00:00 2001 From: DB p Date: Sun, 5 Mar 2023 00:43:43 +0900 Subject: [PATCH 1/2] Code changes related to sound playback (changing the media player to a sound player) --- Flow.Launcher/MainWindow.xaml.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs index 550648b24..2031bf3d8 100644 --- a/Flow.Launcher/MainWindow.xaml.cs +++ b/Flow.Launcher/MainWindow.xaml.cs @@ -24,6 +24,7 @@ using System.Windows.Threading; using System.Windows.Data; using ModernWpf.Controls; using Key = System.Windows.Input.Key; +using System.Media; namespace Flow.Launcher { @@ -37,8 +38,8 @@ namespace Flow.Launcher private NotifyIcon _notifyIcon; private ContextMenu contextMenu; private MainViewModel _viewModel; - private readonly MediaPlayer animationSound = new(); private bool _animating; + SoundPlayer animationSound = new SoundPlayer(AppDomain.CurrentDomain.BaseDirectory + "Resources\\open.wav"); #endregion @@ -49,8 +50,7 @@ namespace Flow.Launcher _settings = settings; InitializeComponent(); - InitializePosition(); - animationSound.Open(new Uri(AppDomain.CurrentDomain.BaseDirectory + "Resources\\open.wav")); + InitializePosition(); } public MainWindow() @@ -114,7 +114,6 @@ namespace Flow.Launcher { if (_settings.UseSound) { - animationSound.Position = TimeSpan.Zero; animationSound.Play(); } UpdatePosition(); From 805af30cde54d557c22cfa894095c031ee130e76 Mon Sep 17 00:00:00 2001 From: DB p Date: Mon, 13 Mar 2023 16:05:00 +0900 Subject: [PATCH 2/2] Fix Wrong Version Check --- Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs b/Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs index 622e41b1b..bc98efabc 100644 --- a/Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs +++ b/Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs @@ -26,13 +26,19 @@ namespace Flow.Launcher.ViewModel public string IcoPath => _plugin.IcoPath; public bool LabelInstalled => PluginManager.GetPluginForId(_plugin.ID) != null; - public bool LabelUpdate => LabelInstalled && _plugin.Version != PluginManager.GetPluginForId(_plugin.ID).Metadata.Version; + public bool LabelUpdate => LabelInstalled && VersionConvertor(_plugin.Version) > VersionConvertor(PluginManager.GetPluginForId(_plugin.ID).Metadata.Version); internal const string None = "None"; internal const string RecentlyUpdated = "RecentlyUpdated"; internal const string NewRelease = "NewRelease"; internal const string Installed = "Installed"; + public Version VersionConvertor(string version) + { + Version ResultVersion = new Version(version); + return ResultVersion; + } + public string Category { get