chore: fix build warning (#14120)

This commit is contained in:
soundofautumn
2025-09-15 23:00:34 +08:00
committed by GitHub
parent a9e31c75d0
commit 3ea9912802
3 changed files with 7 additions and 4 deletions

View File

@@ -197,8 +197,7 @@ namespace MaaWpfGui.Main
message.ToString(),
LocalizationHelper.GetString("ErrorCrashDialogTitle"),
MessageBoxButton.OK,
MessageBoxImage.Error
);
MessageBoxImage.Error);
try
{

View File

@@ -124,7 +124,8 @@ namespace MaaWpfGui.Models
AdvancedSettingsVisibility = true;
}
if (enable && !ret) // 如果切换到的不是当前运行任务
// 如果切换到的不是当前运行任务
if (enable && !ret)
{
IsCurrentTaskRunning = false;
}
@@ -164,7 +165,9 @@ namespace MaaWpfGui.Models
CheckTask("Roguelike", _roguelike);
CheckTask("Reclamation", _reclamation);
CheckTask("Custom", _custom);
if (!ret) // 如果没有匹配上任何任务
// 如果没有匹配上任何任务
if (!ret)
{
IsCurrentTaskRunning = false;
}

View File

@@ -41,6 +41,7 @@ namespace MaaWpfGui.Services
[DllImport("MaaCore.dll")]
public static extern unsafe bool AsstSetUserDir(byte* dirname);
[DllImport("MaaCore.dll")]
public static extern unsafe bool AsstLoadResource(byte* dirname);