feat: improve desktop path selection and USB connection recovery

This commit is contained in:
tongtong committed 2026-11-13 03:14:00 +08:00
1 parent 5aa575f182
commit 6490665af8
28 files changed
+846 -51

No files matched your search

+3 -2
View File
@@ -20,7 +20,7 @@ public partial class MainWindow : Window
Title = "选择客户端凭据 client.env", AllowMultiple = false,
FileTypeFilter = [new FilePickerFileType("环境配置文件") { Patterns = ["*.env"] }, FilePickerFileTypes.All]
});
if (files.FirstOrDefault()?.TryGetLocalPath() is { } path) vm.LoadCredentials(path);
if (files.FirstOrDefault()?.TryGetLocalPath() is { } path) { vm.LoadCredentials(path); vm.PersistSelectedPaths(); }
}
catch { vm.Notice = "无法打开凭据文件,请检查文件访问权限。"; }
}
@@ -36,8 +36,9 @@ public partial class MainWindow : Window
{
case "client": vm.ClientPath = path; break;
case "adb": vm.AdbPath = path; break;
case "scrcpy": vm.ScrcpyPath = path; break;
case "scrcpy": vm.ScrcpyPath = path; break; case "usbip": vm.UsbipPath = path; break;
}
vm.PersistSelectedPaths();
}
catch { vm.Notice = "无法选择工具,请检查文件访问权限。"; }
}