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

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

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

--- trunk/RomCheater/Docking/MemorySearch/PatchAdder.cs	2012/06/03 13:30:16	244
+++ trunk/RomCheater/Docking/MemorySearch/PatchAdder.cs	2012/06/03 14:50:09	245
@@ -5,19 +5,30 @@
 using System.Drawing;
 using System.Text;
 using System.Windows.Forms;
+using RomCheater.PluginFramework.Interfaces;
+using System.Diagnostics;
 
 namespace RomCheater.Docking.MemorySearch
 {
-    public partial class PatchAdder : Form
+    public partial class PatchAdder : Form,
+            IAcceptsPlugin<IConfigPlugin>,
+        IAcceptsProcess<Process>,
+        IAcceptsProcessAndConfig
     {
+        #region  IAcceptsProcess<Process> Members
+        public Process AcceptedProcess { get; set; }
+        #endregion
+        #region IAcceptsPlugin<IConfigPlugin> Members
+        public IConfigPlugin AcceptedPlugin { get; set; }
+        #endregion
         //PCSX2MemoryProvider provider;
         SearchDataTypes DataType;
         bool Unsigned = false;
-        int _pid = -1;
-        public PatchAdder(int pid)
+        public PatchAdder(IAcceptsProcessAndConfig pconfig)
         {
             InitializeComponent();
-            _pid = pid;
+            this.AcceptedPlugin = pconfig.AcceptedPlugin;
+            this.AcceptedProcess = pconfig.AcceptedProcess;
             //provider = new PCSX2MemoryProvider(_pid, log_control);
             Unsigned = true;
             DataType = SearchDataTypes._8bits;
@@ -52,7 +63,7 @@
             //    return;
             //}
 
-            ResultItemState _result_state = new ResultItemState(string.Format("0x{0:x8}",txtAddress.ToUInt32()), DataType, Unsigned, _pid);
+            ResultItemState _result_state = new ResultItemState(string.Format("0x{0:x8}", txtAddress.ToUInt32()), DataType, Unsigned, (IAcceptsProcessAndConfig)this);
             ResultDataType _result = _result_state;
             this.AddedPatchValue = _result;
             this.Close();

 

  ViewVC Help
Powered by ViewVC 1.1.22