From ad9e9e505d08589d9e05e02cd86645ddfd930d3e Mon Sep 17 00:00:00 2001 From: uye <2396806385@qq.com> Date: Thu, 22 Jun 2023 13:47:57 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=9C=A8=E8=BF=9E=E6=8E=A5=E5=89=8D?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=9B=BF=E6=8D=A2adb?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaWpfGui/Res/Localizations/en-us.xaml | 4 ++-- src/MaaWpfGui/Res/Localizations/zh-cn.xaml | 4 ++-- src/MaaWpfGui/Res/Localizations/zh-tw.xaml | 2 +- src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs | 8 ++++---- src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs | 10 ++++++---- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/MaaWpfGui/Res/Localizations/en-us.xaml b/src/MaaWpfGui/Res/Localizations/en-us.xaml index 31ce984b13..4875fa8c17 100644 --- a/src/MaaWpfGui/Res/Localizations/en-us.xaml +++ b/src/MaaWpfGui/Res/Localizations/en-us.xaml @@ -330,7 +330,7 @@ At the end of the level, enter "Normal/Hard" to switch between Standard and Adve Connecting to emulator... Unselected task Running... - If nothing happens or it gets stuck, please go to Settings → Connection → ADB path and change the ADB.exe, or turn on Compatibility Touch Mode (not recommended). + If nothing happens or it gets stuck, please go to Settings → Connection → ADB path and change the ADB.exe, or turn on ADB Input (Deprecated). Stopping... Has stopped Unknown error occurred @@ -579,4 +579,4 @@ The video aspect ratio needs to be 16:9 without interference factors such as bla MAA is running tasks Are you sure want to exit? - \ No newline at end of file + diff --git a/src/MaaWpfGui/Res/Localizations/zh-cn.xaml b/src/MaaWpfGui/Res/Localizations/zh-cn.xaml index 726677a684..407d22f370 100644 --- a/src/MaaWpfGui/Res/Localizations/zh-cn.xaml +++ b/src/MaaWpfGui/Res/Localizations/zh-cn.xaml @@ -330,7 +330,7 @@ 正在连接模拟器…… 未选择任务 正在运行中…… - 如果任务完全没有反应,请使用 设置 - 连接设置 - 强制替换 ADB,或打开 兼容性触控模式(不推荐)。 + 如果任务完全没有反应,请使用 设置 - 连接设置 - 强制替换 ADB,或触控模式选择 ADB Input(不推荐)。 正在停止…… 已停止 出现未知错误 @@ -579,4 +579,4 @@ MAA 正在运行任务 确定要退出吗? - \ No newline at end of file + diff --git a/src/MaaWpfGui/Res/Localizations/zh-tw.xaml b/src/MaaWpfGui/Res/Localizations/zh-tw.xaml index be3178a723..1c3c704576 100644 --- a/src/MaaWpfGui/Res/Localizations/zh-tw.xaml +++ b/src/MaaWpfGui/Res/Localizations/zh-tw.xaml @@ -325,7 +325,7 @@ 正在連接模擬器…… 未選擇任務 正在運行中…… - 如果任務完全沒有反應,請使用 設定 - 連接設定 - 強制替換 ADB,或打開 兼容性觸控模式(不推薦)。 + 如果任務完全沒有反應,請使用 設定 - 連接設定 - 強制替換 ADB,或觸控模式選擇 ADB Input(不推薦)。 正在停止…… 已停止 出現未知錯誤 diff --git a/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs b/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs index 7a280c9c48..af9751b741 100644 --- a/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/CopilotViewModel.cs @@ -463,6 +463,10 @@ namespace MaaWpfGui.ViewModels.UI } AddLog(LocalizationHelper.GetString("ConnectingToEmulator")); + if (!Instances.SettingsViewModel.AdbReplaced && !Instances.SettingsViewModel.IsAdbTouchMode()) + { + AddLog(LocalizationHelper.GetString("AdbReplacementTips"), UiLogColor.Info); + } string errMsg = string.Empty; _caught = await Task.Run(() => Instances.AsstProxy.AsstConnect(ref errMsg)); @@ -482,10 +486,6 @@ namespace MaaWpfGui.ViewModels.UI if (ret) { AddLog(LocalizationHelper.GetString("Running")); - if (!Instances.SettingsViewModel.AdbReplaced && !Instances.SettingsViewModel.IsAdbTouchMode()) - { - AddLog(LocalizationHelper.GetString("AdbReplacementTips"), UiLogColor.Info); - } } else { diff --git a/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs b/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs index ade51bda0d..20e9a0f583 100644 --- a/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs @@ -681,6 +681,10 @@ namespace MaaWpfGui.ViewModels.UI await Task.Run(() => Instances.SettingsViewModel.RunScript("StartsWithScript")); AddLog(LocalizationHelper.GetString("ConnectingToEmulator")); + if (!Instances.SettingsViewModel.AdbReplaced && !Instances.SettingsViewModel.IsAdbTouchMode()) + { + AddLog(LocalizationHelper.GetString("AdbReplacementTips"), UiLogColor.Info); + } string errMsg = string.Empty; bool connected = await Task.Run(() => Instances.AsstProxy.AsstConnect(ref errMsg)); @@ -692,6 +696,7 @@ namespace MaaWpfGui.ViewModels.UI return; } + // 尝试启动模拟器 if (!connected) { AddLog(LocalizationHelper.GetString("ConnectFailed") + "\n" + LocalizationHelper.GetString("TryToStartEmulator")); @@ -706,6 +711,7 @@ namespace MaaWpfGui.ViewModels.UI connected = await Task.Run(() => Instances.AsstProxy.AsstConnect(ref errMsg)); } + // 尝试重启adb if (!connected) { AddLog(LocalizationHelper.GetString("ConnectFailed") + "\n" + LocalizationHelper.GetString("RestartADB")); @@ -807,10 +813,6 @@ namespace MaaWpfGui.ViewModels.UI if (taskRet) { AddLog(LocalizationHelper.GetString("Running")); - if (!Instances.SettingsViewModel.AdbReplaced && !Instances.SettingsViewModel.IsAdbTouchMode()) - { - AddLog(LocalizationHelper.GetString("AdbReplacementTips"), UiLogColor.Info); - } } else {