-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.xaml.cs
34 lines (32 loc) · 1.02 KB
/
App.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
using System.Configuration;
using System.Diagnostics;
using System.IO;
using System.Windows;
namespace VNRec
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
void ApplicationStartup (object sender, StartupEventArgs e)
{
#if DEBUG
string trace_dir = Path.GetDirectoryName (System.Reflection.Assembly.GetExecutingAssembly().Location);
Trace.Listeners.Add (new TextWriterTraceListener (Path.Combine (trace_dir, "trace.log")));
Trace.AutoFlush = true;
#endif
if (VNRec.Properties.Settings.Default.UpgradeRequired)
{
VNRec.Properties.Settings.Default.Upgrade();
VNRec.Properties.Settings.Default.UpgradeRequired = false;
VNRec.Properties.Settings.Default.Save();
}
}
void ApplicationExit (object sender, ExitEventArgs e)
{
VNRec.Properties.Settings.Default.Save();
}
}
}