mirror of
https://github.com/4sval/FModel.git
synced 2026-05-09 12:42:38 -05:00
Add 'X' hotkey for removing selected audio from the playlist
This commit is contained in:
parent
749790b1de
commit
cbc580ce37
|
|
@ -363,6 +363,13 @@ namespace FModel.Settings
|
|||
set => SetProperty(ref _addAudio, value);
|
||||
}
|
||||
|
||||
private Hotkey _removeAudio = new(Key.X);
|
||||
public Hotkey RemoveAudio
|
||||
{
|
||||
get => _removeAudio;
|
||||
set => SetProperty(ref _removeAudio, value);
|
||||
}
|
||||
|
||||
private Hotkey _playPauseAudio = new(Key.K);
|
||||
public Hotkey PlayPauseAudio
|
||||
{
|
||||
|
|
|
|||
|
|
@ -75,6 +75,8 @@ public partial class AudioPlayer
|
|||
_applicationView.AudioPlayer.Previous();
|
||||
else if (UserSettings.Default.NextAudio.IsTriggered(e.Key))
|
||||
_applicationView.AudioPlayer.Next();
|
||||
else if (UserSettings.Default.RemoveAudio.IsTriggered(e.Key))
|
||||
_applicationView.AudioPlayer.Remove();
|
||||
}
|
||||
|
||||
private void OnAudioFileMouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
|
|
|
|||
|
|
@ -602,6 +602,9 @@
|
|||
<TextBlock Grid.Row="12" Grid.Column="0" Text="Next Audio" VerticalAlignment="Center" Margin="0 0 0 5" />
|
||||
<controls:HotkeyTextBox Grid.Row="12" Grid.Column="2" Style="{StaticResource TextBoxDefaultStyle}" Margin="0 0 0 5"
|
||||
HotKey="{Binding NextAudio, Source={x:Static local:Settings.UserSettings.Default}, Mode=TwoWay}" />
|
||||
<TextBlock Grid.Row="12" Grid.Column="0" Text="Remove Selected Audio" VerticalAlignment="Center" Margin="0 0 0 5" />
|
||||
<controls:HotkeyTextBox Grid.Row="12" Grid.Column="2" Style="{StaticResource TextBoxDefaultStyle}" Margin="0 0 0 5"
|
||||
HotKey="{Binding RemoveAudio, Source={x:Static local:Settings.UserSettings.Default}, Mode=TwoWay}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user