public static void ShowErrorDialog(string message, Exception exception)
 {
     using (ErrorDialog dialog = new ErrorDialog(message, exception)) {
         dialog.StartPosition = FormStartPosition.CenterScreen;
         dialog.ShowDialog();
     }
 }
Exemple #2
0
 public static void ShowErrorDialog(Control owner, string message, Exception exception) {
   if (owner == null) throw new ArgumentNullException("owner");
   if (owner.InvokeRequired) {
     owner.Invoke(new Action<Control, string, Exception>(ShowErrorDialog), owner, message, exception);
   } else {
     using (ErrorDialog dialog = new ErrorDialog(message, exception)) {
       dialog.ShowDialog(owner);
     }
   }
 }
 public static void ShowErrorDialog(Control owner, string message, Exception exception)
 {
     if (owner == null)
     {
         throw new ArgumentNullException("owner");
     }
     if (owner.InvokeRequired)
     {
         owner.Invoke(new Action <Control, string, Exception>(ShowErrorDialog), owner, message, exception);
     }
     else
     {
         using (ErrorDialog dialog = new ErrorDialog(message, exception)) {
             dialog.ShowDialog(owner);
         }
     }
 }
Exemple #4
0
 public static void ShowErrorDialog(string message, Exception exception) {
   using (ErrorDialog dialog = new ErrorDialog(message, exception)) {
     dialog.StartPosition = FormStartPosition.CenterScreen;
     dialog.ShowDialog();
   }
 }