ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/RomCheater/Docking/UI/UIMemoryViewer.cs
(Generate patch)

Comparing trunk/RomCheater/Docking/UI/UIMemoryViewer.cs (file contents):
Revision 202 by william, Thu May 31 08:38:16 2012 UTC vs.
Revision 203 by william, Thu May 31 09:03:53 2012 UTC

# Line 15 | Line 15 | namespace RomCheater.Docking.UI
15   {
16      public partial class UIMemoryViewer : UserControl, IProcessConfig, IAcceptsPlugin<IConfigPlugin>//, IAcceptsMemoryRange
17      {
18 +        private bool first_load = true;
19          public UIMemoryViewer()
20          {
21              InitializeComponent();
# Line 43 | Line 44 | namespace RomCheater.Docking.UI
44  
45              txtAddresses.MouseWheel += new MouseEventHandler(txtAddresses_MouseWheel);
46              txtData.MouseWheel += new MouseEventHandler(txtData_MouseWheel);
47 <        }
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
63          private Process _AcceptedProcess;
64          public Process AcceptedProcess
# Line 54 | Line 69 | namespace RomCheater.Docking.UI
69                  _AcceptedProcess = value;
70                  update_timer.Enabled = (value != null);
71                  UpdateEnabled = update_timer.Enabled;
72 +                if (value != null)
73 +                    GetFirstNonZeroByte();
74              }
75          }
76          #endregion

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines