public CrashReport(ReportCrash reportCrashObject) { InitializeComponent(); toolTip.ToolTipTitle = Resources.ToolTipTitle; _reportCrash = reportCrashObject; Text = string.Format(Resources.TitleText, _reportCrash.ApplicationTitle, _reportCrash.ApplicationVersion); saveFileDialog.FileName = string.Format(Resources.ReportFileName, _reportCrash.ApplicationTitle, _reportCrash.ApplicationVersion); saveFileDialog.Filter = @"HTML files(*.html)|*.html"; if (_reportCrash.ScreenShotBinary?.Length > 0) { checkBoxIncludeScreenshot.Checked = _reportCrash.IncludeScreenshot; pictureBoxScreenshot.Image = System.Drawing.Image.FromStream(new MemoryStream(_reportCrash.ScreenShotBinary)); pictureBoxScreenshot.Show(); } if (_reportCrash.DoctorDumpSettings != null && _reportCrash.DoctorDumpSettings.SendAnonymousReportSilently) { _reportCrash.SendAnonymousReport(SendRequestCompleted); } if (!_reportCrash.ShowScreenshotTab) { tabControl.TabPages.Remove(tabPageScreenshot); } }
public CrashReport(ReportCrash reportCrashObject) { InitializeComponent(); toolTip.ToolTipTitle = Resources.ToolTipTitle; _reportCrash = reportCrashObject; Text = string.Format(Resources.TitleText, _reportCrash.ApplicationTitle, _reportCrash.ApplicationVersion); saveFileDialog.FileName = string.Format(Resources.ReportFileName, _reportCrash.ApplicationTitle, _reportCrash.ApplicationVersion); saveFileDialog.Filter = @"HTML files(*.html)|*.html"; if (File.Exists(_reportCrash.ScreenShot)) { checkBoxIncludeScreenshot.Checked = _reportCrash.IncludeScreenshot; pictureBoxScreenshot.ImageLocation = _reportCrash.ScreenShot; pictureBoxScreenshot.Show(); } if (_reportCrash.DoctorDumpSettings != null && _reportCrash.DoctorDumpSettings.SendAnonymousReportSilently) { _reportCrash.SendAnonymousReport(SendRequestCompleted); } }