Skip to content

Commit e5c2d33

Browse files
niemyjskiejsmith
authored andcommitted
Updated the build. Temp copied source into deprecated packages to simplify resource compiling... will be deleted in next release.
1 parent 671be9c commit e5c2d33

28 files changed

+1458
-40
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
using System;
2+
using System.Windows.Forms;
3+
using Exceptionless.Dependency;
4+
using Exceptionless.Models;
5+
using Exceptionless.Storage;
6+
using Exceptionless.Utility;
7+
8+
namespace Exceptionless.Dialogs {
9+
public sealed partial class CrashReportForm : Form {
10+
public ExceptionlessClient Client { get; internal set; }
11+
public Event Event { get; internal set; }
12+
13+
public CrashReportForm(ExceptionlessClient client, Event ev) {
14+
InitializeComponent();
15+
16+
Client = client;
17+
Event = ev;
18+
Text = String.Concat(AssemblyHelper.GetAssemblyTitle(), " Error");
19+
InformationHeaderLabel.Text = String.Concat(AssemblyHelper.GetAssemblyTitle(), " has encountered a problem and needs to close. We are sorry for the inconvenience.");
20+
21+
var userInfo = ev.GetUserIdentity(client.Configuration.Resolver.GetJsonSerializer());
22+
if (userInfo != null && !String.IsNullOrEmpty(userInfo.Identity)) {
23+
EmailAddressTextBox.Text = userInfo.Identity;
24+
} else {
25+
var storage = client.Configuration.Resolver.Resolve<PersistedDictionary>();
26+
string emailAddress;
27+
if (storage != null && storage.TryGetValue("EmailAddress", out emailAddress))
28+
EmailAddressTextBox.Text = emailAddress;
29+
}
30+
31+
var userDescription = Event.GetUserDescription(client.Configuration.Resolver.GetJsonSerializer());
32+
if (userDescription != null)
33+
DescriptionTextBox.Text = userDescription.Description;
34+
}
35+
36+
private void ExitButton_Click(object sender, EventArgs e) {
37+
Close();
38+
}
39+
40+
private void OnSubmitReportButtonClick(object sender, EventArgs e) {
41+
Cursor = Cursors.WaitCursor;
42+
SendReportButton.Enabled = false;
43+
ExitButton.Enabled = false;
44+
45+
if (!String.IsNullOrWhiteSpace(EmailAddressTextBox.Text)) {
46+
var storage = Client.Configuration.Resolver.Resolve<PersistedDictionary>();
47+
if (storage != null)
48+
storage["EmailAddress"] = EmailAddressTextBox.Text;
49+
}
50+
51+
Event.SetUserDescription(EmailAddressTextBox.Text, DescriptionTextBox.Text);
52+
53+
Cursor = Cursors.Default;
54+
SendReportButton.Enabled = true;
55+
ExitButton.Enabled = true;
56+
57+
DialogResult = DialogResult.OK;
58+
Close();
59+
}
60+
}
61+
}

src/Platforms/Exceptionless.Windows.Signed/Dialogs/CrashReportForm.designer.cs

Lines changed: 220 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)