Beispiel #1
0
 private void TryBindHotKeys()
 {
     OverallKeyHook.AddKeyHook(HotKeyType.TogglePlay, () => _controller.PlayList.CurrentInfo?.TogglePlayHandle());
     OverallKeyHook.AddKeyHook(HotKeyType.PrevSong, async() => await _controller.PlayPrevAsync());
     OverallKeyHook.AddKeyHook(HotKeyType.NextSong, async() => await _controller.PlayNextAsync());
     OverallKeyHook.AddKeyHook(HotKeyType.VolumeUp, () =>
     {
         AppSettings.Default.Volume.Main += 0.05f;
         AppSettings.SaveDefault();
     });
     OverallKeyHook.AddKeyHook(HotKeyType.VolumeDown, () =>
     {
         AppSettings.Default.Volume.Main -= 0.05f;
         AppSettings.SaveDefault();
     });
     OverallKeyHook.AddKeyHook(HotKeyType.SwitchFullMiniMode, () => { TriggerMiniWindow(); });
     OverallKeyHook.AddKeyHook(HotKeyType.AddCurrentToFav, () =>
     {
         //TODO
     });
     OverallKeyHook.AddKeyHook(HotKeyType.SwitchLyricWindow, () =>
     {
         if (LyricWindow.IsShown)
         {
             LyricWindow.Hide();
         }
         else
         {
             LyricWindow.Show();
         }
     });
 }
Beispiel #2
0
 private async void BtnNext_Click(object sender, RoutedEventArgs e)
 {
     await _controller.PlayNextAsync();
 }