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:
@@ -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.",
|
||||
|
||||
Reference in New Issue
Block a user