8 |
using RomCheater.Logging; |
using RomCheater.Logging; |
9 |
using System.Diagnostics; |
using System.Diagnostics; |
10 |
using Sojaner.MemoryScanner.MemoryProviers; |
using Sojaner.MemoryScanner.MemoryProviers; |
11 |
|
using RomCheater.PluginFramework.Interfaces; |
12 |
|
|
13 |
|
|
14 |
namespace RomCheater.Docking.MemorySearch |
namespace RomCheater.Docking.MemorySearch |
15 |
{ |
{ |
16 |
public partial class SearchRangePatcher : Form |
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; |
//PCSX2MemoryProvider provider; |
28 |
private int pid = -1; |
//SearchDataTypes DataType; |
|
SearchDataTypes DataType; |
|
29 |
//bool Unsigned = false; |
//bool Unsigned = false; |
30 |
private List<ResultDataType> PatchList; |
private List<ResultDataType> PatchList; |
31 |
public SearchRangePatcher(int pid,List<ResultDataType> patchList) |
public SearchRangePatcher(IAcceptsProcessAndConfig pconfig ,List<ResultDataType> patchList) |
32 |
{ |
{ |
33 |
InitializeComponent(); |
InitializeComponent(); |
34 |
this.pid = pid; |
this.AcceptedPlugin = pconfig.AcceptedPlugin; |
35 |
|
this.AcceptedProcess = pconfig.AcceptedProcess; |
36 |
PatchList = patchList; |
PatchList = patchList; |
37 |
int CurrentBitSize = 0; |
int CurrentBitSize = 0; |
38 |
// get the larget datatype |
// get the larget datatype |
63 |
} |
} |
64 |
private void btnOK_Click(object sender, EventArgs e) |
private void btnOK_Click(object sender, EventArgs e) |
65 |
{ |
{ |
66 |
GenericMemoryProvider provider = new GenericMemoryProvider(null, Process.GetProcessById(pid)); |
GenericMemoryProvider provider = new GenericMemoryProvider((IAcceptsProcessAndConfig)this); |
67 |
foreach(ResultDataType patch in PatchList) |
foreach(ResultDataType patch in PatchList) |
68 |
{ |
{ |
69 |
switch (patch.ValueType) |
switch (patch.ValueType) |