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

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

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

revision 240 by william, Sun Jun 3 12:54:18 2012 UTC revision 245 by william, Sun Jun 3 14:50:09 2012 UTC
# Line 8  using System.Windows.Forms; Line 8  using System.Windows.Forms;
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
# Line 53  namespace RomCheater.Docking.MemorySearc Line 63  namespace RomCheater.Docking.MemorySearc
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                provider.OpenProvider();
68              foreach(ResultDataType patch in PatchList)              foreach(ResultDataType patch in PatchList)
69              {              {
70                  switch (patch.ValueType)                  switch (patch.ValueType)
# Line 76  namespace RomCheater.Docking.MemorySearc Line 87  namespace RomCheater.Docking.MemorySearc
87                          break;                          break;
88                  }                  }
89              }              }
90                provider.CloseProvider();
91              this.Close();              this.Close();
92          }          }
93    

Legend:
Removed from v.240  
changed lines
  Added in v.245

  ViewVC Help
Powered by ViewVC 1.1.22