/[RomCheater]/trunk/RomCheater/Serialization/SearchResultReader.cs
ViewVC logotype

Diff of /trunk/RomCheater/Serialization/SearchResultReader.cs

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

revision 811 by william, Mon Jun 17 09:31:52 2013 UTC revision 812 by william, Tue Apr 15 14:52:10 2014 UTC
# Line 26  using System.Windows.Forms; Line 26  using System.Windows.Forms;
26  using RomCheater.Core;  using RomCheater.Core;
27  using System.Diagnostics;  using System.Diagnostics;
28  using System.Collections;  using System.Collections;
29    using Enterprise.Logging;
30    
31  namespace RomCheater.Serialization  namespace RomCheater.Serialization
32  {  {
# Line 321  namespace RomCheater.Serialization Line 322  namespace RomCheater.Serialization
322                  {                  {
323                      if (this.cancel_method.Invoke())                      if (this.cancel_method.Invoke())
324                      {                      {
325                          logger.Warn.WriteLine("UpdateResultValuesFromMemory - operation cancelled at [ResultIndex=0x{0} ChunkCount=0x{1}]", i.ToString("X"), results.Length.ToString("X"));                          gLog.Warn.WriteLine("UpdateResultValuesFromMemory - operation cancelled at [ResultIndex=0x{0} ChunkCount=0x{1}]", i.ToString("X"), results.Length.ToString("X"));
326                          break;                          break;
327                      }                      }
328                      ulong value = 0;                      ulong value = 0;
# Line 334  namespace RomCheater.Serialization Line 335  namespace RomCheater.Serialization
335                          case SearchDataTypes._64bits: value = BitConverter.ToUInt64(data, 0); break;                          case SearchDataTypes._64bits: value = BitConverter.ToUInt64(data, 0); break;
336                      }                      }
337                      results[i].Value = value;                      results[i].Value = value;
338                      logger.Profiler.WriteLine("UpdateResultValuesFromMemory [ResultIndex=0x{0} ChunkCount=0x{1}] has taken a total of {2} seconds to complete", i.ToString("X"), results.Length.ToString("X"), st.Elapsed.TotalSeconds.ToString());                      gLog.Profiler.WriteLine("UpdateResultValuesFromMemory [ResultIndex=0x{0} ChunkCount=0x{1}] has taken a total of {2} seconds to complete", i.ToString("X"), results.Length.ToString("X"), st.Elapsed.TotalSeconds.ToString());
339    
340    
341                      string message = string.Format(" -> Updateing values [ResultIndex=0x{0} of ChunkCount=0x{1}]", i.ToString("X"), results.Length.ToString("X"));                      string message = string.Format(" -> Updateing values [ResultIndex=0x{0} of ChunkCount=0x{1}]", i.ToString("X"), results.Length.ToString("X"));
# Line 345  namespace RomCheater.Serialization Line 346  namespace RomCheater.Serialization
346                      }                      }
347                  }                  }
348                  st.Stop();                  st.Stop();
349                  logger.Profiler.WriteLine("UpdateResultValuesFromMemory [ChunkCount=0x{0}] took a total of {1} seconds to complete", results.Length.ToString("X"), st.Elapsed.TotalSeconds.ToString());                  gLog.Profiler.WriteLine("UpdateResultValuesFromMemory [ChunkCount=0x{0}] took a total of {1} seconds to complete", results.Length.ToString("X"), st.Elapsed.TotalSeconds.ToString());
350              }              }
351          }          }
352    
# Line 492  namespace RomCheater.Serialization Line 493  namespace RomCheater.Serialization
493              }              }
494              catch (Exception ex)              catch (Exception ex)
495              {              {
496                  logger.Error.WriteLine("Failed to reader results...");                  gLog.Error.WriteLine("Failed to reader results...");
497                  logger.VerboseError.WriteLine(ex.ToString());                  gLog.Verbose.Error.WriteLine(ex.ToString());
498                  results =new StructResultType<ulong>[0];                  results =new StructResultType<ulong>[0];
499                  //results.TrimExcess();                  //results.TrimExcess();
500                  throw ex;                  throw ex;

Legend:
Removed from v.811  
changed lines
  Added in v.812

  ViewVC Help
Powered by ViewVC 1.1.22