ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/RomCheater/Main.cs
(Generate patch)

Comparing trunk/RomCheater/Main.cs (file contents):
Revision 721 by william, Tue Jun 18 07:28:11 2013 UTC vs.
Revision 722 by william, Tue Jun 18 19:18:05 2013 UTC

--- trunk/RomCheater/Main.cs	2013/06/18 11:40:50	721
+++ trunk/RomCheater/Main.cs	2013/06/18 19:18:05	722
@@ -39,6 +39,7 @@ namespace RomCheater
 {
     public partial class Main : Form
     {
+        private SettingSubscriber SettingsSubscriber;
         private bool m_bSaveLayout = true;
         private Process SelectedProcess = null;        
         private DeserializeDockContent m_deserializeDockContent;
@@ -437,6 +438,8 @@ namespace RomCheater
 #else
             mnuDebug.Visible = false;
 #endif
+            SettingsSubscriber = new SettingSubscriber();
+            SettingsSubscriber.AddSubscriber(this, Settings.Default); 
             load_loggerflags();
             SetupDocks();
             LoggerInstance = m_LogWindow.Logwriter;
@@ -514,7 +517,7 @@ namespace RomCheater
 
         private void Main_Load(object sender, EventArgs e)
         {
-            SettingSubscriber.AddSubscriber(this, Settings.Default); 
+            SettingsSubscriber.SaveSettings();
         }
 
         private void mnuItemConfig_Click(object sender, EventArgs e)
@@ -588,6 +591,7 @@ namespace RomCheater
         }
         private void Main_FormClosing(object sender, FormClosingEventArgs e)
         {
+            SettingsSubscriber.SaveSettings();
             string configFile = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "DockPanel.config");
             if (m_bSaveLayout)
                 dockPanel.SaveAsXml(configFile);