Parent Directory
|
Revision Log
|
Patch
--- trunk/RomCheater/Docking/MemorySearch/SearchType.cs 2014/04/15 14:30:48 811 +++ trunk/RomCheater/Docking/MemorySearch/SearchType.cs 2014/04/15 14:52:10 812 @@ -18,6 +18,7 @@ using Utilities.TransparentControls; using RomCheater.Logging; using RomCheater.Core; +using Enterprise.Logging; namespace RomCheater.Docking.MemorySearch { @@ -149,25 +150,25 @@ //StringBuilder builder = new StringBuilder(); - logger.Info.WriteLine("Current Search Options:"); + gLog.Info.WriteLine("Current Search Options:"); int size = 0; BitTools.SizeOf(this.DataType, out size); // write Data type if (size == 1) { - logger.Info.WriteLine("Data Type: {0} [{1} byte]", Enum.GetName(typeof(SearchDataTypes), this.DataType), size); + gLog.Info.WriteLine("Data Type: {0} [{1} byte]", Enum.GetName(typeof(SearchDataTypes), this.DataType), size); } else - logger.Info.WriteLine("Data Type: {0} [{1} bytes]", Enum.GetName(typeof(SearchDataTypes), this.DataType), size); + gLog.Info.WriteLine("Data Type: {0} [{1} bytes]", Enum.GetName(typeof(SearchDataTypes), this.DataType), size); { } // write Signed/Unsigned - if (this.IsUnsignedDataType) { logger.Info.WriteLine("Signed/Unsigned: {0}", "Unsigned"); } - else { logger.Info.WriteLine("Signed/Unsigned: {0}", "Signed"); } + if (this.IsUnsignedDataType) { gLog.Info.WriteLine("Signed/Unsigned: {0}", "Unsigned"); } + else { gLog.Info.WriteLine("Signed/Unsigned: {0}", "Signed"); } // Write Compare Type - logger.Info.WriteLine("Comparison Type: {0}", Enum.GetName(typeof(SearchCompareTypes), this.CompareType)); + gLog.Info.WriteLine("Comparison Type: {0}", Enum.GetName(typeof(SearchCompareTypes), this.CompareType)); // Write Compare Value Tupe - logger.Info.WriteLine("Comparison Value Type: {0}", Enum.GetName(typeof(CompareValueTypes), this.CompareValueType)); + gLog.Info.WriteLine("Comparison Value Type: {0}", Enum.GetName(typeof(CompareValueTypes), this.CompareValueType)); // Write Value if (this.CompareType != SearchCompareTypes.Between && this.CompareType != SearchCompareTypes.NotBetween) { @@ -177,27 +178,27 @@ switch (this.DataType) { case SearchDataTypes._8bits: - 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")); } + if (this.IsUnsignedDataType) { gLog.Info.WriteLine("Comparison Value: 0x{0}", Convert.ToByte(this.CompareStartValue).ToString("x2")); } + else { gLog.Info.WriteLine("Comparison Value: 0x{0}", Convert.ToSByte(this.CompareStartValue).ToString("x2")); } break; case SearchDataTypes._16bits: - 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")); } + if (this.IsUnsignedDataType) { gLog.Info.WriteLine("Comparison Value: 0x{0}", Convert.ToUInt16(this.CompareStartValue).ToString("x4")); } + else { gLog.Info.WriteLine("Comparison Value: 0x{0}", Convert.ToInt16(this.CompareStartValue).ToString("x4")); } break; case SearchDataTypes._32bits: - 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")); } + if (this.IsUnsignedDataType) { gLog.Info.WriteLine("Comparison Value: 0x{0}", Convert.ToUInt32(this.CompareStartValue).ToString("x8")); } + else { gLog.Info.WriteLine("Comparison Value: 0x{0}", Convert.ToInt32(this.CompareStartValue).ToString("x8")); } break; case SearchDataTypes._64bits: - 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")); } + if (this.IsUnsignedDataType) { gLog.Info.WriteLine("Comparison Value: 0x{0}", Convert.ToUInt64(this.CompareStartValue).ToString("x16")); } + else { gLog.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 { - logger.Info.WriteLine("Comparison Value: {0}\n", "ignored"); + gLog.Info.WriteLine("Comparison Value: {0}\n", "ignored"); } #endregion } @@ -207,20 +208,20 @@ switch (this.DataType) { case SearchDataTypes._8bits: - 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)); } + if (this.IsUnsignedDataType) { gLog.Info.WriteLine("Comparison Range: 0x{0:x2} to 0x{1:x2}", Convert.ToByte(this.CompareStartValue), Convert.ToByte(this.CompareEndValue)); } + else { gLog.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) { 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)); } + if (this.IsUnsignedDataType) { gLog.Info.WriteLine("CComparison Range: 0x{0:x2} to 0x{1:x4}", Convert.ToUInt16(this.CompareStartValue), Convert.ToUInt16(this.CompareEndValue)); } + else { gLog.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) { 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)); } + if (this.IsUnsignedDataType) { gLog.Info.WriteLine("Comparison Range: 0x{0:x8} to 0x{1:x8}", Convert.ToUInt32(this.CompareStartValue), Convert.ToUInt32(this.CompareEndValue)); } + else { gLog.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) { 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)); } + if (this.IsUnsignedDataType) { gLog.Info.WriteLine("Comparison Range: 0x{0:x16} to 0x{1:x16}", Convert.ToUInt64(this.CompareStartValue), Convert.ToUInt64(this.CompareEndValue)); } + else { gLog.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."); }
ViewVC Help | |
Powered by ViewVC 1.1.22 |