| | |
| | | using System.Windows; |
| | | using Panuon.WPF.UI.Configurations; |
| | | using HMI.Core.Util; |
| | | using System; |
| | | |
| | | namespace HMI.UI.Util |
| | | { |
| | |
| | | MessageBoxResult res = MessageBoxResult.None; |
| | | if (!(owner is Window window)) |
| | | { |
| | | window = Window.GetWindow(owner); |
| | | owner.Dispatcher.Invoke(() => |
| | | { |
| | | window = Window.GetWindow(owner) ?? Application.Current.MainWindow; |
| | | window.Dispatcher.Invoke(() => |
| | | { |
| | | res = MessageBoxX.Show(window, message, caption, button, icon, defaultButton, setting, countdown); |
| | | }); |
| | | }); |
| | | } |
| | | window.Dispatcher.Invoke(() => |
| | | else |
| | | { |
| | | 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); |
| | | }); |
| | | } |
| | | return res; |
| | | } |
| | | } |