/// <summary>
        /// Converts a <see cref="IMessageBoxServiceButton"/> to the
        /// corresponding <see cref="MessageBoxButton"/>.
        /// </summary>
        /// <param name="button">The button to convert.</param>
        /// <returns>Equivalent <see cref="MessageBoxButton"/>.</returns>
        private MessageBoxButton ParseIDialogServiceButtons(IMessageBoxServiceButton button)
        {
            switch (button)
            {
            case IMessageBoxServiceButton.OK:
                return(MessageBoxButton.OK);

            case IMessageBoxServiceButton.YesNo:
                return(MessageBoxButton.YesNo);

            case IMessageBoxServiceButton.YesNoCancel:
                return(MessageBoxButton.YesNoCancel);

            default:
                return(MessageBoxButton.OK);
            }
        }
 /// <summary>
 /// Shows a dialog with the given <paramref name="text"/> as content
 /// and the given <paramref name="title"/> in the title bar.
 /// Gives the user the given <paramref name="buttons"/> to press.
 /// Also displays an icon next to the text.
 /// </summary>
 /// <param name="text">Text to display in the dialog.</param>
 /// <param name="title">Text to display in the title of the dialog.</param>
 /// <param name="buttons">Buttons displayed in the dialog.</param>
 /// <param name="icon">Icon to display in the dialog.</param>
 /// <returns>Result of the dialog</returns>
 public IMessageBoxServiceResult ShowDialog(string text, string title, IMessageBoxServiceButton buttons, IMessageBoxServiceIcon icon)
 {
     return(ParseMessageBoxResult(MessageBox.Show(text, title, ParseIDialogServiceButtons(buttons), ParseIDialogServiceIcon(icon))));
 }