Example #1
0
 /// <summary>Displays a message box with the specified text.</summary>
 /// <param name="text">The text to display in the message box.</param>
 /// <returns>The <see cref="DialogResult" />.</returns>
 public static DialogResult Show(string text)
 {
     using (VisualMessageBox messageBox = new VisualMessageBox(text))
     {
         messageBox.ShowDialog();
         return(messageBox.DialogResult);
     }
 }
Example #2
0
 /// <summary>Displays a message box with the specified text.</summary>
 /// <param name="text">The text to display in the message box.</param>
 /// <param name="caption">The text to display in the title bar of the message box.</param>
 /// <param name="buttons">Specifies which buttons to display in the message box.</param>
 /// <param name="icon">Specifies which icon to display in the message box.</param>
 /// <returns>The <see cref="DialogResult" />.</returns>
 public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
 {
     using (VisualMessageBox messageBox = new VisualMessageBox(text, caption, buttons, icon))
     {
         messageBox.ShowDialog();
         return(messageBox.DialogResult);
     }
 }