From fe2aa4880d5c9fd88088ad0ed81ebaca05629f5f Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 02 十一月 2026 17:59:45 +0800
Subject: [PATCH] feat: 集成CAN驱动/模拟器 + 仪器仪表注册/硬件调试模块

---
 HMI.UI/Util/MsgBoxHelper.cs |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/HMI.UI/Util/MsgBoxHelper.cs b/HMI.UI/Util/MsgBoxHelper.cs
index 79174a2..2c81478 100644
--- a/HMI.UI/Util/MsgBoxHelper.cs
+++ b/HMI.UI/Util/MsgBoxHelper.cs
@@ -2,6 +2,7 @@
 using System.Windows;
 using Panuon.WPF.UI.Configurations;
 using HMI.Core.Util;
+using System;
 
 namespace HMI.UI.Util
 {
@@ -74,7 +75,10 @@
                 owner.Dispatcher.Invoke(() =>
                 {
                     window = Window.GetWindow(owner) ?? Application.Current.MainWindow;
-                    res = MessageBoxX.Show(window, message, caption, button, icon, defaultButton, setting, countdown);
+                    window.Dispatcher.Invoke(() =>
+                    {
+                        res = MessageBoxX.Show(window, message, caption, button, icon, defaultButton, setting, countdown);
+                    });
                 });
             }
             else

--
Gitblit v1.9.1