private static bool SendReportToSf(ReportingForm form, IEnumerable <string> files) { var sent = true; var zipFile = NaroAppConstantNames.ZipLogFileName; var pack = new ZipPack(zipFile); foreach (var fileName in files) { pack.AddFile(fileName); } pack.Close(); // submit the error report ServicePointManager.Expect100Continue = false; var sf = new SourceForgeBugReport(); try { sf.ReportBug(form.Title, form.Description, zipFile); } catch (Exception ex) { Log.Info("Error sending the report to internet." + Environment.NewLine + " Error message: " + ex.Message); sent = false; } return(sent); }
public static bool SendBugReport(ReportingForm form) { var sent = true; form.FileNames.Add(NaroAppConstantNames.LogFileName); form.FileNames.Add(NaroAppConstantNames.AutoSaveFileName); form.TopMost = true; //Application.Run(form); if (form.ShowDialog() == DialogResult.OK) { sent = SendReportToSf(form, form.FileNames); if (!sent) { NaroMessage.Show(ErrorReportCommonResources.StarterUtils_Internet_problems); } } return(sent); }