From 960163dad8f11d7703ee15a4a88ea4c96a497e0b Mon Sep 17 00:00:00 2001 From: y2keui Date: Tue, 5 May 2026 00:50:11 +0900 Subject: [PATCH] =?UTF-8?q?=EC=96=B4=EB=A6=B0=EC=9D=B4=EB=82=A0=20?= =?UTF-8?q?=EA=B8=B0=EB=85=90=20=EC=BB=A4=EB=B0=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/AsyncRelayCommand.cs | 11 +- .../Controls/ChannelSchedulePanel.xaml | 218 ++- .../Controls/ChannelSchedulePanel.xaml.cs | 22 + .../Domain/CandidateEntry.cs | 20 + .../Domain/ChannelScheduleItem.cs | 60 +- Tornado3_2026Election/Domain/CutCategory.cs | 15 + .../Domain/ElectionDataSnapshot.cs | 3 +- .../Domain/FormatCutDefinition.cs | 2 + .../Domain/ScheduleRegionScope.cs | 1 + Tornado3_2026Election/MainWindow.xaml | 204 ++- Tornado3_2026Election/Persistence/AppState.cs | 4 + .../Services/CareerPromiseService.cs | 51 +- .../Services/ChannelScheduleEngine.cs | 430 ++++-- .../Services/CutCategoryResolver.cs | 67 + .../Services/FormatCatalogService.cs | 43 +- .../Services/KarismaSceneResolver.cs | 22 +- .../Services/KarismaTornado3Adapter.cs | 767 +++++++++-- .../Services/PartyColorCatalog.cs | 28 +- .../Services/PreElectionHistoryService.cs | 166 ++- .../Services/SbsElectionApiClient.cs | 394 +++++- .../Services/ScheduleTemplatePolicy.cs | 9 +- .../ViewModels/ChannelScheduleViewModel.cs | 354 ++++- .../ViewModels/CloseRaceTargetViewModel.cs | 24 + .../ViewModels/CutListEntryViewModel.cs | 79 ++ .../ViewModels/DataViewModel.cs | 1180 +++++++++++++++-- .../DistrictOverviewCardViewModel.cs | 11 + .../ViewModels/MainViewModel.cs | 224 +++- tools/BuildPreElectionHistorySeed.ps1 | 67 +- .../CurrentApiCutDiagnostics.cs | 386 +++++- 29 files changed, 4399 insertions(+), 463 deletions(-) create mode 100644 Tornado3_2026Election/Domain/CutCategory.cs create mode 100644 Tornado3_2026Election/Services/CutCategoryResolver.cs create mode 100644 Tornado3_2026Election/ViewModels/CloseRaceTargetViewModel.cs 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"> + + +