Set SMTP server details and receiver email fields of this class instance to send crash reports directly in your inbox.
Exemplo n.º 1
0
 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.Silent)
     {
         ButtonSendReportClick(null, null);
     }
     else
     {
         if (_reportCrash.DoctorDumpSettings != null && _reportCrash.DoctorDumpSettings.SendAnonymousReportSilently)
         {
             SendAnonymousReport();
         }
     }
 }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 3
0
        /// <summary>
        ///     Prompts the user with a crash report and submits the report to an email address
        /// </summary>
        /// <param name="exception"></param>
        public static void ReportCrash(Exception exception)
        {
            var reportCrash = new ReportCrash
            {
                ToEmail = "*****@*****.**"
            };

            reportCrash.Send(exception);
        }
Exemplo n.º 4
0
        /// <summary>
        ///     Prompts the user with a crash report and submits the report to an email address
        /// </summary>
        /// <param name="exception"></param>
        public static void ReportCrash(Exception exception)
        {
            var reportCrash = new ReportCrash
            {
                ToEmail = "*****@*****.**" //Prev: [email protected]
            };

            reportCrash.Send(exception);
        }
Exemplo n.º 5
0
        private static void ReportCrash(Exception exception)
        {
            var reportCrash = new ReportCrash
            {
                ToEmail = "*****@*****.**"
            };

            reportCrash.Send(exception);
        }
Exemplo n.º 6
0
        public CrashReport(ReportCrash reportCrashObject)
        {
            InitializeComponent();
            _reportCrash            = reportCrashObject;
            Text                    = string.Format("{0} {1} crashed.", _reportCrash.ApplicationTitle, _reportCrash.ApplicationVersion);
            saveFileDialog.FileName = string.Format("{0} {1} Crash Report", _reportCrash.ApplicationTitle,
                                                    _reportCrash.ApplicationVersion);

            if (File.Exists(_reportCrash.ScreenShot))
            {
                pictureBoxScreenshot.ImageLocation = _reportCrash.ScreenShot;
                pictureBoxScreenshot.Show();
            }
        }
Exemplo n.º 7
0
        public CrashReport(ReportCrash reportCrashObject)
        {
            InitializeComponent();
            _reportCrash = reportCrashObject;
            Text = string.Format("{0} {1} crashed.", _reportCrash.ApplicationTitle, _reportCrash.ApplicationVersion);
            saveFileDialog.FileName = string.Format("{0} {1} Crash Report", _reportCrash.ApplicationTitle,
                                                    _reportCrash.ApplicationVersion);

            if (File.Exists(_reportCrash.ScreenShot))
            {
                pictureBoxScreenshot.ImageLocation = _reportCrash.ScreenShot;
                pictureBoxScreenshot.Show();
            }
        }
Exemplo n.º 8
0
 static void ApplicationThreadException(object sender, ThreadExceptionEventArgs e)
 {
     var reportCrash = new ReportCrash
     {
         FromEmail = "*****@*****.**",
         ToEmail = "*****@*****.**",
         SMTPHost = "smtp.gmail.com",
         Port = 587,
         UserName = "******",
         Password = "******",
         EnableSSL = true
     };
     reportCrash.Send(e.Exception);
 }
Exemplo n.º 9
0
        private static void ReportCrash(Exception exception)
        {
            var reportCrash = new ReportCrash
            {
                FromEmail = "Your Gmail address",
                ToEmail = "Email address where you want to receive crash reports",
                SmtpHost = "Your SMTP server address for example smtp.gmail.com",
                Port = 587,
                UserName = "******",
                Password = "******",
                EnableSSL = true,
            };

            reportCrash.Send(exception);
        }
Exemplo n.º 10
0
        public CrashReport(ReportCrash reportCrashObject)
        {
            InitializeComponent();
            _reportCrash = reportCrashObject;
            Text = string.Format(_resources.GetString("TitleText"), _reportCrash.ApplicationTitle,
                                 _reportCrash.ApplicationVersion);
            saveFileDialog.FileName = string.Format(_resources.GetString("ReportFileName"), _reportCrash.ApplicationTitle,
                                                    _reportCrash.ApplicationVersion);

            if (File.Exists(_reportCrash.ScreenShot))
            {
                pictureBoxScreenshot.ImageLocation = _reportCrash.ScreenShot;
                pictureBoxScreenshot.Show();
            }
        }
Exemplo n.º 11
0
        /// <summary>
        /// Report an exception
        /// </summary>
        public static void SendCrashReport(Exception exception)
        {
            var reportCrash = new ReportCrash
            {
                FromEmail = "*****@*****.**",
                ToEmail = "*****@*****.**",
                SmtpHost = "smtp.gmail.com",
                Port = 587,
                UserName = "******",
                Password = "******",
                EnableSSL = true,
            };

            reportCrash.Send(exception);
        }
Exemplo n.º 12
0
        public static void SendCrashReport(Exception exception, string developerMessage)
        {
            var reportCrash = new ReportCrash
            {
                FromEmail = "your gmail",
                ToEmail = "email where you want to recieve crash reports.",
                SmtpHost = "smtp.gmail.com",
                Port = 587,
                UserName = "******",
                Password = "******",
                EnableSSL = true,
                EmailRequired = true,
                CurrentCulture = CultureInfo.CreateSpecificCulture("es"),
                DeveloperMessage = developerMessage
            };

            reportCrash.Send(exception);
        }
Exemplo n.º 13
0
        public CrashReport(ReportCrash reportCrashObject)
        {
            InitializeComponent();
            _reportCrash = reportCrashObject;
            Text         = string.Format(_resources.GetString("TitleText"), _reportCrash.ApplicationTitle,
                                         _reportCrash.ApplicationVersion);
            saveFileDialog.FileName = string.Format(_resources.GetString("ReportFileName"),
                                                    _reportCrash.ApplicationTitle, _reportCrash.ApplicationVersion);

            if (File.Exists(_reportCrash.ScreenShot))
            {
                checkBoxIncludeScreenshot.Checked  = _reportCrash.IncludeScreenshot;
                pictureBoxScreenshot.ImageLocation = _reportCrash.ScreenShot;
                pictureBoxScreenshot.Show();
            }

            if (_reportCrash.DoctorDumpSettings != null && _reportCrash.DoctorDumpSettings.SendAnonymousReportSilently)
            {
                SendAnonymousReport();
            }
        }
Exemplo n.º 14
0
        private static void ReportCrash(Exception exception)
        {
            var reportCrash = new ReportCrash
            {
                FromEmail = "*****@*****.**",
                ToEmail = "*****@*****.**",
                SmtpHost = "smtp.139.com",
                Port = 25,
                UserName = "******",
                Password = "******",
                EnableSSL = false,
            };

            reportCrash.Send(exception);
        }
Exemplo n.º 15
0
 public static void ReportCrash(Exception exception)
 {
     var reportCrash = new ReportCrash { ToEmail = "*****@*****.**" };
     reportCrash.Send(exception);
 }
Exemplo n.º 16
0
        // Put up dialog to send crash report.
        private static void SendCrashReport(Exception exception)
        {
            if (!crashReported) {
                crashReported = true;   // Only report crash one time. Further ones are likely to be annoying and useless.

                var reportCrash = new ReportCrash {
                    FromEmail = "*****@*****.**",
                    ToEmail = "*****@*****.**",
                    SmtpHost = "mail.purple-pen.org",
                    Port = 587,
                    UserName = "******",
                    Password = "******",
                    EnableSSL = false,

                    TextIntro = MiscText.CrashIntro,
                    TextEmail = MiscText.CrashEmail,
                    TextMessage = MiscText.CrashMessage,
                    TextSend = MiscText.CrashSend,
                    TextSave = MiscText.CrashSave,
                    TextCancel = MiscText.CrashCancel
                };

                reportCrash.Send(exception);
            }
        }