ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/RomCheater/Docking/MemorySearch/AddressValuePairList.cs
(Generate patch)

Comparing trunk/RomCheater/Docking/MemorySearch/AddressValuePairList.cs (file contents):
Revision 242 by william, Sun Jun 3 12:47:06 2012 UTC vs.
Revision 243 by william, Sun Jun 3 13:21:51 2012 UTC

# Line 10 | Line 10 | using Utilities.TransparentControls.List
10   using System.IO;
11   using RomCheater.Logging;
12   using RomCheater.Docking.MemorySearch;
13 + using Sojaner.MemoryScanner.MemoryProviers;
14 + using System.Diagnostics;
15 + using RomCheater.PluginFramework.Interfaces;
16  
17   namespace System.Windows.Forms
18   {
19      [Serializable]
20 <    public partial class AddressValuePairList : dbufferedListView, IAvpExport, IAvpImport, IAvpLvSupport, IAvpLvColumnSupport, IAvpFreeze
20 >    public partial class AddressValuePairList :
21 >        dbufferedListView, IAvpExport, IAvpImport, IAvpLvSupport, IAvpLvColumnSupport, IAvpFreeze,
22 >        IAcceptsProcess<Process>,
23 >        IAcceptsPlugin<IConfigPlugin>
24      {
25 <
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
33          {
# Line 147 | Line 158 | namespace System.Windows.Forms
158  
159              this.ColumnClick += new ColumnClickEventHandler(AddressValuePairList_ColumnClick);
160  
161 +            this.AcceptedPlugin = null;
162 +            this.AcceptedProcess = null;
163  
164          }
165  
# Line 470 | Line 483 | namespace System.Windows.Forms
483                  {
484                      iter = (ResultItem)this.Items[index];
485                  }
486 <                Sojaner.MemoryScanner.ProcessMemoryReader writer = new Sojaner.MemoryScanner.ProcessMemoryReader();                
486 >                GenericMemoryProvider provider = new GenericMemoryProvider((IAcceptsProcessAndConfig)this);            
487                  ResultDataType result = (ResultDataType)iter.Tag;
488                  uint Address = result.Address;
489                  byte[] bitData = new byte[] { };
490                  switch (result.ValueType)
491                  {
492                      case SearchDataTypes._8bits:
493 <                        if (result.IsUnsigned) { writer.PatchMemory(Address, Convert.ToByte(result.Value)); }
494 <                        else { writer.PatchMemory(Address, Convert.ToSByte(result.Value)); }
493 >                        if (result.IsUnsigned) { provider.PatchMemory(Address, Convert.ToByte(result.Value)); }
494 >                        else { provider.PatchMemory(Address, Convert.ToSByte(result.Value)); }
495                          break;
496                      case SearchDataTypes._16bits:
497 <                        if (result.IsUnsigned) { writer.PatchMemory(Address, Convert.ToUInt16(result.Value)); }
498 <                        else { writer.PatchMemory(Address, Convert.ToInt16(result.Value)); }
497 >                        if (result.IsUnsigned) { provider.PatchMemory(Address, Convert.ToUInt16(result.Value)); }
498 >                        else { provider.PatchMemory(Address, Convert.ToInt16(result.Value)); }
499                          break;
500                      case SearchDataTypes._32bits:
501 <                        if (result.IsUnsigned) { writer.PatchMemory(Address, Convert.ToUInt32(result.Value)); }
502 <                        else { writer.PatchMemory(Address, Convert.ToInt32(result.Value)); }
501 >                        if (result.IsUnsigned) { provider.PatchMemory(Address, Convert.ToUInt32(result.Value)); }
502 >                        else { provider.PatchMemory(Address, Convert.ToInt32(result.Value)); }
503                          break;
504                      case SearchDataTypes._64bits:
505 <                        if (result.IsUnsigned) { writer.PatchMemory(Address, Convert.ToUInt64(result.Value)); }
506 <                        else { writer.PatchMemory(Address, Convert.ToInt64(result.Value)); }
505 >                        if (result.IsUnsigned) { provider.PatchMemory(Address, Convert.ToUInt64(result.Value)); }
506 >                        else { provider.PatchMemory(Address, Convert.ToInt64(result.Value)); }
507                          break;
508                  }
509              }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines