File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 24
24
using System . Windows . Data ;
25
25
using ModernWpf . Controls ;
26
26
using Key = System . Windows . Input . Key ;
27
+ using System . Media ;
27
28
28
29
namespace Flow . Launcher
29
30
{
@@ -37,8 +38,8 @@ public partial class MainWindow
37
38
private NotifyIcon _notifyIcon ;
38
39
private ContextMenu contextMenu ;
39
40
private MainViewModel _viewModel ;
40
- private readonly MediaPlayer animationSound = new ( ) ;
41
41
private bool _animating ;
42
+ SoundPlayer animationSound = new SoundPlayer ( AppDomain . CurrentDomain . BaseDirectory + "Resources\\ open.wav" ) ;
42
43
43
44
#endregion
44
45
@@ -49,8 +50,7 @@ public MainWindow(Settings settings, MainViewModel mainVM)
49
50
_settings = settings ;
50
51
51
52
InitializeComponent ( ) ;
52
- InitializePosition ( ) ;
53
- animationSound . Open ( new Uri ( AppDomain . CurrentDomain . BaseDirectory + "Resources\\ open.wav" ) ) ;
53
+ InitializePosition ( ) ;
54
54
}
55
55
56
56
public MainWindow ( )
@@ -114,7 +114,6 @@ private void OnLoaded(object sender, RoutedEventArgs _)
114
114
{
115
115
if ( _settings . UseSound )
116
116
{
117
- animationSound . Position = TimeSpan . Zero ;
118
117
animationSound . Play ( ) ;
119
118
}
120
119
UpdatePosition ( ) ;
You can’t perform that action at this time.
0 commit comments