| | |
| | | MessageBoxResult res = MessageBoxResult.None; |
| | | if (!(owner is Window window)) |
| | | { |
| | | window = Window.GetWindow(owner); |
| | | owner.Dispatcher.Invoke(() => |
| | | { |
| | | window = Window.GetWindow(owner) ?? Application.Current.MainWindow; |
| | | 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; |
| | | } |
| | | } |