/[RomCheater]/trunk/RomCheater/Docking/UI/UIMemoryViewer.cs
ViewVC logotype

Diff of /trunk/RomCheater/Docking/UI/UIMemoryViewer.cs

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

revision 470 by william, Tue May 28 12:03:10 2013 UTC revision 471 by william, Mon Jun 3 07:13:44 2013 UTC
# Line 34  namespace RomCheater.Docking.UI Line 34  namespace RomCheater.Docking.UI
34  {  {
35      public partial class UIMemoryViewer : UserControl,      public partial class UIMemoryViewer : UserControl,
36          IAcceptsPlugin<IConfigPlugin>,          IAcceptsPlugin<IConfigPlugin>,
37          IAcceptsProcess<Process>,          IAcceptsProcess,
38          IAcceptsProcessAndConfig,          IAcceptsProcessAndConfig,
39          IAcceptsMemoryRange,          IAcceptsMemoryRange,
40          IBrowseMemoryRegion,          IBrowseMemoryRegion,
# Line 59  namespace RomCheater.Docking.UI Line 59  namespace RomCheater.Docking.UI
59              for (uint i = MemoryRangeStart; i < (MemoryRangeStart + max_ram_view); i += max_address_width) { ramScroll.Maximum += (int)max_address_width; }              for (uint i = MemoryRangeStart; i < (MemoryRangeStart + max_ram_view); i += max_address_width) { ramScroll.Maximum += (int)max_address_width; }
60              ramScroll.Value = ramScroll.Minimum;              ramScroll.Value = ramScroll.Minimum;
61              this.CanChangeUpdateInterval = false;              this.CanChangeUpdateInterval = false;
62              this.AcceptedPlugin = null; this.AcceptedProcess = null;              this.AcceptedPlugin = null; this.ProcessPID = 0;
63              txtAddresses.MouseWheel += new MouseEventHandler(txtAddresses_MouseWheel);              txtAddresses.MouseWheel += new MouseEventHandler(txtAddresses_MouseWheel);
64              txtData.MouseWheel += new MouseEventHandler(txtData_MouseWheel);              txtData.MouseWheel += new MouseEventHandler(txtData_MouseWheel);
65          }                }      
# Line 98  namespace RomCheater.Docking.UI Line 98  namespace RomCheater.Docking.UI
98          }          }
99          #endregion          #endregion
100          #region  IAcceptsProcess<Process> Members          #region  IAcceptsProcess<Process> Members
101          private Process _AcceptedProcess;          private int _ProcessPID;
102          public Process AcceptedProcess          public int ProcessPID
103          {          {
104              get { return _AcceptedProcess; }              get { return _ProcessPID; }
105              set              set
106              {              {
107                  _AcceptedProcess = value;                  _ProcessPID = value;
108                  update_timer.Enabled = (value != null);                  update_timer.Enabled = (value != 0);
109                  UpdateEnabled = update_timer.Enabled;                  UpdateEnabled = update_timer.Enabled;
110  #if !DISABLE_GETFIRSTNONZEROBYTE_ONUPDATE_ACCEPTEDPROCESS  #if !DISABLE_GETFIRSTNONZEROBYTE_ONUPDATE_ACCEPTEDPROCESS
111                  if (value != null)                  if (value != 0)
112                      GetFirstNonZeroByte();                      GetFirstNonZeroByte();
113  #endif  #endif
114              }              }
# Line 231  namespace RomCheater.Docking.UI Line 231  namespace RomCheater.Docking.UI
231          }          }
232          private void UpdateGui(bool force)          private void UpdateGui(bool force)
233          {          {
234              if (AcceptedProcess == null) { return; }              if (ProcessPID == 0) { return; }
235              if (AcceptedPlugin == null) { return; }              if (AcceptedPlugin == null) { return; }
236    
237              if (!this.ShouldUpdateResults()) { return; }// this.Logger.LogDebugMessage(string.Format("ShouldUpdateResults() -> returning false")); return; }              if (!this.ShouldUpdateResults()) { return; }// this.Logger.LogDebugMessage(string.Format("ShouldUpdateResults() -> returning false")); return; }
# Line 293  namespace RomCheater.Docking.UI Line 293  namespace RomCheater.Docking.UI
293              if (SearchInProgress) return;              if (SearchInProgress) return;
294              try              try
295              {              {
296                  if (AcceptedProcess == null) { return; }                  if (ProcessPID == 0) { return; }
297                  if (AcceptedPlugin == null) { return; }                  if (AcceptedPlugin == null) { return; }
298    
299                  byte[] data = GetMemory();                  byte[] data = GetMemory();
# Line 359  namespace RomCheater.Docking.UI Line 359  namespace RomCheater.Docking.UI
359          {          {
360              try              try
361              {              {
362                  if (AcceptedProcess == null) { return; }                  if (ProcessPID == 0) { return; }
363                  if (AcceptedPlugin == null) { return; }                  if (AcceptedPlugin == null) { return; }
364                  // Byte changed                  // Byte changed
365                  //byte[] data = (txtData.ByteProvider as DynamicByteProvider).Bytes.ToArray();                  //byte[] data = (txtData.ByteProvider as DynamicByteProvider).Bytes.ToArray();

Legend:
Removed from v.470  
changed lines
  Added in v.471

  ViewVC Help
Powered by ViewVC 1.1.22