From ff5006063a8fe8e16ba588099257e79afa931e8c Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 6 Oct 2021 12:59:11 -0700 Subject: [PATCH] Expose shuffling to UI --- README.md | 5 +++++ RedBookPlayer.GUI/ViewModels/MainViewModel.cs | 8 ++++---- RedBookPlayer.GUI/ViewModels/SettingsViewModel.cs | 2 +- RedBookPlayer.GUI/Views/SettingsWindow.xaml | 8 ++++++++ 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7edfb9f..75cdedd 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ | **Page Down** | Previous Disc | | **→** | Next Track | | **←** | Previous Track | +| **R** | Shuffle Tracks | | **]** | Next Index | | **[** | Previous Index | | **.** | Fast Forward | @@ -36,6 +37,10 @@ For Save Track(s): For Disc Switching: - If you change the number of discs in the internal changer, you must restart the program for it to take effect +For Shuffling: +- Shuffling only works on the current set of playable tracks +- If you are in single disc mode and switch discs, it will not automatically shuffle the new tracks + For both Volume Up and Volume Down: - Holding **Ctrl** will move in increments of 2 - Holding **Shift** will move in increments of 5 diff --git a/RedBookPlayer.GUI/ViewModels/MainViewModel.cs b/RedBookPlayer.GUI/ViewModels/MainViewModel.cs index 17172c8..8537759 100644 --- a/RedBookPlayer.GUI/ViewModels/MainViewModel.cs +++ b/RedBookPlayer.GUI/ViewModels/MainViewModel.cs @@ -101,10 +101,10 @@ namespace RedBookPlayer.GUI.ViewModels } // Shuffle Track List - // else if(e.Key == App.Settings.ShuffleTracksKey) - // { - // PlayerView?.ViewModel?.ExecuteShuffle(); - // } + else if(e.Key == App.Settings.ShuffleTracksKey) + { + PlayerView?.ViewModel?.ExecuteShuffle(); + } // Next Index else if(e.Key == App.Settings.NextIndexKey) diff --git a/RedBookPlayer.GUI/ViewModels/SettingsViewModel.cs b/RedBookPlayer.GUI/ViewModels/SettingsViewModel.cs index 4754fb9..fad9566 100644 --- a/RedBookPlayer.GUI/ViewModels/SettingsViewModel.cs +++ b/RedBookPlayer.GUI/ViewModels/SettingsViewModel.cs @@ -183,7 +183,7 @@ namespace RedBookPlayer.GUI.ViewModels /// /// Key assigned to shuffling the track list /// - // public Key ShuffleTracksKey { get; set; } = Key.R; + public Key ShuffleTracksKey { get; set; } = Key.R; /// /// Key assigned to move to the next index diff --git a/RedBookPlayer.GUI/Views/SettingsWindow.xaml b/RedBookPlayer.GUI/Views/SettingsWindow.xaml index b348de8..de5fa6b 100644 --- a/RedBookPlayer.GUI/Views/SettingsWindow.xaml +++ b/RedBookPlayer.GUI/Views/SettingsWindow.xaml @@ -142,6 +142,14 @@ HorizontalAlignment="Right" Margin="8,0,0,0" Width="120"/> + + + Shuffle Tracks + + + Next Index