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

Diff of /trunk/RomCheater/RomCheaterConfigDialog.cs

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

--- trunk/RomCheater/RomCheaterConfigDialog.cs	2014/04/15 14:52:10	812
+++ trunk/RomCheater/RomCheaterConfigDialog.cs	2014/04/15 14:58:01	813
@@ -114,56 +114,52 @@
 
         private void load_loggerflags()
         {
-            gLog.Info.WriteLine("  Loading logger flags...");
-            object o_flags = LoggingettingsSubscriber.GetValue("LoggingFlags");
-            loggerflags logflags = (ushort)Convert.ChangeType(o_flags, typeof(ushort));
-            if (logflags != logger.GetLoggingFlags())
-            {
-                logflags = logger.GetLoggingFlags(); // we apparently have forced the logging flags (possible for testing)
-            }
+            //gLog.Info.WriteLine("  Loading logger flags...");
+            //object o_flags = LoggingettingsSubscriber.GetValue("LoggingFlags");
+            //loggerflags logflags = (ushort)Convert.ChangeType(o_flags, typeof(ushort));
+            //if (logflags != logger.GetLoggingFlags())
+            //{
+            //    logflags = logger.GetLoggingFlags(); // we apparently have forced the logging flags (possible for testing)
+            //}
 #if DISABLE_VERBOSE_DEBUG_MESSAGES_FOR_SPEED_BOOST
-            lFlags = logflags;
-            ushort pflags = lFlags.Value;
-            if (lFlags.HasFlag(loggerflags.VERBOSE_DEBUG))
-            {
-                pflags = lFlags.Value;
-                pflags = (ushort)(lFlags.Value & ~loggerflags.VERBOSE_DEBUG.Value);
-                logger.SetLoggingFlags(pflags);
-            }
+            //lFlags = logflags;
+            //ushort pflags = lFlags.Value;
+            //if (lFlags.HasFlag(loggerflags.VERBOSE_DEBUG))
+            //{
+            //    pflags = lFlags.Value;
+            //    pflags = (ushort)(lFlags.Value & ~loggerflags.VERBOSE_DEBUG.Value);
+            //    logger.SetLoggingFlags(pflags);
+            //}
 #endif
-            var logger_flags = loggerflags.GetValues();
+            //var logger_flags = loggerflags.GetValues();
 
-            foreach (loggerflags flags in logger_flags)
-            {
-                if (flags == loggerflags.ALL ||
-                    flags == loggerflags.NONE ||
-                    flags == loggerflags.DEFAULT)
-                    continue;
-
-                string name = flags.Name;
-                ushort value = (ushort)flags;
-
-                CheckBox chkloggerflags = new CheckBox();
-                chkloggerflags.Font = this.Font;
-                chkloggerflags.Name = name;
-                chkloggerflags.Text = name;
-                chkloggerflags.Tag = value;
-                Graphics g = chkloggerflags.CreateGraphics();
-
-                Size size = g.MeasureString(chkloggerflags.Text, chkloggerflags.Font).ToSize();
-                chkloggerflags.Width = size.Width + 25;
-
-                grpLoggingFlags_flow.Controls.Add(chkloggerflags);
-                logger.VerboseDebug.WriteLine("\tAdding logger flag: {0} value: 0x{1:x4}", name, value);
-                if (logflags.HasFlag(value))
-                {
-                    chkloggerflags.Checked = true;
-                    logger.VerboseDebug.WriteLine("\tTurning on logger flag: {0} value: 0x{1:x4}", name, value);
-                }
-            }
+            //foreach (loggerflags flags in logger_flags)
+            //{
+            //    if (flags == loggerflags.ALL ||
+            //        flags == loggerflags.NONE ||
+            //        flags == loggerflags.DEFAULT)
+            //        continue;
+            //    string name = flags.Name;
+            //    ushort value = (ushort)flags;
+            //    CheckBox chkloggerflags = new CheckBox();
+            //    chkloggerflags.Font = this.Font;
+            //    chkloggerflags.Name = name;
+            //    chkloggerflags.Text = name;
+            //    chkloggerflags.Tag = value;
+            //    Graphics g = chkloggerflags.CreateGraphics();
+            //    Size size = g.MeasureString(chkloggerflags.Text, chkloggerflags.Font).ToSize();
+            //    chkloggerflags.Width = size.Width + 25;
+            //    grpLoggingFlags_flow.Controls.Add(chkloggerflags);
+            //    logger.VerboseDebug.WriteLine("\tAdding logger flag: {0} value: 0x{1:x4}", name, value);
+            //    if (logflags.HasFlag(value))
+            //    {
+            //        chkloggerflags.Checked = true;
+            //        logger.VerboseDebug.WriteLine("\tTurning on logger flag: {0} value: 0x{1:x4}", name, value);
+            //    }
+            //}
             //grpLoggingFlags.AutoSize = true;
             //grpLoggingFlags.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
-            gLog.Info.WriteLine("  Loaded logger flags.");
+            //gLog.Info.WriteLine("  Loaded logger flags.");
         }
         private void btnSave_Click(object sender, EventArgs e)
         {
@@ -198,18 +194,18 @@
         }
         private void SaveLoggingFlags()
         {
-            gLog.Debug.WriteLine("Saving Logger flags...");
-            ushort logflags = loggerflags.NONE;
-            foreach (CheckBox cb in grpLoggingFlags_flow.Controls)
-            {
-                if (!cb.Checked) continue;
-                ushort value = Convert.ToUInt16(cb.Tag);
-                logflags = (ushort)(logflags | value);
-                gLog.Verbose.Debug.WriteLine("\tAdding flag: {0} value: 0x{1:x4} LoggingFlags=0x{2:x4}", cb.Text, value, (int)logflags);                
-            }
+            //gLog.Debug.WriteLine("Saving Logger flags...");
+            //ushort logflags = loggerflags.NONE;
+            //foreach (CheckBox cb in grpLoggingFlags_flow.Controls)
+            //{
+            //    if (!cb.Checked) continue;
+            //    ushort value = Convert.ToUInt16(cb.Tag);
+            //    logflags = (ushort)(logflags | value);
+            //    gLog.Verbose.Debug.WriteLine("\tAdding flag: {0} value: 0x{1:x4} LoggingFlags=0x{2:x4}", cb.Text, value, (int)logflags);                
+            //}
 
-            LoggingettingsSubscriber.SetValue("LoggingFlags", (ushort)logflags);
-            gLog.Debug.WriteLine("Saved Logger flags.");
+            //LoggingettingsSubscriber.SetValue("LoggingFlags", (ushort)logflags);
+            //gLog.Debug.WriteLine("Saved Logger flags.");
         }
 
         private void RomCheaterConfigDialog_FormClosing(object sender, FormClosingEventArgs e)

 

  ViewVC Help
Powered by ViewVC 1.1.22