From d1b72117058f1131046b6aa3add8e3ccfae033d8 Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 09 十一月 2026 10:36:07 +0800
Subject: [PATCH] docs: CAN 模拟器独立 TCP 服务进程设计规格(统一 CanDeviceDriver + 双工推送协议)
---
HMI.UI/MaskWindow.xaml.cs | 22 +++++++++++++++++++---
1 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/HMI.UI/MaskWindow.xaml.cs b/HMI.UI/MaskWindow.xaml.cs
index f5d1231..0298727 100644
--- a/HMI.UI/MaskWindow.xaml.cs
+++ b/HMI.UI/MaskWindow.xaml.cs
@@ -42,11 +42,27 @@
private void MaskWindow_ContentRendered(object sender, EventArgs e)
{
+ //Dispatcher.InvokeAsync(new Action(() =>
+ //{
+ // 鏆傚仠绾跨▼浠I瀹屽叏灞曠ず
+ // if (delay > 0) Thread.Sleep(delay);
+ // action(this);
+ //}));
Task.Run(() =>
{
- // 鏆傚仠绾跨▼浠I瀹屽叏灞曠ず
- if (delay > 0) Thread.Sleep(delay);
- action(this);
+ try
+ {
+ // 鏆傚仠绾跨▼浠I瀹屽叏灞曠ず
+ if (delay > 0) Thread.Sleep(delay);
+ action(this);
+ }
+ finally
+ {
+ Dispatcher.Invoke(() =>
+ {
+ this.Close();
+ });
+ }
});
}
--
Gitblit v1.9.1