Ejemplo n.º 1
0
 /// <summary>
 /// Displays a dialog describing an exception, in front of the specified object, to the user.
 /// </summary>
 /// <param name="owner">An implementation of <see cref="T:System.Windows.Forms.IWin32Window"/> that will own the modal dialog.
 /// </param>
 /// <param name="ex">The exception to report.</param>
 /// <param name="text">The text to display in the dialog.</param>
 /// <param name="caption">The text to display in the title bar of the dialog.</param>
 /// <param name="fatal">A value indicating if the exception is fatal to the process, which is reflected in the icon used.</param>
 public static void Show(IWin32Window owner, Exception ex, string text, string caption, bool fatal)
 {
     using (var dialog = new ExceptionDialog(ex, text, caption, fatal, owner))
         dialog.ShowDialog(owner);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Displays a dialog describing an exception to the user.
 /// </summary>
 /// <param name="ex">The exception to report.</param>
 /// <param name="text">The text to display in the dialog.</param>
 /// <param name="caption">The text to display in the title bar of the dialog.</param>
 /// <param name="fatal">A value indicating if the exception is fatal to the process, which is reflected in the icon used.</param>
 public static void Show(Exception ex, string text, string caption, bool fatal)
 {
     using (var dialog = new ExceptionDialog(ex, text, caption, fatal))
         dialog.ShowDialog();
 }