From 006c98e5650b530e5220f279c1e803fefe69d40d Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期二, 25 十一月 2025 15:47:33 +0800
Subject: [PATCH] 优化一些东西;
---
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