From c3d1abb6672fe93cdb9fa327a6af5b089be53fb2 Mon Sep 17 00:00:00 2001
From: lhhxxxxx <91231470+lhhxxxxx@users.noreply.github.com>
Date: Thu, 10 Nov 2022 22:10:48 +0800
Subject: [PATCH] =?UTF-8?q?feat.=20=E5=A2=9E=E5=8A=A0=E5=A7=8B=E7=BB=88?=
=?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=A3=80=E6=B5=8B=E8=BF=9E=E6=8E=A5=E9=80=89?=
=?UTF-8?q?=E9=A1=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/MeoAsstGui/Helper/AsstProxy.cs | 5 +++-
.../Resources/Localizations/zh-cn.xaml | 3 +-
.../ConnectSettingsUserControl.xaml | 30 +++++++++++++------
.../ViewModels/SettingsViewModel.cs | 12 ++++++++
4 files changed, 39 insertions(+), 11 deletions(-)
diff --git a/src/MeoAsstGui/Helper/AsstProxy.cs b/src/MeoAsstGui/Helper/AsstProxy.cs
index 770c222a8d..9a89bf4ba7 100644
--- a/src/MeoAsstGui/Helper/AsstProxy.cs
+++ b/src/MeoAsstGui/Helper/AsstProxy.cs
@@ -1064,7 +1064,10 @@ namespace MeoAsstGui
if (ret)
{
- settings.AutoDetectConnection = false;
+ if (!settings.AlwaysAutoDetectConnection)
+ {
+ settings.AutoDetectConnection = false;
+ }
}
else
{
diff --git a/src/MeoAsstGui/Resources/Localizations/zh-cn.xaml b/src/MeoAsstGui/Resources/Localizations/zh-cn.xaml
index 6d81c7e9b3..ab49e48c8c 100644
--- a/src/MeoAsstGui/Resources/Localizations/zh-cn.xaml
+++ b/src/MeoAsstGui/Resources/Localizations/zh-cn.xaml
@@ -206,7 +206,8 @@
(测试功能)支持大部分主线关卡名与原列表的关卡名(如4-10、AP-5)
自动检测连接
- 每次检测完成后会自动取消勾选,若需要重新检测可再次勾选
+ 每次检测完成后会自动取消勾选,若需要重新检测可再次勾选,若反复连接失败可勾选始终自动检测连接
+ 始终自动检测连接
adb 路径 (相对/绝对)
连接地址
若遇到问题可尝试手动修改
diff --git a/src/MeoAsstGui/UserControl/ConnectSettingsUserControl.xaml b/src/MeoAsstGui/UserControl/ConnectSettingsUserControl.xaml
index 99f64e66e2..ce63a7fc71 100644
--- a/src/MeoAsstGui/UserControl/ConnectSettingsUserControl.xaml
+++ b/src/MeoAsstGui/UserControl/ConnectSettingsUserControl.xaml
@@ -24,6 +24,7 @@
+
-
+
_alwaysAutoDetectConnection;
+ set
+ {
+ SetAndNotify(ref _alwaysAutoDetectConnection, value);
+ ViewStatusStorage.Set("Connect.AlwaysAutoDetect", value.ToString());
+ }
+ }
+
private string _connectAddress = ViewStatusStorage.Get("Connect.Address", string.Empty);
///