From 21dfc7f651208c1b2831ea7e359cc0c48db81605 Mon Sep 17 00:00:00 2001 From: liufumingren Date: Sat, 17 Oct 2026 18:10:28 +0800 Subject: [PATCH] =?UTF-8?q?feat(desktop):=20=E6=97=A5=E5=BF=97=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E8=90=BD=E6=96=87=E4=BB=B6=EF=BC=88=E8=BD=AF=E4=BB=B6?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=20logs\log=5F=E6=97=A5=E6=9C=9F.txt=EF=BC=89?= =?UTF-8?q?=EF=BC=8C=E7=95=8C=E9=9D=A2=E7=A7=BB=E9=99=A4=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - AppLog:不再做内存缓冲/事件,直接按天追加到 <软件目录>\logs\log_yyyy-MM-dd.txt 行格式 [yyyy-MM-dd HH:mm:ss] 内容;写失败一律吞掉,不影响主流程 装到只读目录(如 Program Files)时自动退回 %LOCALAPPDATA%\YuncangTrace\logs - 新增 AppLog.Clear():删除目录下全部 log_*.txt(当天文件也能删,之后重建) - MainWindow:删掉「运行日志」ListBox 与整套集合/订阅代码,Grid 行 4→3 查询卡改成 Grid(结果框自适应高度),窗口 620→460 - 菜单「工具」增加「打开日志目录」「清理日志」 - build.ps1 补 -p:AppEnvironment:原来 Release 发布时环境恒为 Production, 开发包日志/关于里也显示「生产环境」(现在与 -Environment 一致) - test-update.ps1:更新完成后轮询 60s 等服务与进程起来,避免误报「无响应」 --- desktop/MainWindow.xaml | 39 ++++------- desktop/MainWindow.xaml.cs | 67 +++++++++--------- desktop/README.md | 11 ++- desktop/Services/AppLog.cs | 110 ++++++++++++++++++++++++------ desktop/installer/build.ps1 | 1 + desktop/installer/test-update.ps1 | 13 +++- 6 files changed, 157 insertions(+), 84 deletions(-) diff --git a/desktop/MainWindow.xaml b/desktop/MainWindow.xaml index 83e9303..5abda5d 100644 --- a/desktop/MainWindow.xaml +++ b/desktop/MainWindow.xaml @@ -2,15 +2,14 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="云仓视频溯源软件(本机服务)" - Height="620" Width="780" - MinHeight="520" MinWidth="680" + Height="460" Width="780" + MinHeight="400" MinWidth="680" WindowStartupLocation="CenterScreen" Background="{StaticResource BgBrush}" FontFamily="Microsoft YaHei UI, Segoe UI" FontSize="13"> - @@ -21,6 +20,9 @@ + + + @@ -53,37 +55,26 @@ - + - - + BorderThickness="1" CornerRadius="8" Padding="12,10"> + + + + + +