From c1c3772a11b1f3fbad8846cc714120771d85fa53 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期四, 12 六月 2025 20:10:59 +0800
Subject: [PATCH] 新增SeqEditor
---
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