| | |
| | | using Panuon.WPF.UI; |
| | | using System.Windows; |
| | | using Panuon.WPF.UI.Configurations; |
| | | using System.Windows.Threading; |
| | | |
| | | namespace HMI.UI.Util |
| | | { |
| | |
| | | DefaultButton defaultButton, MessageBoxXSetting setting, int? countdown) |
| | | { |
| | | MessageBoxResult res = MessageBoxResult.None; |
| | | Application.Current.Dispatcher.Invoke(() => |
| | | if (!(owner is Window window)) |
| | | { |
| | | if (owner is Window window) |
| | | { |
| | | res = MessageBoxX.Show(window, message, caption, button, icon, defaultButton, setting, countdown); |
| | | } |
| | | else |
| | | { |
| | | window = Window.GetWindow(owner); |
| | | res = MessageBoxX.Show(window, message, caption, button, icon, defaultButton, setting, countdown); |
| | | } |
| | | window = Window.GetWindow(owner); |
| | | } |
| | | window.Dispatcher.Invoke(() => |
| | | { |
| | | res = MessageBoxX.Show(window, message, caption, button, icon, defaultButton, setting, countdown); |
| | | }); |
| | | return res; |
| | | } |