Skip to content

Commit

Permalink
Updated assembly version to 1.5.5.
Browse files Browse the repository at this point in the history
  • Loading branch information
ravibpatel committed Jun 20, 2018
1 parent da365ce commit e7a2f71
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 30 deletions.
22 changes: 10 additions & 12 deletions CrashReporter.NET/CrashReport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public CrashReport(ReportCrash reportCrashObject)
pictureBoxScreenshot.ImageLocation = _reportCrash.ScreenShot;
pictureBoxScreenshot.Show();
}

if (_reportCrash.DoctorDumpSettings != null &&
_reportCrash.DoctorDumpSettings.SendAnonymousReportSilently)
_reportCrash.SendAnonymousReport(SendRequestCompleted);
Expand Down Expand Up @@ -87,7 +88,6 @@ private void ButtonSendReportClick(object sender, EventArgs e)
var regexEmail = new Regex(
@"^((([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])))\.?$");
string from = String.Empty;
string subject = String.Empty;

if (string.IsNullOrEmpty(textBoxEmail.Text.Trim()))
{
Expand All @@ -99,26 +99,24 @@ private void ButtonSendReportClick(object sender, EventArgs e)
}
else
{
errorProviderEmail.SetError(textBoxEmail, "");
if (!regexEmail.IsMatch(textBoxEmail.Text.Trim()))
if (regexEmail.IsMatch(textBoxEmail.Text.Trim()))
{
errorProviderEmail.SetError(textBoxEmail, "");
from = textBoxEmail.Text.Trim();
}
else
{
if (_reportCrash.EmailRequired)
{
errorProviderEmail.SetError(textBoxEmail, Resources.InvalidEmailAddressError);
return;
}
}
else
{
errorProviderEmail.SetError(textBoxEmail, "");
from = textBoxEmail.Text.Trim();
subject =
$"{_reportCrash.ApplicationTitle} {_reportCrash.ApplicationVersion} Crash Report by {textBoxEmail.Text.Trim()}";
}
}

_reportCrash.SendReport(checkBoxIncludeScreenshot.Checked, SendRequestCompleted, SmtpClientSendCompleted, this, from, subject, textBoxUserMessage.Text.Trim());

_reportCrash.SendReport(checkBoxIncludeScreenshot.Checked, SendRequestCompleted, SmtpClientSendCompleted,
this, from, textBoxUserMessage.Text.Trim());

_progressDialog = new ProgressDialog();
_progressDialog.ShowDialog();
}
Expand Down
4 changes: 2 additions & 2 deletions CrashReporter.NET/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.5.4.0")]
[assembly: AssemblyFileVersion("1.5.4.0")]
[assembly: AssemblyVersion("1.5.5.0")]
[assembly: AssemblyFileVersion("1.5.5.0")]
[assembly: NeutralResourcesLanguageAttribute("en")]
12 changes: 10 additions & 2 deletions CrashReporter.NET/ReportCrash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ public void Send(Exception exception)
{
throw new ArgumentNullException(@"FromEmail");
}

if (string.IsNullOrEmpty(SmtpHost))
{
throw new ArgumentNullException("SmtpHost");
Expand All @@ -160,6 +161,7 @@ public void Send(Exception exception)
{
Application.EnableVisualStyles();
}

if (Silent)
{
SendReport(IncludeScreenshot);
Expand All @@ -184,14 +186,19 @@ public void Send(Exception exception)
internal void SendReport(bool includeScreenshot,
DrDumpService.SendRequestCompletedEventHandler sendRequestCompleted = null,
SendCompletedEventHandler smtpClientSendCompleted = null, Control form = null, string from = "",
string subject = "", string userMessage = "")
string userMessage = "")
{
string subject = String.Empty;
if (string.IsNullOrEmpty(from))
{
from = !string.IsNullOrEmpty(FromEmail)
? FromEmail
: null;
}
else
{
subject = $"{ApplicationTitle} {ApplicationVersion} Crash Report by {from}";
}

if (AnalyzeWithDoctorDump)
{
Expand All @@ -205,7 +212,8 @@ internal void SendReport(bool includeScreenshot,

#region Send Email Using SMTP

private void SendEmail(bool includeScreenshot, SendCompletedEventHandler smtpClientSendCompleted, string from, string subject, string userMessage)
private void SendEmail(bool includeScreenshot, SendCompletedEventHandler smtpClientSendCompleted, string from,
string subject, string userMessage)
{
if (string.IsNullOrEmpty(subject))
{
Expand Down
2 changes: 1 addition & 1 deletion CrashReporter.NET/build/CrashReporter.NET.Official.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>CrashReporter.NET.Official</id>
<version>1.5.4</version>
<version>1.5.5</version>
<title>CrashReporter.NET</title>
<authors>RBSoft</authors>
<owners>rbsoft</owners>
Expand Down
4 changes: 2 additions & 2 deletions CrashReporterTest/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.2.0")]
[assembly: AssemblyFileVersion("1.5.2.0")]
[assembly: AssemblyVersion("1.5.5.0")]
[assembly: AssemblyFileVersion("1.5.5.0")]
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ internal static class Program

private static void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs unhandledExceptionEventArgs)
{
ReportCrash((Exception)unhandledExceptionEventArgs.ExceptionObject);
SendReport((Exception)unhandledExceptionEventArgs.ExceptionObject);
Environment.Exit(0);
}

private static void ApplicationThreadException(object sender, ThreadExceptionEventArgs e)
{
ReportCrash(e.Exception);
SendReport(e.Exception);
}

public static void ReportCrash(Exception exception, string developerMessage = "")
public static void SendReport(Exception exception, string developerMessage = "")
{
var reportCrash = new ReportCrash("Email where you want to receive crash reports.")
{
Expand Down Expand Up @@ -76,7 +76,7 @@ try
}
catch (Exception exception)
{
Program.ReportCrash(exception, "Value of path variable is " + path);
Program.SendReport(exception, "Value of path variable is " + path);
}
````

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

private void TaskSchedulerOnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs unobservedTaskExceptionEventArgs)
{
ReportCrash(unobservedTaskExceptionEventArgs.Exception);
SendReport(unobservedTaskExceptionEventArgs.Exception);
Environment.Exit(0);
}

private void DispatcherOnUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs dispatcherUnhandledExceptionEventArgs)
{
ReportCrash(dispatcherUnhandledExceptionEventArgs.Exception);
SendReport(dispatcherUnhandledExceptionEventArgs.Exception);
Environment.Exit(0);
}

private static void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs unhandledExceptionEventArgs)
{
ReportCrash((Exception)unhandledExceptionEventArgs.ExceptionObject);
SendReport((Exception)unhandledExceptionEventArgs.ExceptionObject);
Environment.Exit(0);
}

public static void ReportCrash(Exception exception, string developerMessage = "")
public static void SendReport(Exception exception, string developerMessage = "")
{
var reportCrash = new ReportCrash("Email where you want to receive crash reports.")
{
Expand All @@ -140,7 +140,7 @@ try
}
catch (Exception exception)
{
App.ReportCrash(exception, "Value of path variable is " + path);
App.SendReport(exception, "Value of path variable is " + path);
}
````

Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 1.5.4.{build}
version: 1.5.5.{build}
environment:
my_version: 1.5.4
my_version: 1.5.5
my_secret:
secure: eXAIysIG8npt2tVMYQpGwTLj47CK9lUB/NyEfVGgc90=
skip_branch_with_pr: true
Expand Down

0 comments on commit e7a2f71

Please sign in to comment.