using System; using System.Diagnostics; namespace StandardScene.Utils { /// /// 车辆远程访问辅助工具。 /// public static class CarRemoteHelper { /// /// 使用系统默认浏览器打开车辆 Web 管理页面。 /// /// 车辆 IP 地址 /// Web 服务端口,默认 8081 public static void OpenVehicleWebPage(string ip, int port = 8081) { if (string.IsNullOrWhiteSpace(ip)) { return; } try { Process.Start(new ProcessStartInfo { FileName = $"http://{ip}:{port}", UseShellExecute = true }); } catch (Exception ex) { Console.WriteLine($"打开车辆 Web 页面失败: {ex.Message}"); } } } }