public static void showGui(Form form) { O2Thread.staThread( () => { var rpReportBug = new ReportBug(); rpReportBug.fParentForm = form;; rpReportBug.setFromEmail("*****@*****.**"); rpReportBug.setSubject("[Comment from O2 user] "); rpReportBug.setMessage(Mail.getUserDetailsAsEmailFormat() + " says:" + Environment.NewLine + "Hello O2 Support, " + Environment.NewLine + Environment.NewLine); rpReportBug.ShowDialog(); }); }
public static T reportBug <T>(this T control) where T : Control { ReportBug.showGui(control); return(control); }