public DialogRunner (System.ComponentModel.Component dialog)
{
commonDialog = dialog as SWF.CommonDialog;
if (commonDialog == null)
threadExceptionDialog = dialog as SWF.ThreadExceptionDialog;
if (commonDialog == null && threadExceptionDialog == null)
throw new ArgumentException ("Unsupported dialog type: " + dialog);
Show ();
}