/[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/04 23:40:45	512
+++ trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2013/06/05 00:46:53	513
@@ -1431,6 +1431,7 @@
                 SearchResultWriter writer = (e.UserState as SearchResultWriter);
                 if (writer == null)
                     throw new InvalidOperationException("writer cannot be null");
+
                 using (MemoryStream ms = new MemoryStream(e.Data))
                 {
                     using (BinaryReader br = new BinaryReader(ms))
@@ -1737,29 +1738,32 @@
                                 if (SearchWorkerThread.CancellationPending) { e.Canceled = true; return; }
                             }
                             catch (EndOfStreamException) { }
+
                             if (e.ReportProgress)
                             {
                                 double double_percent_done = 100.0 * (double)((double)CurrentIndex / (double)e.TotalCount);
                                 int int_percent_done = (int)double_percent_done;
 
-                                int align_base = 1000;
-                                int align_magnitude = 1;
-                                int alignment = align_base * align_magnitude;
-                                if (int_percent_done != Last_Whole_Percent_Done && (CurrentIndex % alignment) == 0)
-                                {
-                                    if (int_percent_done <= 100)
-                                    {
-                                        new Action<int, string>(UpdateProgress).Invoke(int_percent_done, string.Format(" -> Reading Address: 0x{0:x8}", (CurrentIndex + MemoryRangeStart)));
-                                        Last_Whole_Percent_Done = int_percent_done;
-                                    }
-                                    if (SearchWorkerThread.CancellationPending) { e.Canceled = true; return; }
-                                }
+                                //int align_base = 1000;
+                                //int align_magnitude = 1000;
+                                //int alignment = align_base * align_magnitude;
+                                //if (int_percent_done != Last_Whole_Percent_Done && (CurrentIndex % alignment) == 0)
+                                //{
+                                //    if (int_percent_done <= 100)
+                                //    {
+                                string message = string.Format(" -> Reading Address: 0x{0:x8}", (CurrentIndex + MemoryRangeStart));
+                                //        //UpdateProgress(int_percent_done, message);
+                                new Action<int, string>(UpdateProgress).Invoke(int_percent_done, message);
+                                //        Last_Whole_Percent_Done = int_percent_done;
+                                //    }
+                                if (SearchWorkerThread.CancellationPending) { e.Canceled = true; return; }
+                                //}
                             }
+
                             uint size = 0;
                             BitTools.SizeOf(sdt, out size);
                             CurrentIndex += size;                          
                         }
-                     
                     }
                 }
             }

 

  ViewVC Help
Powered by ViewVC 1.1.22