diff --git a/Tornado3_2026Election/Common/AsyncRelayCommand.cs b/Tornado3_2026Election/Common/AsyncRelayCommand.cs index d2a5c92..502bdd4 100644 --- a/Tornado3_2026Election/Common/AsyncRelayCommand.cs +++ b/Tornado3_2026Election/Common/AsyncRelayCommand.cs @@ -8,12 +8,17 @@ public sealed class AsyncRelayCommand : ObservableObject, ICommand { private readonly Func _execute; private readonly Func? _canExecute; + private readonly bool _allowConcurrentExecutions; private bool _isRunning; - public AsyncRelayCommand(Func execute, Func? canExecute = null) + public AsyncRelayCommand( + Func execute, + Func? canExecute = null, + bool allowConcurrentExecutions = false) { _execute = execute; _canExecute = canExecute; + _allowConcurrentExecutions = allowConcurrentExecutions; } public event EventHandler? CanExecuteChanged; @@ -30,7 +35,9 @@ public sealed class AsyncRelayCommand : ObservableObject, ICommand } } - public bool CanExecute(object? parameter) => !IsRunning && (_canExecute?.Invoke() ?? true); + public bool CanExecute(object? parameter) => + (_allowConcurrentExecutions || !IsRunning) && + (_canExecute?.Invoke() ?? true); public async void Execute(object? parameter) { diff --git a/Tornado3_2026Election/Controls/ChannelSchedulePanel.xaml b/Tornado3_2026Election/Controls/ChannelSchedulePanel.xaml index c49dfed..518366c 100644 --- a/Tornado3_2026Election/Controls/ChannelSchedulePanel.xaml +++ b/Tornado3_2026Election/Controls/ChannelSchedulePanel.xaml @@ -163,10 +163,15 @@ + + + + + - + @@ -174,36 +179,110 @@ + + + + - - - + HorizontalAlignment="Right" + Orientation="Horizontal" + Spacing="8"> + + +