/[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/03 04:34:39	463
+++ trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2013/06/03 04:42:38	464
@@ -1463,17 +1463,23 @@
                             Guid new_SearchGuid = new Guid(guid);
                             provider.OpenProvider();
                             //provider.OnBytesRead += new BaseEventHandler<OnBytesReadEventArgs>(search_provider_OnBytesRead);
+                            int count = 0;
+                            //int Last_Whole_Percent_Done = 0;
                             foreach (var item in reader.GetResults(SearchArgs.IsUnsignedDataType, SearchArgs.DataType, new Action<int, string>(UpdateProgress)))
                             {
                                 using (SearchResultWriter writer = new SearchResultWriter((int)(reader.ResultCount), new_SearchGuid))
                                 {
+                                    
                                     //provider.ReadProcessMemoryAtOnce(item.Address, STEP_SIZE, writer);
                                     int bytesRead =0;
                                     byte[] data = new byte[STEP_SIZE];
                                     provider.ReadProcessMemory(item.Address, STEP_SIZE, out bytesRead, out data);                                    
                                     new BaseEventHandler<OnBytesReadEventArgs>(search_provider_OnBytesRead).Invoke(new OnBytesReadEventArgs(this, writer, data, item.Address, (uint)reader.ResultCount));
 
+                                    double percent_done = 100.0 * ((double)count / (double)reader.ResultCount);
+                                    new Action<int, string>(UpdateProgress).Invoke((int)percent_done, string.Format(" -> Reading Address: 0x{0:x8}", item.Address));                                   
                                 }
+                                count++;
                             }
                             provider.CloseProvider();
                             SearchGuid = new_SearchGuid;

 

  ViewVC Help
Powered by ViewVC 1.1.22