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

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

# Line 8 | Line 8 | using System.Windows.Forms;
8   using RomCheater.Logging;
9   using System.Diagnostics;
10   using Sojaner.MemoryScanner.MemoryProviers;
11 + using RomCheater.PluginFramework.Interfaces;
12  
13  
14   namespace RomCheater.Docking.MemorySearch
15   {
16 <    public partial class SearchRangePatcher : Form
16 >    public partial class SearchRangePatcher : Form,
17 >        IAcceptsPlugin<IConfigPlugin>,
18 >        IAcceptsProcess<Process>,
19 >        IAcceptsProcessAndConfig
20      {
21 +        #region  IAcceptsProcess<Process> Members
22 +        public Process AcceptedProcess { get; set; }
23 +        #endregion
24 +        #region IAcceptsPlugin<IConfigPlugin> Members
25 +        public IConfigPlugin AcceptedPlugin { get; set; }
26 +        #endregion
27          //PCSX2MemoryProvider provider;
28 <        private int pid = -1;
19 <        SearchDataTypes DataType;
28 >        //SearchDataTypes DataType;
29          //bool Unsigned = false;
30          private List<ResultDataType> PatchList;
31 <        public SearchRangePatcher(int pid,List<ResultDataType> patchList)
31 >        public SearchRangePatcher(IAcceptsProcessAndConfig pconfig ,List<ResultDataType> patchList)
32          {
33              InitializeComponent();
34 <            this.pid = pid;
34 >            this.AcceptedPlugin = pconfig.AcceptedPlugin;
35 >            this.AcceptedProcess = pconfig.AcceptedProcess;
36              PatchList = patchList;
37              int CurrentBitSize = 0;
38              // get the larget datatype
# Line 53 | Line 63 | namespace RomCheater.Docking.MemorySearc
63          }
64          private void btnOK_Click(object sender, EventArgs e)
65          {
66 <            GenericMemoryProvider provider = new GenericMemoryProvider(null, Process.GetProcessById(pid));
66 >            GenericMemoryProvider provider = new GenericMemoryProvider((IAcceptsProcessAndConfig)this);
67              foreach(ResultDataType patch in PatchList)
68              {
69                  switch (patch.ValueType)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines