From 12d1cf2ea6ae9ce7f1053bc3df6d5cf356959c7d Mon Sep 17 00:00:00 2001 From: uye <99072975+ABA2396@users.noreply.github.com> Date: Sun, 3 Mar 2024 03:05:35 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=8A=BD=E5=8D=A1=E9=A3=8E=E9=99=A9?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E9=BB=98=E8=AE=A4=E9=80=89=E6=8B=A9=E5=8F=96?= =?UTF-8?q?=E6=B6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewModels/UI/RecognizerViewModel.cs | 8 ++++---- src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/MaaWpfGui/ViewModels/UI/RecognizerViewModel.cs b/src/MaaWpfGui/ViewModels/UI/RecognizerViewModel.cs index 74f0c3b5e4..f63d8d6b8b 100644 --- a/src/MaaWpfGui/ViewModels/UI/RecognizerViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/RecognizerViewModel.cs @@ -866,12 +866,12 @@ namespace MaaWpfGui.ViewModels.UI var result = MessageBoxHelper.Show( LocalizationHelper.GetString("GachaWarning"), LocalizationHelper.GetString("Warning"), - MessageBoxButton.OKCancel, + MessageBoxButton.YesNo, MessageBoxImage.Warning, - ok: LocalizationHelper.GetString("Confirm"), - cancel: LocalizationHelper.GetString("Cancel"), + no: LocalizationHelper.GetString("Confirm"), + yes: LocalizationHelper.GetString("Cancel"), iconBrushKey: "DangerBrush"); - if (result == MessageBoxResult.Cancel) + if (result != MessageBoxResult.No) { return; } diff --git a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs index 479398d8e9..2341c6bf57 100644 --- a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs @@ -2367,14 +2367,14 @@ namespace MaaWpfGui.ViewModels.UI if (value) { var result = MessageBoxHelper.Show( - LocalizationHelper.GetString("GachaWarning"), - LocalizationHelper.GetString("Warning"), - MessageBoxButton.OKCancel, - MessageBoxImage.Warning, - ok: LocalizationHelper.GetString("Confirm"), - cancel: LocalizationHelper.GetString("Cancel"), - iconBrushKey: "DangerBrush"); - if (result == MessageBoxResult.Cancel) + LocalizationHelper.GetString("GachaWarning"), + LocalizationHelper.GetString("Warning"), + MessageBoxButton.YesNo, + MessageBoxImage.Warning, + no: LocalizationHelper.GetString("Confirm"), + yes: LocalizationHelper.GetString("Cancel"), + iconBrushKey: "DangerBrush"); + if (result != MessageBoxResult.No) { return; }