/[RomCheater]/trunk/RomCheater/Docking/MemorySearch/AddressValuePairList.cs
ViewVC logotype

Diff of /trunk/RomCheater/Docking/MemorySearch/AddressValuePairList.cs

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

revision 243 by william, Sun Jun 3 13:21:51 2012 UTC revision 414 by william, Fri Jun 22 08:21:18 2012 UTC
# Line 1  Line 1 
1  ´╗┐using System;  ´╗┐#region Logging Defines
2    // include this any class or method that required logging, and comment-out what is not needed
3    #define LOGGING_ENABLED
4    #region Enabled logging levels
5    #define LOGGING_ENABLE_INFO
6    #define LOGGING_ENABLE_WARN
7    #define LOGGING_ENABLE_DEBUG
8    #define LOGGING_ENABLE_VERBOSEDEBUG
9    #define LOGGING_ENABLE_ERROR
10    #define LOGGING_ENABLE_VERBOSEERROR
11    #define LOGGING_ENABLE_PROFILER
12    #endregion
13    #endregion
14    using System;
15  using System.Collections.Generic;  using System.Collections.Generic;
16  using System.ComponentModel;  using System.ComponentModel;
17  using System.Drawing;  using System.Drawing;
# Line 483  namespace System.Windows.Forms Line 496  namespace System.Windows.Forms
496                  {                  {
497                      iter = (ResultItem)this.Items[index];                      iter = (ResultItem)this.Items[index];
498                  }                  }
499                  GenericMemoryProvider provider = new GenericMemoryProvider((IAcceptsProcessAndConfig)this);                              using (GenericMemoryProvider provider = new GenericMemoryProvider((IAcceptsProcessAndConfig)this))
500                  ResultDataType result = (ResultDataType)iter.Tag;                  {
501                  uint Address = result.Address;                      provider.OpenProvider();
502                  byte[] bitData = new byte[] { };                      ResultDataType result = (ResultDataType)iter.Tag;
503                  switch (result.ValueType)                      uint Address = result.Address;
504                  {                      byte[] bitData = new byte[] { };
505                      case SearchDataTypes._8bits:                      switch (result.ValueType)
506                          if (result.IsUnsigned) { provider.PatchMemory(Address, Convert.ToByte(result.Value)); }                      {
507                          else { provider.PatchMemory(Address, Convert.ToSByte(result.Value)); }                          case SearchDataTypes._8bits:
508                          break;                              if (result.IsUnsigned) { provider.PatchMemory(Address, Convert.ToByte(result.Value)); }
509                      case SearchDataTypes._16bits:                              else { provider.PatchMemory(Address, Convert.ToSByte(result.Value)); }
510                          if (result.IsUnsigned) { provider.PatchMemory(Address, Convert.ToUInt16(result.Value)); }                              break;
511                          else { provider.PatchMemory(Address, Convert.ToInt16(result.Value)); }                          case SearchDataTypes._16bits:
512                          break;                              if (result.IsUnsigned) { provider.PatchMemory(Address, Convert.ToUInt16(result.Value)); }
513                      case SearchDataTypes._32bits:                              else { provider.PatchMemory(Address, Convert.ToInt16(result.Value)); }
514                          if (result.IsUnsigned) { provider.PatchMemory(Address, Convert.ToUInt32(result.Value)); }                              break;
515                          else { provider.PatchMemory(Address, Convert.ToInt32(result.Value)); }                          case SearchDataTypes._32bits:
516                          break;                              if (result.IsUnsigned) { provider.PatchMemory(Address, Convert.ToUInt32(result.Value)); }
517                      case SearchDataTypes._64bits:                              else { provider.PatchMemory(Address, Convert.ToInt32(result.Value)); }
518                          if (result.IsUnsigned) { provider.PatchMemory(Address, Convert.ToUInt64(result.Value)); }                              break;
519                          else { provider.PatchMemory(Address, Convert.ToInt64(result.Value)); }                          case SearchDataTypes._64bits:
520                          break;                              if (result.IsUnsigned) { provider.PatchMemory(Address, Convert.ToUInt64(result.Value)); }
521                                else { provider.PatchMemory(Address, Convert.ToInt64(result.Value)); }
522                                break;
523                        }
524                        result = null;
525                        provider.CloseProvider();
526                  }                  }
527              }              }
528          }          }

Legend:
Removed from v.243  
changed lines
  Added in v.414

  ViewVC Help
Powered by ViewVC 1.1.22