/[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

--- trunk/RomCheater/Docking/MemorySearch/AddressValuePairList.cs	2012/06/03 13:04:02	242
+++ trunk/RomCheater/Docking/MemorySearch/AddressValuePairList.cs	2012/06/03 13:21:51	243
@@ -10,13 +10,24 @@
 using System.IO;
 using RomCheater.Logging;
 using RomCheater.Docking.MemorySearch;
+using Sojaner.MemoryScanner.MemoryProviers;
+using System.Diagnostics;
+using RomCheater.PluginFramework.Interfaces;
 
 namespace System.Windows.Forms
 {
     [Serializable]
-    public partial class AddressValuePairList : dbufferedListView, IAvpExport, IAvpImport, IAvpLvSupport, IAvpLvColumnSupport, IAvpFreeze
+    public partial class AddressValuePairList : 
+        dbufferedListView, IAvpExport, IAvpImport, IAvpLvSupport, IAvpLvColumnSupport, IAvpFreeze,
+        IAcceptsProcess<Process>,
+        IAcceptsPlugin<IConfigPlugin>
     {
-
+        #region IAcceptsProcess<Process> Members
+        public Process AcceptedProcess { get; set; }
+        #endregion
+        #region IAcceptsPlugin<IConfigPlugin> Members
+        public IConfigPlugin AcceptedPlugin { get; set; }
+        #endregion
 
         public class AddressValuePairListSorter : System.Collections.IComparer
         {
@@ -147,6 +158,8 @@
 
             this.ColumnClick += new ColumnClickEventHandler(AddressValuePairList_ColumnClick);
 
+            this.AcceptedPlugin = null;
+            this.AcceptedProcess = null;
 
         }
 
@@ -470,27 +483,27 @@
                 {
                     iter = (ResultItem)this.Items[index];
                 }
-                Sojaner.MemoryScanner.ProcessMemoryReader writer = new Sojaner.MemoryScanner.ProcessMemoryReader();                
+                GenericMemoryProvider provider = new GenericMemoryProvider((IAcceptsProcessAndConfig)this);            
                 ResultDataType result = (ResultDataType)iter.Tag;
                 uint Address = result.Address;
                 byte[] bitData = new byte[] { };
                 switch (result.ValueType)
                 {
                     case SearchDataTypes._8bits:
-                        if (result.IsUnsigned) { writer.PatchMemory(Address, Convert.ToByte(result.Value)); }
-                        else { writer.PatchMemory(Address, Convert.ToSByte(result.Value)); }
+                        if (result.IsUnsigned) { provider.PatchMemory(Address, Convert.ToByte(result.Value)); }
+                        else { provider.PatchMemory(Address, Convert.ToSByte(result.Value)); }
                         break;
                     case SearchDataTypes._16bits:
-                        if (result.IsUnsigned) { writer.PatchMemory(Address, Convert.ToUInt16(result.Value)); }
-                        else { writer.PatchMemory(Address, Convert.ToInt16(result.Value)); }
+                        if (result.IsUnsigned) { provider.PatchMemory(Address, Convert.ToUInt16(result.Value)); }
+                        else { provider.PatchMemory(Address, Convert.ToInt16(result.Value)); }
                         break;
                     case SearchDataTypes._32bits:
-                        if (result.IsUnsigned) { writer.PatchMemory(Address, Convert.ToUInt32(result.Value)); }
-                        else { writer.PatchMemory(Address, Convert.ToInt32(result.Value)); }
+                        if (result.IsUnsigned) { provider.PatchMemory(Address, Convert.ToUInt32(result.Value)); }
+                        else { provider.PatchMemory(Address, Convert.ToInt32(result.Value)); }
                         break;
                     case SearchDataTypes._64bits:
-                        if (result.IsUnsigned) { writer.PatchMemory(Address, Convert.ToUInt64(result.Value)); }
-                        else { writer.PatchMemory(Address, Convert.ToInt64(result.Value)); }
+                        if (result.IsUnsigned) { provider.PatchMemory(Address, Convert.ToUInt64(result.Value)); }
+                        else { provider.PatchMemory(Address, Convert.ToInt64(result.Value)); }
                         break;
                 }
             }

 

  ViewVC Help
Powered by ViewVC 1.1.22