Exemplo n.º 1
0
 /// <summary>
 ///     Create a special dialog in the style of Windows XP or Vista. A dialog has a custom icon, an optional large
 ///     title in the form, body text, window text, and one or two custom-labeled buttons.
 /// </summary>
 /// <param name="title">This string will be displayed in the system window frame.</param>
 /// <param name="largeHeading">This is the first string to appear in the dialog. It will be most prominent.</param>
 /// <param name="smallExplanation">
 ///     This string appears either under the big string, or is null, which means it is
 ///     not displayed at all.
 /// </param>
 /// <param name="leftButton">
 ///     This is the left button, typically the "accept" button--label it with an
 ///     action verb (or "OK").
 /// </param>
 /// <param name="rightButton">The right button--typically "Cancel", but could be "No".</param>
 /// <param name="iconSet">An image to be displayed on the left side of the dialog. Should be 32 x 32 pixels.</param>
 public static DialogResult ShowDialog
 (
     string title,
     string largeHeading,
     string smallExplanation,
     string leftButton,
     string rightButton,
     Image iconSet)
 {
     using (var dialog = new BetterDialog
                         (
                title,
                largeHeading,
                smallExplanation,
                leftButton,
                rightButton,
                iconSet))
     {
         DialogResult result = dialog.ShowDialog();
         return(result);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 ///     Create a special dialog in the style of Windows XP or Vista. A dialog has a custom icon, an optional large
 ///     title in the form, body text, window text, and one or two custom-labeled buttons.
 /// </summary>
 /// <param name="title">This string will be displayed in the system window frame.</param>
 /// <param name="largeHeading">This is the first string to appear in the dialog. It will be most prominent.</param>
 /// <param name="smallExplanation">
 ///     This string appears either under the big string, or is null, which means it is
 ///     not displayed at all.
 /// </param>
 /// <param name="leftButton">
 ///     This is the left button, typically the "accept" button--label it with an
 ///     action verb (or "OK").
 /// </param>
 /// <param name="rightButton">The right button--typically "Cancel", but could be "No".</param>
 /// <param name="iconSet">An image to be displayed on the left side of the dialog. Should be 32 x 32 pixels.</param>
 public static DialogResult ShowDialog(
     string title,
     string largeHeading,
     string smallExplanation,
     string leftButton,
     string rightButton,
     Image iconSet)
 {
     using (var dialog = new BetterDialog
         (
         title,
         largeHeading,
         smallExplanation,
         leftButton,
         rightButton,
         iconSet))
     {
         DialogResult result = dialog.ShowDialog();
         return result;
     }
 }