Updated the ad item manager form to allow the user to replace one item with another item. Fixed a crash bug in the Global Class logger functions.

This commit is contained in:
2017-07-12 16:40:41 -05:00
parent fd47690224
commit 3b36476a6c
5 changed files with 250 additions and 59 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ namespace AdvertsingProfitControl
}
using (
var file =
new StreamWriter(@"C:\Users\" + Environment.UserName + @"\AppData\Local\APC\" + DateTime.Now.ToString("d") + ".log", true))
new StreamWriter(@"C:\Users\" + Environment.UserName + @"\AppData\Local\APC\" + DateTime.Now.ToString("yy-MM-dd") + ".log", true))
{
file.WriteLine(DateTime.Now + ": Unhandled Thread Exception:\n" + e.Exception.Message + Environment.NewLine);
MessageBox.Show(@"An unhandled thread exception has occurred. Advertising Profit Control will be forced to exit.",
@@ -31,7 +31,7 @@ namespace AdvertsingProfitControl
{
Directory.CreateDirectory(LogFilePath);
}
using (var file = new StreamWriter(@"C:\Users\" + Environment.UserName + @"\AppData\Local\APC\" + DateTime.Now.ToString("d") + ".log", true))
using (var file = new StreamWriter(@"C:\Users\" + Environment.UserName + @"\AppData\Local\APC\" + DateTime.Now.ToString("yy-MM-dd") + ".log", true))
{
file.WriteLine(DateTime.Now + ": An unhandled exception occurred. \nException Object: " + e.ExceptionObject + Environment.NewLine);
MessageBox.Show(@"And unknown error has occurred. Advertising Profit Control will be forced to exit.",