Exemplo n.º 1
0
 private void sendFeedbackWorker_DoWork( object sender, DoWorkEventArgs e )
 {
     BugReport report = new BugReport
     {
         FogBugzUrl = "https://philltest.fogbugz.com/ScoutSubmit.asp",
         UserName = "******",
         Title = "User feedback",
         Project = "BugzScoutSharp",
         Area = "Feedback",
         DefaultMessage = ErrorHandler.DEFAULT_BUGZSCOUT_MESSAGE,
     };
     report.AddMachineDetails( "Feedback sent by" );
     report.Description += Environment.NewLine + tbFeedback.Text;
     e.Result = report.Submit( );
 }
Exemplo n.º 2
0
        public ErrorForm( Exception e, BugReport report, bool fatal )
        {
            InitializeComponent( );
            this.Exception = e;
            this.Report = report;

            // Style the form differently for fatal errors.
            this.ErrorIsFatal = fatal;
            if ( ErrorIsFatal )
            {
                pbIcon.Image = global::SampleProgram.Properties.Resources.exclamation;
                lblTitle.Text = "We're sorry...";
                lblDescription.Text = "SampleApp has encountered a fatal error and must restart.";
                btnRestart.Text = "Restart";
            }

            Size = MinimumSize;
            UpdateState( );
            BringToFront( );
            bugReporter.RunWorkerAsync( );
        }
Exemplo n.º 3
0
        public static void HandleUncaughtException( Exception e, bool fatal )
        {
            // Create an error report.
            BugReport report = new BugReport
            {
                FogBugzUrl = "https://philltest.fogbugz.com/ScoutSubmit.asp",
                UserName = "******",
                Project = "BugzScoutSharp",
                Area = "Reports",
                DefaultMessage = DEFAULT_BUGZSCOUT_MESSAGE,
            };

            if ( fatal )
                report.Description += "\n*** FATAL ERROR ***\n";

            report.AddMachineDetails( "\nDiscovered by" );
            report.AddExceptionDetails( e );
            report.Description += "Application version: " + Util.GetProgramVersion( ) + " (built on " + Util.GetProgramBuildDate( ).ToShortDateString( ) + ")" + Environment.NewLine;
            report.Description += "OS: " + Util.GetWindowsVersion( ) + Environment.NewLine;

            // Show the error form with the report.
            ErrorForm form = new ErrorForm( e, report, fatal );
            form.ShowDialog( );
        }