From 581e4649d574526b88ee86e7c4aa9df16b7d355e Mon Sep 17 00:00:00 2001 From: uye <99072975+ABA2396@users.noreply.github.com> Date: Mon, 30 Dec 2024 13:21:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20`=E6=89=8B=E5=8A=A8=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E5=85=B3=E5=8D=A1=E5=90=8D`=20=E4=B8=8E=20=20`=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=89=A9=E4=BD=99=E7=90=86=E6=99=BA`=20=E9=80=89?= =?UTF-8?q?=E9=A1=B9=E6=97=A0=E6=B3=95=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TaskQueue/FightSettingsUserControlModel.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/MaaWpfGui/ViewModels/UserControl/TaskQueue/FightSettingsUserControlModel.cs b/src/MaaWpfGui/ViewModels/UserControl/TaskQueue/FightSettingsUserControlModel.cs index 74d7494668..5b801a672a 100644 --- a/src/MaaWpfGui/ViewModels/UserControl/TaskQueue/FightSettingsUserControlModel.cs +++ b/src/MaaWpfGui/ViewModels/UserControl/TaskQueue/FightSettingsUserControlModel.cs @@ -206,7 +206,11 @@ public class FightSettingsUserControlModel : PropertyChangedBase public bool UseRemainingSanityStage { get => _useRemainingSanityStage; - set => SetAndNotify(ref _useRemainingSanityStage, value); + set + { + SetAndNotify(ref _useRemainingSanityStage, value); + ConfigurationHelper.SetValue(ConfigurationKeys.UseRemainingSanityStage, value.ToString()); + } } private bool _customStageCode = Convert.ToBoolean(ConfigurationHelper.GetValue(ConfigurationKeys.CustomStageCode, bool.FalseString)); @@ -217,7 +221,11 @@ public class FightSettingsUserControlModel : PropertyChangedBase public bool CustomStageCode { get => _customStageCode; - set => SetAndNotify(ref _customStageCode, value); + set + { + SetAndNotify(ref _customStageCode, value); + ConfigurationHelper.SetValue(ConfigurationKeys.CustomStageCode, value.ToString()); + } } private string _remainingSanityStage = ConfigurationHelper.GetValue(ConfigurationKeys.RemainingSanityStage, string.Empty) ?? string.Empty;