/// <summary> /// Purpose: so background threads can correctly display a modal error window. /// </summary> public void Error(String errorMessage, Exception ex, Boolean continueAbort, Procedure <MessageWindow.Result> setResult) { Dispatcher.Invoke(DispatcherPriority.Normal, new Procedure(() => { MessageWindow.Flags flags = MessageWindow.Flags.Error; if (continueAbort) { flags |= MessageWindow.Flags.ContinueAbort; } Common.Message(this, errorMessage, ex, flags, setResult); })); }
public static MessageWindow.Result Message(System.Windows.Window owner, String message, Exception ex, MessageWindow.Flags flags, Procedure <MessageWindow.Result> setResult) { MessageWindow window = new MessageWindow(message, ex, flags, setResult); window.ShowInTaskbar = (owner == null); window.Owner = owner; window.WindowStartupLocation = (owner == null ? WindowStartupLocation.CenterScreen : WindowStartupLocation.CenterOwner); window.ShowDialog(); return(window.CloseResult); }
public static MessageWindow.Result Message(System.Windows.Window owner, String message, Exception ex, MessageWindow.Flags flags) { return(Message(owner, message, ex, flags, null)); }