From 62ab25e6fe417640d60fa5a729c477b2f13c2065 Mon Sep 17 00:00:00 2001 From: liufumingren Date: Sat, 17 Oct 2026 18:23:55 +0800 Subject: [PATCH] =?UTF-8?q?feat(desktop):=20=E4=B8=BB=E7=95=8C=E9=9D=A2/?= =?UTF-8?q?=E6=89=98=E7=9B=98=E4=B8=8D=E5=86=8D=E6=98=BE=E7=A4=BA=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E5=9C=B0=E5=9D=80=E4=B8=8E=E8=BF=90=E8=A1=8C=E7=8A=B6?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 主界面移除整行「● 本机服务 运行中 · http://…」,顶部只留「已登录:xxx / 退出登录」 - UpdateServerState 只刷新菜单「服务 → 服务状态」,不再碰界面控件 - 托盘菜单的状态项改成固定的「本机服务」(原来是「服务:<地址>」), UpdateStatus 只传「运行中 / 未启动」;TrayIconService 构造不再需要 serverUrl - 运行状态统一在菜单里看,界面不再重复展示内部实现细节 --- desktop/App.xaml.cs | 6 +++--- desktop/MainWindow.xaml | 21 ++++++--------------- desktop/MainWindow.xaml.cs | 14 +++++--------- desktop/Services/TrayIconService.cs | 5 +++-- 4 files changed, 17 insertions(+), 29 deletions(-) diff --git a/desktop/App.xaml.cs b/desktop/App.xaml.cs index 6ff9475..af9e888 100644 --- a/desktop/App.xaml.cs +++ b/desktop/App.xaml.cs @@ -69,7 +69,7 @@ public partial class App : Application // ③ 托盘 var version = GetType().Assembly.GetName().Version?.ToString() ?? "1.0.0"; - _tray = new TrayIconService(_server.BaseUrl, version); + _tray = new TrayIconService(version); _tray.ShowRequested += ShowAppWindow; _tray.RestartRequested += RestartApplication; _tray.ExitRequested += ExitApplication; @@ -316,7 +316,7 @@ public partial class App : Application _trayHintShown = true; _tray?.ShowBalloon("云仓视频溯源软件仍在运行", - $"本机服务在 {_server?.BaseUrl} 继续提供,双击托盘图标可重新打开窗口。"); + "本机服务继续在后台运行,双击托盘图标可重新打开窗口。"); } /// @@ -382,7 +382,7 @@ public partial class App : Application private void UpdateTrayStatus() { - _tray?.UpdateStatus(_server?.IsRunning == true ? $"运行中 · {_server.BaseUrl}" : "本机服务未启动"); + _tray?.UpdateStatus(_server?.IsRunning == true ? "运行中" : "未启动"); } // ---------------- 单实例 / 退出 ---------------- diff --git a/desktop/MainWindow.xaml b/desktop/MainWindow.xaml index 18050d8..661d6da 100644 --- a/desktop/MainWindow.xaml +++ b/desktop/MainWindow.xaml @@ -45,21 +45,12 @@ - - - - -