Ejemplo n.º 1
0
 public void Dispose()
 {
     if (commonDialog != null)
     {
         commonDialog.Dispose();
     }
     else if (threadExceptionDialog != null)
     {
         if (threadExceptionDialog.InvokeRequired)
         {
             threadExceptionDialog.BeginInvoke(new SWF.MethodInvoker(Dispose));
             return;
         }
         threadExceptionDialog.Close();
         threadExceptionDialog.Dispose();
     }
 }
Ejemplo n.º 2
0
 public static DialogResult ShowModalDialog(Form parent, CommonDialog dialog)
 {
     parent.Enabled = false;
     DialogResult r = dialog.ShowDialog();
     parent.Enabled = true;
     dialog.Dispose();
     return r;
 }