From 0b073ed84f7f63f50e83c1d0764d848b512797db Mon Sep 17 00:00:00 2001 From: status102 <102887808+status102@users.noreply.github.com> Date: Mon, 19 Jan 2026 12:07:17 +0800 Subject: [PATCH] chore: style --- .../FightSettingsUserControlModel.cs | 49 +++++++------------ 1 file changed, 17 insertions(+), 32 deletions(-) diff --git a/src/MaaWpfGui/ViewModels/UserControl/TaskQueue/FightSettingsUserControlModel.cs b/src/MaaWpfGui/ViewModels/UserControl/TaskQueue/FightSettingsUserControlModel.cs index 7eb28a0714..a078306564 100644 --- a/src/MaaWpfGui/ViewModels/UserControl/TaskQueue/FightSettingsUserControlModel.cs +++ b/src/MaaWpfGui/ViewModels/UserControl/TaskQueue/FightSettingsUserControlModel.cs @@ -635,20 +635,21 @@ public class FightSettingsUserControlModel : TaskSettingsViewModel public override void RefreshUI(BaseTask baseTask) { - if (baseTask is FightTask fight) + if (baseTask is not FightTask fight) { - IsRefreshingUI = true; - if (!UseAlternateStage && fight.StagePlan.Count == 0) - { - fight.StagePlan.Add(string.Empty); - } - InitDrops(); - UpdateStageList(); // 临时修复, 应为同步 - RefreshCurrentStagePlan(); - RefreshWeeklySchedule(); - Refresh(); - IsRefreshingUI = false; + return; } + IsRefreshingUI = true; + if (!UseAlternateStage && fight.StagePlan.Count == 0) + { + fight.StagePlan.Add(string.Empty); + } + InitDrops(); + UpdateStageList(); // 临时修复, 应为同步 + RefreshCurrentStagePlan(); + RefreshWeeklySchedule(); + Refresh(); + IsRefreshingUI = false; } [Obsolete("使用SerializeTask作为代替")] @@ -886,11 +887,7 @@ public class FightSettingsUserControlModel : TaskSettingsViewModel public DayOfWeek DayOfWeek { get; } = dayOfWeek; - public bool Value - { - get => field; - set => SetAndNotify(ref field, value); - } = true; + public bool Value { get => field; set => SetAndNotify(ref field, value); } = true; } public class StageSourceItem : PropertyChangedBase @@ -899,17 +896,9 @@ public class FightSettingsUserControlModel : TaskSettingsViewModel public string Value { get; set; } = string.Empty; - public bool IsOpen - { - get => field; - set => SetAndNotify(ref field, value); - } = true; + public bool IsOpen { get => field; set => SetAndNotify(ref field, value); } = true; - public bool IsVisible - { - get => field; - set => SetAndNotify(ref field, value); - } = true; + public bool IsVisible { get => field; set => SetAndNotify(ref field, value); } = true; } public class StagePlanItem : PropertyChangedBase @@ -937,10 +926,6 @@ public class FightSettingsUserControlModel : TaskSettingsViewModel } } = string.Empty; - public bool IsOpen - { - get => field; - set => SetAndNotify(ref field, value); - } = true; + public bool IsOpen { get => field; set => SetAndNotify(ref field, value); } = true; } }