From 12e606635c42ea20f4b7c2bdda5204237a4b4c96 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期一, 02 三月 2026 16:14:49 +0800
Subject: [PATCH] 优化
---
HMI.UI/MaskWindow.xaml.cs | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/HMI.UI/MaskWindow.xaml.cs b/HMI.UI/MaskWindow.xaml.cs
index 56fd10e..0298727 100644
--- a/HMI.UI/MaskWindow.xaml.cs
+++ b/HMI.UI/MaskWindow.xaml.cs
@@ -50,9 +50,19 @@
//}));
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