/[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

revision 229 by william, Sat Jun 2 18:31:40 2012 UTC revision 245 by william, Sun Jun 3 14:50:09 2012 UTC
# Line 5  using System.Data; Line 5  using System.Data;
5  using System.Drawing;  using System.Drawing;
6  using System.Text;  using System.Text;
7  using System.Windows.Forms;  using System.Windows.Forms;
8    using RomCheater.PluginFramework.Interfaces;
9    using System.Diagnostics;
10    
11  namespace RomCheater.Docking.MemorySearch  namespace RomCheater.Docking.MemorySearch
12  {  {
13      public partial class PatchRangeAdder : Form      public partial class PatchRangeAdder : Form,
14                IAcceptsPlugin<IConfigPlugin>,
15            IAcceptsProcess<Process>,
16            IAcceptsProcessAndConfig
17      {      {
18            #region  IAcceptsProcess<Process> Members
19            public Process AcceptedProcess { get; set; }
20            #endregion
21            #region IAcceptsPlugin<IConfigPlugin> Members
22            public IConfigPlugin AcceptedPlugin { get; set; }
23            #endregion
24          SearchDataTypes DataType;          SearchDataTypes DataType;
25          bool Unsigned = false;          bool Unsigned = false;
26          int _pid = -1;          public PatchRangeAdder(IAcceptsProcessAndConfig pconfig)
         public PatchRangeAdder(int pid)  
27          {          {
28              InitializeComponent();              InitializeComponent();
29              _pid = pid;              this.AcceptedPlugin = pconfig.AcceptedPlugin;
30                this.AcceptedProcess = pconfig.AcceptedProcess;
31              Unsigned = true;              Unsigned = true;
32              DataType = SearchDataTypes._8bits;              DataType = SearchDataTypes._8bits;
33              txtStartAddress.Text = string.Format("0x{0:x8}", 0);              txtStartAddress.Text = string.Format("0x{0:x8}", 0);
# Line 73  namespace RomCheater.Docking.MemorySearc Line 84  namespace RomCheater.Docking.MemorySearc
84              for (uint i = StartAddress; i <= EndAddress; i += BIT_SIZE)              for (uint i = StartAddress; i <= EndAddress; i += BIT_SIZE)
85              {              {
86    
87                  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);
88                  ResultDataType _result = _result_state;                  ResultDataType _result = _result_state;
89                  this.AddedPatchValue.Add(_result);                  this.AddedPatchValue.Add(_result);
90              }              }

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

  ViewVC Help
Powered by ViewVC 1.1.22