Skip to content

Commit e7a2f71

Browse files
committed
Updated assembly version to 1.5.5.
1 parent da365ce commit e7a2f71

File tree

7 files changed

+36
-30
lines changed

7 files changed

+36
-30
lines changed

CrashReporter.NET/CrashReport.cs

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public CrashReport(ReportCrash reportCrashObject)
3434
pictureBoxScreenshot.ImageLocation = _reportCrash.ScreenShot;
3535
pictureBoxScreenshot.Show();
3636
}
37+
3738
if (_reportCrash.DoctorDumpSettings != null &&
3839
_reportCrash.DoctorDumpSettings.SendAnonymousReportSilently)
3940
_reportCrash.SendAnonymousReport(SendRequestCompleted);
@@ -87,7 +88,6 @@ private void ButtonSendReportClick(object sender, EventArgs e)
8788
var regexEmail = new Regex(
8889
@"^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$");
8990
string from = String.Empty;
90-
string subject = String.Empty;
9191

9292
if (string.IsNullOrEmpty(textBoxEmail.Text.Trim()))
9393
{
@@ -99,26 +99,24 @@ private void ButtonSendReportClick(object sender, EventArgs e)
9999
}
100100
else
101101
{
102-
errorProviderEmail.SetError(textBoxEmail, "");
103-
if (!regexEmail.IsMatch(textBoxEmail.Text.Trim()))
102+
if (regexEmail.IsMatch(textBoxEmail.Text.Trim()))
103+
{
104+
errorProviderEmail.SetError(textBoxEmail, "");
105+
from = textBoxEmail.Text.Trim();
106+
}
107+
else
104108
{
105109
if (_reportCrash.EmailRequired)
106110
{
107111
errorProviderEmail.SetError(textBoxEmail, Resources.InvalidEmailAddressError);
108112
return;
109113
}
110114
}
111-
else
112-
{
113-
errorProviderEmail.SetError(textBoxEmail, "");
114-
from = textBoxEmail.Text.Trim();
115-
subject =
116-
$"{_reportCrash.ApplicationTitle} {_reportCrash.ApplicationVersion} Crash Report by {textBoxEmail.Text.Trim()}";
117-
}
118115
}
119116

120-
_reportCrash.SendReport(checkBoxIncludeScreenshot.Checked, SendRequestCompleted, SmtpClientSendCompleted, this, from, subject, textBoxUserMessage.Text.Trim());
121-
117+
_reportCrash.SendReport(checkBoxIncludeScreenshot.Checked, SendRequestCompleted, SmtpClientSendCompleted,
118+
this, from, textBoxUserMessage.Text.Trim());
119+
122120
_progressDialog = new ProgressDialog();
123121
_progressDialog.ShowDialog();
124122
}

CrashReporter.NET/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@
3636
// by using the '*' as shown below:
3737
// [assembly: AssemblyVersion("1.0.*")]
3838

39-
[assembly: AssemblyVersion("1.5.4.0")]
40-
[assembly: AssemblyFileVersion("1.5.4.0")]
39+
[assembly: AssemblyVersion("1.5.5.0")]
40+
[assembly: AssemblyFileVersion("1.5.5.0")]
4141
[assembly: NeutralResourcesLanguageAttribute("en")]

CrashReporter.NET/ReportCrash.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ public void Send(Exception exception)
150150
{
151151
throw new ArgumentNullException(@"FromEmail");
152152
}
153+
153154
if (string.IsNullOrEmpty(SmtpHost))
154155
{
155156
throw new ArgumentNullException("SmtpHost");
@@ -160,6 +161,7 @@ public void Send(Exception exception)
160161
{
161162
Application.EnableVisualStyles();
162163
}
164+
163165
if (Silent)
164166
{
165167
SendReport(IncludeScreenshot);
@@ -184,14 +186,19 @@ public void Send(Exception exception)
184186
internal void SendReport(bool includeScreenshot,
185187
DrDumpService.SendRequestCompletedEventHandler sendRequestCompleted = null,
186188
SendCompletedEventHandler smtpClientSendCompleted = null, Control form = null, string from = "",
187-
string subject = "", string userMessage = "")
189+
string userMessage = "")
188190
{
191+
string subject = String.Empty;
189192
if (string.IsNullOrEmpty(from))
190193
{
191194
from = !string.IsNullOrEmpty(FromEmail)
192195
? FromEmail
193196
: null;
194197
}
198+
else
199+
{
200+
subject = $"{ApplicationTitle} {ApplicationVersion} Crash Report by {from}";
201+
}
195202

196203
if (AnalyzeWithDoctorDump)
197204
{
@@ -205,7 +212,8 @@ internal void SendReport(bool includeScreenshot,
205212

206213
#region Send Email Using SMTP
207214

208-
private void SendEmail(bool includeScreenshot, SendCompletedEventHandler smtpClientSendCompleted, string from, string subject, string userMessage)
215+
private void SendEmail(bool includeScreenshot, SendCompletedEventHandler smtpClientSendCompleted, string from,
216+
string subject, string userMessage)
209217
{
210218
if (string.IsNullOrEmpty(subject))
211219
{

CrashReporter.NET/build/CrashReporter.NET.Official.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
33
<metadata>
44
<id>CrashReporter.NET.Official</id>
5-
<version>1.5.4</version>
5+
<version>1.5.5</version>
66
<title>CrashReporter.NET</title>
77
<authors>RBSoft</authors>
88
<owners>rbsoft</owners>

CrashReporterTest/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
// You can specify all the values or you can default the Build and Revision Numbers
3232
// by using the '*' as shown below:
3333
// [assembly: AssemblyVersion("1.0.*")]
34-
[assembly: AssemblyVersion("1.5.2.0")]
35-
[assembly: AssemblyFileVersion("1.5.2.0")]
34+
[assembly: AssemblyVersion("1.5.5.0")]
35+
[assembly: AssemblyFileVersion("1.5.5.0")]

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ internal static class Program
3939

4040
private static void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs unhandledExceptionEventArgs)
4141
{
42-
ReportCrash((Exception)unhandledExceptionEventArgs.ExceptionObject);
42+
SendReport((Exception)unhandledExceptionEventArgs.ExceptionObject);
4343
Environment.Exit(0);
4444
}
4545

4646
private static void ApplicationThreadException(object sender, ThreadExceptionEventArgs e)
4747
{
48-
ReportCrash(e.Exception);
48+
SendReport(e.Exception);
4949
}
5050

51-
public static void ReportCrash(Exception exception, string developerMessage = "")
51+
public static void SendReport(Exception exception, string developerMessage = "")
5252
{
5353
var reportCrash = new ReportCrash("Email where you want to receive crash reports.")
5454
{
@@ -76,7 +76,7 @@ try
7676
}
7777
catch (Exception exception)
7878
{
79-
Program.ReportCrash(exception, "Value of path variable is " + path);
79+
Program.SendReport(exception, "Value of path variable is " + path);
8080
}
8181
````
8282

@@ -97,23 +97,23 @@ public partial class App : Application
9797

9898
private void TaskSchedulerOnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs unobservedTaskExceptionEventArgs)
9999
{
100-
ReportCrash(unobservedTaskExceptionEventArgs.Exception);
100+
SendReport(unobservedTaskExceptionEventArgs.Exception);
101101
Environment.Exit(0);
102102
}
103103

104104
private void DispatcherOnUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs dispatcherUnhandledExceptionEventArgs)
105105
{
106-
ReportCrash(dispatcherUnhandledExceptionEventArgs.Exception);
106+
SendReport(dispatcherUnhandledExceptionEventArgs.Exception);
107107
Environment.Exit(0);
108108
}
109109

110110
private static void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs unhandledExceptionEventArgs)
111111
{
112-
ReportCrash((Exception)unhandledExceptionEventArgs.ExceptionObject);
112+
SendReport((Exception)unhandledExceptionEventArgs.ExceptionObject);
113113
Environment.Exit(0);
114114
}
115115

116-
public static void ReportCrash(Exception exception, string developerMessage = "")
116+
public static void SendReport(Exception exception, string developerMessage = "")
117117
{
118118
var reportCrash = new ReportCrash("Email where you want to receive crash reports.")
119119
{
@@ -140,7 +140,7 @@ try
140140
}
141141
catch (Exception exception)
142142
{
143-
App.ReportCrash(exception, "Value of path variable is " + path);
143+
App.SendReport(exception, "Value of path variable is " + path);
144144
}
145145
````
146146

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
version: 1.5.4.{build}
1+
version: 1.5.5.{build}
22
environment:
3-
my_version: 1.5.4
3+
my_version: 1.5.5
44
my_secret:
55
secure: eXAIysIG8npt2tVMYQpGwTLj47CK9lUB/NyEfVGgc90=
66
skip_branch_with_pr: true

0 commit comments

Comments
 (0)