/[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	2012/06/09 21:52:44	355
+++ trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2012/06/09 22:23:15	356
@@ -994,8 +994,8 @@
             e.Result = st;
             //List<ResultType<object>> tmp_Results = new List<ResultType<object>>();
             List<ResultType<object>> second_tmp_Results = new List<ResultType<object>>();
-            //const double _UPDATE_DELAY = 1024.0;
-            ////int UPDATE_DELAY = (int)(_UPDATE_DELAY / 1000);
+            const double _UPDATE_DELAY = 1024.0;
+            int UPDATE_DELAY = (int)(_UPDATE_DELAY / 1000);
             //int UPDATE_DELAY = 1;
             //tmp_Results = SearchArgs.Results.GetRange(0,SearchArgs.Results.Count);
             //SearchArgs.Results = null;
@@ -1046,13 +1046,13 @@
                     SearchArgs.Results.Add(_tmp_result);
                     double double_percent_done = 100.0 * (double)((double)i / (double)r_ms.BaseStream.Length);
                     int int_percent_done = (int)double_percent_done;
-                    //if ((i / UPDATE_DELAY) == (int)(i / UPDATE_DELAY) && int_percent_done != Last_Whole_Percent_Done)
-                    //{
-                    resultsprogress.Value = int_percent_done;
-                    resultsprogress.Message = string.Format(" -> Reading Address: 0x{0:x8}", i);
-                    Last_Whole_Percent_Done = int_percent_done;
-                    Application.DoEvents();
-                    //}
+                    if ((i / UPDATE_DELAY) == (int)(i / UPDATE_DELAY) && int_percent_done != Last_Whole_Percent_Done)
+                    {
+                        resultsprogress.Value = int_percent_done;
+                        resultsprogress.Message = string.Format(" -> Reading Address: 0x{0:x8}", i);
+                        Last_Whole_Percent_Done = int_percent_done;
+                        Application.DoEvents();
+                    }
 
                     if (SearchWorkerThread.CancellationPending == true)
                     {
@@ -1309,13 +1309,13 @@
 
                         double double_percent_done = 100.0 * (double)((double)i / (double)SearchArgs.Results.Count);
                         int int_percent_done = (int)double_percent_done;
-                        //if ((i / UPDATE_DELAY) == (int)(i / UPDATE_DELAY) && int_percent_done != Last_Whole_Percent_Done)
-                        //{
-                        resultsprogress.Value = int_percent_done;
-                        resultsprogress.Message = string.Format(" -> Reading Address: 0x{0:x8}", i);
-                        Last_Whole_Percent_Done = int_percent_done;
-                        Application.DoEvents();
-                        //}
+                        if ((i / UPDATE_DELAY) == (int)(i / UPDATE_DELAY) && int_percent_done != Last_Whole_Percent_Done)
+                        {
+                            resultsprogress.Value = int_percent_done;
+                            resultsprogress.Message = string.Format(" -> Reading Address: 0x{0:x8}", i);
+                            Last_Whole_Percent_Done = int_percent_done;
+                            Application.DoEvents();
+                        }
 
                     }
                     #endregion
@@ -1330,7 +1330,7 @@
                     end = SearchArgs.CompareEndValue;
                     for (int i = 0; i < SearchArgs.Results.Count; i += 1)
                     {
-                        //r_ms.BaseStream.Seek(SearchArgs.Results[i].Address, SeekOrigin.Begin);
+                        r_ms.BaseStream.Seek(SearchArgs.Results[i].Address, SeekOrigin.Begin);
                         if (SearchArgs.CompareType == SearchCompareTypes.Between)
                         {
                             InRangeComparer comparer = new InRangeComparer(SearchArgs.Results[i].Address, 0);
@@ -1357,13 +1357,13 @@
                         }
                         double double_percent_done = 100.0 * (double)((double)i / (double)SearchArgs.Results.Count);
                         int int_percent_done = (int)double_percent_done;
-                        //if ((i / UPDATE_DELAY) == (int)(i / UPDATE_DELAY) && int_percent_done != Last_Whole_Percent_Done)
-                        //{
-                        resultsprogress.Value = int_percent_done;
-                        resultsprogress.Message = string.Format(" -> Reading Address: 0x{0:x8}", i);
-                        Last_Whole_Percent_Done = int_percent_done;
-                        Application.DoEvents();
-                        //}
+                        if ((i / UPDATE_DELAY) == (int)(i / UPDATE_DELAY) && int_percent_done != Last_Whole_Percent_Done)
+                        {
+                            resultsprogress.Value = int_percent_done;
+                            resultsprogress.Message = string.Format(" -> Reading Address: 0x{0:x8}", i);
+                            Last_Whole_Percent_Done = int_percent_done;
+                            Application.DoEvents();
+                        }
                     }
                 }
 #endif

 

  ViewVC Help
Powered by ViewVC 1.1.22