/[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 202 by william, Thu May 31 08:38:16 2012 UTC revision 203 by william, Thu May 31 09:03:53 2012 UTC
# Line 15  namespace RomCheater.Docking.UI Line 15  namespace RomCheater.Docking.UI
15  {  {
16      public partial class UIMemoryViewer : UserControl, IProcessConfig, IAcceptsPlugin<IConfigPlugin>//, IAcceptsMemoryRange      public partial class UIMemoryViewer : UserControl, IProcessConfig, IAcceptsPlugin<IConfigPlugin>//, IAcceptsMemoryRange
17      {      {
18            private bool first_load = true;
19          public UIMemoryViewer()          public UIMemoryViewer()
20          {          {
21              InitializeComponent();              InitializeComponent();
# Line 43  namespace RomCheater.Docking.UI Line 44  namespace RomCheater.Docking.UI
44    
45              txtAddresses.MouseWheel += new MouseEventHandler(txtAddresses_MouseWheel);              txtAddresses.MouseWheel += new MouseEventHandler(txtAddresses_MouseWheel);
46              txtData.MouseWheel += new MouseEventHandler(txtData_MouseWheel);              txtData.MouseWheel += new MouseEventHandler(txtData_MouseWheel);
47          }          }
48    
49            private void GetFirstNonZeroByte()
50            {
51                if (!DesignMode)
52                {
53                    Sojaner.MemoryScanner.ProcessMemoryReader reader = new Sojaner.MemoryScanner.ProcessMemoryReader();
54                    reader.ReadProcess = this.AcceptedProcess;
55                    reader.OpenProcess();
56                    uint addr = 0;
57                    reader.ReadFirstNonZeroByte(MemoryStart, MemorySize, out addr);
58                    GotoAddress(addr);
59                }
60            }
61    
62          #region IProcessConfig Members          #region IProcessConfig Members
63          private Process _AcceptedProcess;          private Process _AcceptedProcess;
64          public Process AcceptedProcess          public Process AcceptedProcess
# Line 54  namespace RomCheater.Docking.UI Line 69  namespace RomCheater.Docking.UI
69                  _AcceptedProcess = value;                  _AcceptedProcess = value;
70                  update_timer.Enabled = (value != null);                  update_timer.Enabled = (value != null);
71                  UpdateEnabled = update_timer.Enabled;                  UpdateEnabled = update_timer.Enabled;
72                    if (value != null)
73                        GetFirstNonZeroByte();
74              }              }
75          }          }
76          #endregion          #endregion

Legend:
Removed from v.202  
changed lines
  Added in v.203

  ViewVC Help
Powered by ViewVC 1.1.22