/[RomCheater]/trunk/RomCheater/Docking/FloatingMemorySearcher.cs
ViewVC logotype

Diff of /trunk/RomCheater/Docking/FloatingMemorySearcher.cs

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

--- trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2013/06/05 23:19:19	547
+++ trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2013/06/05 23:23:33	548
@@ -1552,6 +1552,10 @@
                                                 foreach (var Value in t_data)
                                                 {
                                                     if (SearchWorkerThread.CancellationPending) { break; }
+                                                    if (!reader.ContainsAddress(address_index, SearchArgs.IsUnsignedDataType, SearchArgs.DataType, new Action<int, string>(UpdateProgress), new Func<bool>(ShouldCancelAnySearchOperation)))
+                                                    {
+                                                        continue;
+                                                    }
                                                     using (_8bit_unsigned_comparer_ comparer = new _8bit_unsigned_comparer_(SearchArgs, address_index))
                                                     {
                                                         byte value = 0;
@@ -1579,10 +1583,7 @@
                                                         }
                                                         if (comparer.Compare(Convert.ToByte(Value), value))
                                                         {
-                                                            if (reader.ContainsAddress(comparer.Address, SearchArgs.IsUnsignedDataType, SearchArgs.DataType, new Action<int, string>(UpdateProgress), new Func<bool>(ShouldCancelAnySearchOperation)))
-                                                            {
-                                                                writer.WriteResult<byte>(comparer.Address, comparer.Value);
-                                                            }                                                            
+                                                            writer.WriteResult<byte>(comparer.Address, comparer.Value);                                                           
                                                         }
                                                     }
                                                     address_index += STEP_SIZE;
@@ -1596,6 +1597,10 @@
                                                 foreach (var Value in t_data)
                                                 {
                                                     if (SearchWorkerThread.CancellationPending) { break; }
+                                                    if (!reader.ContainsAddress(address_index, SearchArgs.IsUnsignedDataType, SearchArgs.DataType, new Action<int, string>(UpdateProgress), new Func<bool>(ShouldCancelAnySearchOperation)))
+                                                    {
+                                                        continue;
+                                                    }
                                                     using (_8bit_signed_comparer_ comparer = new _8bit_signed_comparer_(SearchArgs, address_index))
                                                     {
                                                         sbyte value = 0;
@@ -1623,10 +1628,7 @@
                                                         }
                                                         if (comparer.Compare(Convert.ToSByte(Value), value))
                                                         {
-                                                            if (reader.ContainsAddress(comparer.Address, SearchArgs.IsUnsignedDataType, SearchArgs.DataType, new Action<int, string>(UpdateProgress), new Func<bool>(ShouldCancelAnySearchOperation)))
-                                                            {
-                                                                writer.WriteResult<sbyte>(comparer.Address, comparer.Value);
-                                                            }
+                                                            writer.WriteResult<sbyte>(comparer.Address, comparer.Value);
                                                         }
                                                     }
                                                     address_index += STEP_SIZE;
@@ -1641,6 +1643,10 @@
                                                 foreach (var Value in t_data)
                                                 {
                                                     if (SearchWorkerThread.CancellationPending) { break; }
+                                                    if (!reader.ContainsAddress(address_index, SearchArgs.IsUnsignedDataType, SearchArgs.DataType, new Action<int, string>(UpdateProgress), new Func<bool>(ShouldCancelAnySearchOperation)))
+                                                    {
+                                                        continue;
+                                                    }
                                                     using (_16bit_unsigned_comparer_ comparer = new _16bit_unsigned_comparer_(SearchArgs, address_index))
                                                     {
                                                         ushort value = 0;
@@ -1668,10 +1674,7 @@
                                                         }
                                                         if (comparer.Compare(Convert.ToUInt16(Value), value))
                                                         {
-                                                            if (reader.ContainsAddress(comparer.Address, SearchArgs.IsUnsignedDataType, SearchArgs.DataType, new Action<int, string>(UpdateProgress), new Func<bool>(ShouldCancelAnySearchOperation)))
-                                                            {
-                                                                writer.WriteResult<ushort>(comparer.Address, comparer.Value);
-                                                            }
+                                                            writer.WriteResult<ushort>(comparer.Address, comparer.Value);
                                                         }
                                                     }
                                                     address_index += STEP_SIZE;
@@ -1685,6 +1688,10 @@
                                                 foreach (var Value in t_data)
                                                 {
                                                     if (SearchWorkerThread.CancellationPending) { break; }
+                                                    if (!reader.ContainsAddress(address_index, SearchArgs.IsUnsignedDataType, SearchArgs.DataType, new Action<int, string>(UpdateProgress), new Func<bool>(ShouldCancelAnySearchOperation)))
+                                                    {
+                                                        continue;
+                                                    }
                                                     using (_16bit_signed_comparer_ comparer = new _16bit_signed_comparer_(SearchArgs, address_index))
                                                     {
                                                         short value = 0;
@@ -1712,10 +1719,7 @@
                                                         }
                                                         if (comparer.Compare(Convert.ToSByte(Value), value))
                                                         {
-                                                            if (reader.ContainsAddress(comparer.Address, SearchArgs.IsUnsignedDataType, SearchArgs.DataType, new Action<int, string>(UpdateProgress), new Func<bool>(ShouldCancelAnySearchOperation)))
-                                                            {
-                                                                writer.WriteResult<short>(comparer.Address, comparer.Value);
-                                                            }
+                                                            writer.WriteResult<short>(comparer.Address, comparer.Value);
                                                         }
                                                     }
                                                     address_index += STEP_SIZE;
@@ -1730,6 +1734,10 @@
                                                 foreach (var Value in t_data)
                                                 {
                                                     if (SearchWorkerThread.CancellationPending) { break; }
+                                                    if (!reader.ContainsAddress(address_index, SearchArgs.IsUnsignedDataType, SearchArgs.DataType, new Action<int, string>(UpdateProgress), new Func<bool>(ShouldCancelAnySearchOperation)))
+                                                    {
+                                                        continue;
+                                                    }
                                                     using (_32bit_unsigned_comparer_ comparer = new _32bit_unsigned_comparer_(SearchArgs, address_index))
                                                     {
                                                         uint value = 0;
@@ -1757,10 +1765,7 @@
                                                         }
                                                         if (comparer.Compare(Convert.ToUInt32(Value), value))
                                                         {
-                                                            if (reader.ContainsAddress(comparer.Address, SearchArgs.IsUnsignedDataType, SearchArgs.DataType, new Action<int, string>(UpdateProgress), new Func<bool>(ShouldCancelAnySearchOperation)))
-                                                            {
-                                                                writer.WriteResult<uint>(comparer.Address, comparer.Value);
-                                                            }
+                                                            writer.WriteResult<uint>(comparer.Address, comparer.Value);
                                                         }
                                                     }
                                                     address_index += STEP_SIZE;
@@ -1774,6 +1779,10 @@
                                                 foreach (var Value in t_data)
                                                 {
                                                     if (SearchWorkerThread.CancellationPending) { break; }
+                                                    if (!reader.ContainsAddress(address_index, SearchArgs.IsUnsignedDataType, SearchArgs.DataType, new Action<int, string>(UpdateProgress), new Func<bool>(ShouldCancelAnySearchOperation)))
+                                                    {
+                                                        continue;
+                                                    }
                                                     using (_32bit_signed_comparer_ comparer = new _32bit_signed_comparer_(SearchArgs, address_index))
                                                     {
                                                         int value = 0;
@@ -1801,10 +1810,7 @@
                                                         }
                                                         if (comparer.Compare(Convert.ToInt32(Value), value))
                                                         {
-                                                            if (reader.ContainsAddress(comparer.Address, SearchArgs.IsUnsignedDataType, SearchArgs.DataType, new Action<int, string>(UpdateProgress), new Func<bool>(ShouldCancelAnySearchOperation)))
-                                                            {
-                                                                writer.WriteResult<int>(comparer.Address, comparer.Value);
-                                                            }
+                                                            writer.WriteResult<int>(comparer.Address, comparer.Value);
                                                         }
                                                     }
                                                     address_index += STEP_SIZE;
@@ -1819,6 +1825,10 @@
                                                 foreach (var Value in t_data)
                                                 {
                                                     if (SearchWorkerThread.CancellationPending) { break; }
+                                                    if (!reader.ContainsAddress(address_index, SearchArgs.IsUnsignedDataType, SearchArgs.DataType, new Action<int, string>(UpdateProgress), new Func<bool>(ShouldCancelAnySearchOperation)))
+                                                    {
+                                                        continue;
+                                                    }
                                                     using (_64bit_unsigned_comparer_ comparer = new _64bit_unsigned_comparer_(SearchArgs, address_index))
                                                     {
                                                         ulong value = 0;
@@ -1846,10 +1856,7 @@
                                                         }
                                                         if (comparer.Compare(Convert.ToUInt64(Value), value))
                                                         {
-                                                            if (reader.ContainsAddress(comparer.Address, SearchArgs.IsUnsignedDataType, SearchArgs.DataType, new Action<int, string>(UpdateProgress), new Func<bool>(ShouldCancelAnySearchOperation)))
-                                                            {
-                                                                writer.WriteResult<ulong>(comparer.Address, comparer.Value);
-                                                            }
+                                                            writer.WriteResult<ulong>(comparer.Address, comparer.Value);
                                                         }
                                                     }
                                                     address_index += STEP_SIZE;
@@ -1863,6 +1870,10 @@
                                                 foreach (var Value in t_data)
                                                 {
                                                     if (SearchWorkerThread.CancellationPending) { break; }
+                                                    if (!reader.ContainsAddress(address_index, SearchArgs.IsUnsignedDataType, SearchArgs.DataType, new Action<int, string>(UpdateProgress), new Func<bool>(ShouldCancelAnySearchOperation)))
+                                                    {
+                                                        continue;
+                                                    }
                                                     using (_64bit_signed_comparer_ comparer = new _64bit_signed_comparer_(SearchArgs, address_index))
                                                     {
                                                         long value = 0;
@@ -1890,10 +1901,7 @@
                                                         }
                                                         if (comparer.Compare(Convert.ToInt64(Value), value))
                                                         {
-                                                            if (reader.ContainsAddress(comparer.Address, SearchArgs.IsUnsignedDataType, SearchArgs.DataType, new Action<int, string>(UpdateProgress), new Func<bool>(ShouldCancelAnySearchOperation)))
-                                                            {
-                                                                writer.WriteResult<long>(comparer.Address, comparer.Value);
-                                                            }
+                                                            writer.WriteResult<long>(comparer.Address, comparer.Value);
                                                         }
                                                     }
                                                     address_index += STEP_SIZE;

 

  ViewVC Help
Powered by ViewVC 1.1.22