/[RomCheater]/trunk/RomCheater/Docking/MemorySearch/SearchType.cs
ViewVC logotype

Diff of /trunk/RomCheater/Docking/MemorySearch/SearchType.cs

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

--- trunk/RomCheater/Docking/MemorySearch/SearchType.cs	2012/06/03 22:30:23	277
+++ trunk/RomCheater/Docking/MemorySearch/SearchType.cs	2012/06/05 15:40:48	317
@@ -125,18 +125,18 @@
         public void LogSearchOptions()
         {
 
-            StringBuilder builder = new StringBuilder();
+            //StringBuilder builder = new StringBuilder();
 
-            builder.AppendLine("Current Search Options:");
+            logger.Info.WriteLine("Current Search Options:");
             // write Data type
-            builder.AppendFormat("Data Type: {0}\n", Enum.GetName(typeof(SearchDataTypes), this.DataType));
+            logger.Info.WriteLine("Data Type: {0}", Enum.GetName(typeof(SearchDataTypes), this.DataType));
             // write Signed/Unsigned
-            if (this.IsUnsignedDataType) { builder.AppendFormat("Signed/Unsigned: {0}\n", "Unsigned"); }
-            else { builder.AppendFormat("Signed/Unsigned: {0}\n", "Signed"); }
+            if (this.IsUnsignedDataType) { logger.Info.WriteLine("Signed/Unsigned: {0}", "Unsigned"); }
+            else { logger.Info.WriteLine("Signed/Unsigned: {0}", "Signed"); }
             // Write Compare Type
-            builder.AppendFormat("Comparison Type: {0}\n", Enum.GetName(typeof(SearchCompareTypes), this.CompareType));
+            logger.Info.WriteLine("Comparison Type: {0}", Enum.GetName(typeof(SearchCompareTypes), this.CompareType));
             // Write Compare Value Tupe
-            builder.AppendFormat("Comparison Value Type: {0}\n", Enum.GetName(typeof(CompareValueTypes), this.CompareValueType));
+            logger.Info.WriteLine("Comparison Value Type: {0}", Enum.GetName(typeof(CompareValueTypes), this.CompareValueType));
             // Write Value
             if (this.CompareType != SearchCompareTypes.Between && this.CompareType != SearchCompareTypes.NotBetween)
             {
@@ -146,27 +146,27 @@
                     switch (this.DataType)
                     {
                         case SearchDataTypes._8bits:
-                            if (this.IsUnsignedDataType) { builder.AppendFormat("Comparison Value: 0x{0}\n", Convert.ToByte(this.CompareStartValue).ToString("x2")); }
-                            else { builder.AppendFormat("Comparison Value: 0x{0}\n", Convert.ToSByte(this.CompareStartValue).ToString("x2")); }
+                            if (this.IsUnsignedDataType) { logger.Info.WriteLine("Comparison Value: 0x{0}", Convert.ToByte(this.CompareStartValue).ToString("x2")); }
+                            else { logger.Info.WriteLine("Comparison Value: 0x{0}", Convert.ToSByte(this.CompareStartValue).ToString("x2")); }
                             break;
                         case SearchDataTypes._16bits:
-                            if (this.IsUnsignedDataType) { builder.AppendFormat("Comparison Value: 0x{0}\n", Convert.ToUInt16(this.CompareStartValue).ToString("x4")); }
-                            else { builder.AppendFormat("Comparison Value: 0x{0}\n", Convert.ToInt16(this.CompareStartValue).ToString("x4")); }
+                            if (this.IsUnsignedDataType) { logger.Info.WriteLine("Comparison Value: 0x{0}", Convert.ToUInt16(this.CompareStartValue).ToString("x4")); }
+                            else { logger.Info.WriteLine("Comparison Value: 0x{0}", Convert.ToInt16(this.CompareStartValue).ToString("x4")); }
                             break;
                         case SearchDataTypes._32bits:
-                            if (this.IsUnsignedDataType) { builder.AppendFormat("Comparison Value: 0x{0}\n", Convert.ToUInt32(this.CompareStartValue).ToString("x8")); }
-                            else { builder.AppendFormat("Comparison Value: 0x{0}\n", Convert.ToInt32(this.CompareStartValue).ToString("x8")); }
+                            if (this.IsUnsignedDataType) { logger.Info.WriteLine("Comparison Value: 0x{0}", Convert.ToUInt32(this.CompareStartValue).ToString("x8")); }
+                            else { logger.Info.WriteLine("Comparison Value: 0x{0}", Convert.ToInt32(this.CompareStartValue).ToString("x8")); }
                             break;
                         case SearchDataTypes._64bits:
-                            if (this.IsUnsignedDataType) { builder.AppendFormat("Comparison Value: 0x{0}\n", Convert.ToUInt64(this.CompareStartValue).ToString("x16")); }
-                            else { builder.AppendFormat("Comparison Value: 0x{0}\n", Convert.ToInt64(this.CompareStartValue).ToString("x16")); }
+                            if (this.IsUnsignedDataType) { logger.Info.WriteLine("Comparison Value: 0x{0}", Convert.ToUInt64(this.CompareStartValue).ToString("x16")); }
+                            else { logger.Info.WriteLine("Comparison Value: 0x{0}", Convert.ToInt64(this.CompareStartValue).ToString("x16")); }
                             break;
                         default: throw new InvalidOperationException("In SearchType(): Encounterd an Unkown Search Data Type.");
                     }
                 }
                 else
                 {
-                    builder.AppendFormat("Comparison Value: {0}\n", "ignored");
+                    logger.Info.WriteLine("Comparison Value: {0}\n", "ignored");
                 }
                 #endregion
             }
@@ -176,27 +176,27 @@
                 switch (this.DataType)
                 {
                     case SearchDataTypes._8bits:
-                        if (this.IsUnsignedDataType) { builder.AppendFormat("Comparison Range: 0x{0:x2} to 0x{1:x2}\n", Convert.ToByte(this.CompareStartValue), Convert.ToByte(this.CompareEndValue)); }
-                        else { builder.AppendFormat("Comparison Range: 0x{0:x2} to 0x{1:x2}\n", Convert.ToSByte(this.CompareStartValue), Convert.ToSByte(this.CompareEndValue)); }
+                        if (this.IsUnsignedDataType) { logger.Info.WriteLine("Comparison Range: 0x{0:x2} to 0x{1:x2}", Convert.ToByte(this.CompareStartValue), Convert.ToByte(this.CompareEndValue)); }
+                        else { logger.Info.WriteLine("Comparison Range: 0x{0:x2} to 0x{1:x2}", Convert.ToSByte(this.CompareStartValue), Convert.ToSByte(this.CompareEndValue)); }
                         break;
                     case SearchDataTypes._16bits:
-                        if (this.IsUnsignedDataType) { builder.AppendFormat("CComparison Range: 0x{0:x2} to 0x{1:x4}\n", Convert.ToUInt16(this.CompareStartValue), Convert.ToUInt16(this.CompareEndValue)); }
-                        else { builder.AppendFormat("Comparison Range: 0x{0:x4} to 0x{1:x4}\n", Convert.ToInt16(this.CompareStartValue), Convert.ToUInt16(this.CompareEndValue)); }
+                        if (this.IsUnsignedDataType) { logger.Info.WriteLine("CComparison Range: 0x{0:x2} to 0x{1:x4}", Convert.ToUInt16(this.CompareStartValue), Convert.ToUInt16(this.CompareEndValue)); }
+                        else { logger.Info.WriteLine("Comparison Range: 0x{0:x4} to 0x{1:x4}", Convert.ToInt16(this.CompareStartValue), Convert.ToUInt16(this.CompareEndValue)); }
                         break;
                     case SearchDataTypes._32bits:
-                        if (this.IsUnsignedDataType) { builder.AppendFormat("Comparison Range: 0x{0:x8} to 0x{1:x8}\n", Convert.ToUInt32(this.CompareStartValue), Convert.ToUInt32(this.CompareEndValue)); }
-                        else { builder.AppendFormat("Comparison Range: 0x{0:x8} to 0x{1:x8}\n", Convert.ToInt32(this.CompareStartValue), Convert.ToInt32(this.CompareEndValue)); }
+                        if (this.IsUnsignedDataType) { logger.Info.WriteLine("Comparison Range: 0x{0:x8} to 0x{1:x8}", Convert.ToUInt32(this.CompareStartValue), Convert.ToUInt32(this.CompareEndValue)); }
+                        else { logger.Info.WriteLine("Comparison Range: 0x{0:x8} to 0x{1:x8}", Convert.ToInt32(this.CompareStartValue), Convert.ToInt32(this.CompareEndValue)); }
                         break;
                     case SearchDataTypes._64bits:
-                        if (this.IsUnsignedDataType) { builder.AppendFormat("Comparison Range: 0x{0:x16} to 0x{1:x16}\n", Convert.ToUInt64(this.CompareStartValue), Convert.ToUInt64(this.CompareEndValue)); }
-                        else { builder.AppendFormat("Comparison Range: 0x{0:x16} to 0x{1:x16}\n", Convert.ToInt64(this.CompareStartValue), Convert.ToInt64(this.CompareEndValue)); }
+                        if (this.IsUnsignedDataType) { logger.Info.WriteLine("Comparison Range: 0x{0:x16} to 0x{1:x16}", Convert.ToUInt64(this.CompareStartValue), Convert.ToUInt64(this.CompareEndValue)); }
+                        else { logger.Info.WriteLine("Comparison Range: 0x{0:x16} to 0x{1:x16}", Convert.ToInt64(this.CompareStartValue), Convert.ToInt64(this.CompareEndValue)); }
                         break;
                     default: throw new InvalidOperationException("In SearchType(): Encounterd an Unkown Search Data Type.");
                 }
                 #endregion
             }
 
-            logger.Info.WriteLine(builder.ToString());
+            //logger.Info.WriteLine(builder.ToString());
         }
         #endregion
 

 

  ViewVC Help
Powered by ViewVC 1.1.22