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

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

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

--- trunk/RomCheater/Docking/MemorySearch/PatchRangeAdder.cs	2012/06/03 13:30:16	244
+++ trunk/RomCheater/Docking/MemorySearch/PatchRangeAdder.cs	2012/06/03 14:50:09	245
@@ -5,18 +5,29 @@
 using System.Drawing;
 using System.Text;
 using System.Windows.Forms;
+using RomCheater.PluginFramework.Interfaces;
+using System.Diagnostics;
 
 namespace RomCheater.Docking.MemorySearch
 {
-    public partial class PatchRangeAdder : Form
+    public partial class PatchRangeAdder : 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
         SearchDataTypes DataType;
         bool Unsigned = false;
-        int _pid = -1;
-        public PatchRangeAdder(int pid)
+        public PatchRangeAdder(IAcceptsProcessAndConfig pconfig)
         {
             InitializeComponent();
-            _pid = pid;
+            this.AcceptedPlugin = pconfig.AcceptedPlugin;
+            this.AcceptedProcess = pconfig.AcceptedProcess;
             Unsigned = true;
             DataType = SearchDataTypes._8bits;
             txtStartAddress.Text = string.Format("0x{0:x8}", 0);
@@ -73,7 +84,7 @@
             for (uint i = StartAddress; i <= EndAddress; i += BIT_SIZE)
             {
 
-                ResultItemState _result_state = new ResultItemState(string.Format("0x{0:x8}", i), DataType, Unsigned, _pid);
+                ResultItemState _result_state = new ResultItemState(string.Format("0x{0:x8}", i), DataType, Unsigned, (IAcceptsProcessAndConfig)this);
                 ResultDataType _result = _result_state;
                 this.AddedPatchValue.Add(_result);
             }

 

  ViewVC Help
Powered by ViewVC 1.1.22