/[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 230 by william, Sat Jun 2 19:12:20 2012 UTC revision 243 by william, Sun Jun 3 13:21:51 2012 UTC
# Line 10  using Utilities.TransparentControls.List Line 10  using Utilities.TransparentControls.List
10  using System.IO;  using System.IO;
11  using RomCheater.Logging;  using RomCheater.Logging;
12  using RomCheater.Docking.MemorySearch;  using RomCheater.Docking.MemorySearch;
13    using Sojaner.MemoryScanner.MemoryProviers;
14    using System.Diagnostics;
15    using RomCheater.PluginFramework.Interfaces;
16    
17  namespace System.Windows.Forms  namespace System.Windows.Forms
18  {  {
19      [Serializable]      [Serializable]
20      public partial class AddressValuePairList : dbufferedListView, IAvpExport, IAvpImport, IAvpLvSupport, IAvpLvColumnSupport, IAvpFreeze      public partial class AddressValuePairList :
21            dbufferedListView, IAvpExport, IAvpImport, IAvpLvSupport, IAvpLvColumnSupport, IAvpFreeze,
22            IAcceptsProcess<Process>,
23            IAcceptsPlugin<IConfigPlugin>
24      {      {
25            #region IAcceptsProcess<Process> Members
26            public Process AcceptedProcess { get; set; }
27            #endregion
28            #region IAcceptsPlugin<IConfigPlugin> Members
29            public IConfigPlugin AcceptedPlugin { get; set; }
30            #endregion
31    
32          public class AddressValuePairListSorter : System.Collections.IComparer          public class AddressValuePairListSorter : System.Collections.IComparer
33          {          {
# Line 147  namespace System.Windows.Forms Line 158  namespace System.Windows.Forms
158    
159              this.ColumnClick += new ColumnClickEventHandler(AddressValuePairList_ColumnClick);              this.ColumnClick += new ColumnClickEventHandler(AddressValuePairList_ColumnClick);
160    
161                this.AcceptedPlugin = null;
162                this.AcceptedProcess = null;
163    
164          }          }
165    
# Line 470  namespace System.Windows.Forms Line 483  namespace System.Windows.Forms
483                  {                  {
484                      iter = (ResultItem)this.Items[index];                      iter = (ResultItem)this.Items[index];
485                  }                  }
486                  Sojaner.MemoryScanner.ProcessMemoryReader writer = new Sojaner.MemoryScanner.ProcessMemoryReader();                                  GenericMemoryProvider provider = new GenericMemoryProvider((IAcceptsProcessAndConfig)this);            
487                  ResultDataType result = (ResultDataType)iter.Tag;                  ResultDataType result = (ResultDataType)iter.Tag;
488                  uint Address = result.Address;                  uint Address = result.Address;
489                  byte[] bitData = new byte[] { };                  byte[] bitData = new byte[] { };
490                  switch (result.ValueType)                  switch (result.ValueType)
491                  {                  {
492                      case SearchDataTypes._8bits:                      case SearchDataTypes._8bits:
493                          if (result.IsUnsigned) { writer.PatchMemory(Address, Convert.ToByte(result.Value)); }                          if (result.IsUnsigned) { provider.PatchMemory(Address, Convert.ToByte(result.Value)); }
494                          else { writer.PatchMemory(Address, Convert.ToSByte(result.Value)); }                          else { provider.PatchMemory(Address, Convert.ToSByte(result.Value)); }
495                          break;                          break;
496                      case SearchDataTypes._16bits:                      case SearchDataTypes._16bits:
497                          if (result.IsUnsigned) { writer.PatchMemory(Address, Convert.ToUInt16(result.Value)); }                          if (result.IsUnsigned) { provider.PatchMemory(Address, Convert.ToUInt16(result.Value)); }
498                          else { writer.PatchMemory(Address, Convert.ToInt16(result.Value)); }                          else { provider.PatchMemory(Address, Convert.ToInt16(result.Value)); }
499                          break;                          break;
500                      case SearchDataTypes._32bits:                      case SearchDataTypes._32bits:
501                          if (result.IsUnsigned) { writer.PatchMemory(Address, Convert.ToUInt32(result.Value)); }                          if (result.IsUnsigned) { provider.PatchMemory(Address, Convert.ToUInt32(result.Value)); }
502                          else { writer.PatchMemory(Address, Convert.ToInt32(result.Value)); }                          else { provider.PatchMemory(Address, Convert.ToInt32(result.Value)); }
503                          break;                          break;
504                      case SearchDataTypes._64bits:                      case SearchDataTypes._64bits:
505                          if (result.IsUnsigned) { writer.PatchMemory(Address, Convert.ToUInt64(result.Value)); }                          if (result.IsUnsigned) { provider.PatchMemory(Address, Convert.ToUInt64(result.Value)); }
506                          else { writer.PatchMemory(Address, Convert.ToInt64(result.Value)); }                          else { provider.PatchMemory(Address, Convert.ToInt64(result.Value)); }
507                          break;                          break;
508                  }                  }
509              }              }
# Line 914  namespace System.Windows.Forms Line 927  namespace System.Windows.Forms
927          bool ItemIsFrozen(int index);          bool ItemIsFrozen(int index);
928          void FreezeItem(int index);          void FreezeItem(int index);
929          void ThawItem(int index);          void ThawItem(int index);
930          int PCSX2ProcessID { get; set; }          int ProcessID { get; set; }
931      }      }
932    
933      public interface IAvpExport      public interface IAvpExport

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

  ViewVC Help
Powered by ViewVC 1.1.22