/// <summary> /// Raise the Completed event with parameters indicating the current message-box window and the user-response /// it was closed with. /// </summary> /// <remarks> /// This is attached to MessageBoxConfiguration because it's handler needs to exist at the instance-level, /// and the Configuration object is easily available to the developer. /// </remarks> /// <param name="messageBoxWindow">the message-box window that signaled this event</param> /// <param name="result">the user-response with which the message-box window was dismissed</param> public void SignalThatMessageBoxHasEnded(MessageBoxWindow messageBoxWindow, MessageResult result) { var args = new MessageBoxCompletedEventArgs(result, null, messageBoxWindow); this.Completed(this, args); }
/// <summary> /// The constructor /// </summary> /// <param name="result">the MessageResult that the message-box was ended with</param> /// <param name="error">an exception if it was thrown during the operation of the message-box, otherwise null</param> /// <param name="messageBoxWindow">the message-box that raised this event</param> public MessageBoxCompletedEventArgs(MessageResult result, Exception error, MessageBoxWindow messageBoxWindow) #if PRE_4 : base(error, false, messageBoxWindow) #else : base(error: error, cancelled: false, userState: messageBoxWindow)