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