From 8ce0950ff48c04504094014e491f5dacaed3d312 Mon Sep 17 00:00:00 2001 From: uye <99072975+ABA2396@users.noreply.github.com> Date: Tue, 3 Sep 2024 01:00:04 +0800 Subject: [PATCH] fix: miss warning --- src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs index 5a720566c5..42eca77899 100755 --- a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs @@ -3295,6 +3295,22 @@ namespace MaaWpfGui.ViewModels.UI get => _allowUseStoneSave; set { + if (value) + { + var result = MessageBoxHelper.Show( + LocalizationHelper.GetString("AllowUseStoneSaveWarning"), + LocalizationHelper.GetString("Warning"), + MessageBoxButton.YesNo, + MessageBoxImage.Warning, + no: LocalizationHelper.GetString("Confirm"), + yes: LocalizationHelper.GetString("Cancel"), + iconBrushKey: "DangerBrush"); + if (result != MessageBoxResult.No) + { + return; + } + } + SetAndNotify(ref _allowUseStoneSave, value); ConfigurationHelper.SetValue(ConfigurationKeys.AllowUseStoneSave, value.ToString()); }