Exemple #1
0
        private void SubmitBugReport()
        {
            var crashReport = AssemblyHelper.BuildCrashReport();

            var additionalInfo = new Dictionary <string, string>
            {
                { "BugReport", this.BugReportField.Value },
                { "ContactInfo", this.ContactInfoField.Value },
            };

            crashReport.Source         = "BugReport";
            crashReport.AdditionalInfo = additionalInfo;
            crashReport.Logs           = this.Logger.LogBuffer.Reverse().Take(100).ToList();

            var task        = RuneberryApiClient.SendCrashReportAsync(crashReport);
            var asyncPopout = new AsyncPopout(task, o =>
            {
                o.Title          = "Bug Report";
                o.Text           = "Submitting bug report...";
                o.SuccessMessage = "Bug report submitted. Thank you!";
                o.FailureMessage = "Failed to submit bug report.\r\nContact Runeberry Software for further support.";
            });

            asyncPopout.ShowDialog();

            this.Close();
        }