/[RomCheater]/trunk/RomCheater/Main.cs
ViewVC logotype

Diff of /trunk/RomCheater/Main.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/RomCheater/Main.cs	2012/05/09 10:09:00	33
+++ trunk/RomCheater/Main.cs	2012/05/09 11:29:33	34
@@ -7,11 +7,17 @@
 using System.Text;
 using System.Windows.Forms;
 using RomCheater.Logging;
+using RomCheater.Properties;
+using RomCheater.UserSettingsSupport;
 
 namespace RomCheater
 {
     public partial class Main : Form
     {
+        static Main()
+        {
+            SettingSubscriber.AddSubscriber(Settings.Default);
+        }
         private const string t = "RomCheater";
         #region LogWriterSupport
         static LogWriter _LoggerInstance;
@@ -26,8 +32,23 @@
         public Main()
         {
             InitializeComponent();
+
+
+            try
+            {
+                if (Settings.Default.UpgradeRequired)
+                {
+                    Settings.Default.Upgrade();
+                    Settings.Default.Reload();
+                    Settings.Default.UpgradeRequired = false;
+                    Settings.Default.Save();
+                }
+            }
+            catch
+            {
+                Settings.Default.Reset();
+            }
             LoggerInstance = logwriter;
-            logger.SetLoggingFlags(loggerflags.DEFAULT);
             LoggerInstance.CreateNewLog(false);
         }
 

 

  ViewVC Help
Powered by ViewVC 1.1.22