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

Comparing trunk/RomCheater/RomCheaterConfigDialog.cs (file contents):
Revision 268 by william, Sun Jun 3 19:51:54 2012 UTC vs.
Revision 269 by william, Sun Jun 3 20:40:36 2012 UTC

--- trunk/RomCheater/RomCheaterConfigDialog.cs	2012/06/03 19:53:43	268
+++ trunk/RomCheater/RomCheaterConfigDialog.cs	2012/06/03 20:40:36	269
@@ -14,10 +14,21 @@ namespace RomCheater
 {
     public partial class RomCheaterConfigDialog : Form
     {
+        private loggerflags lFlags;
+
         private PluginLoader loader = null;
         public RomCheaterConfigDialog()
         {
             InitializeComponent();
+            lFlags = logger.GetLoggingFlags();
+            ushort flags = lFlags.Value;
+            if (lFlags.HasFlag(loggerflags.VERBOSE_DEBUG))
+            {
+                flags = lFlags.Value;
+                flags = (ushort)(lFlags.Value & ~loggerflags.VERBOSE_DEBUG.Value);
+                logger.SetLoggingFlags(flags);
+                
+            }
         }
         public RomCheaterConfigDialog(PluginLoader loader) : this()
         {
@@ -161,5 +172,10 @@ namespace RomCheater
             Logging.Properties.Settings.Default.LoggingFlags = (ushort)logflags;
             logger.Debug.WriteLine("Saved Logger flags.");
         }
+
+        private void RomCheaterConfigDialog_FormClosing(object sender, FormClosingEventArgs e)
+        {
+            logger.SetLoggingFlags(lFlags);
+        }
     }
 }