private string GetHTMLFromBrowser(string URL) { frmBrowser fBrowser = new frmBrowser() { RSS = URL }; fBrowser.ShowDialog(); return(fBrowser.RSS); }
private void SendDocToEmail(Document oDoc, string sEmail) { Email oMail = new Email(); oMail.To = sEmail; if (oDoc.Status == Document.status.New) { frmBrowser oFBR = new frmBrowser(); oFBR.URL = oDoc.URL; oFBR.ShowDialog(); oDoc.ImageURLs = oFBR.imgURLs; oDoc.Status = Document.status.Downloaded; oDoc.LastModified = DateTime.Now; } oMail.AttachmentFileName = oDoc.Title; bool bRetry = true; while (bRetry) { try { oMail.Attachment = oDoc.toPDF(oReps); oMail.SendEmail(); lvwDownloadLinks.FindItemWithText(oDoc.Title).SubItems[1].Text = oDoc.Status.ToString(); bRetry = false; oMail.Attachment.Dispose(); } catch (Exception err) { if (MessageBox.Show(err.Message, "Error", MessageBoxButtons.RetryCancel) != System.Windows.Forms.DialogResult.Retry) { bRetry = false; } } } }