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

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

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

revision 352 by william, Sat Jun 9 21:11:02 2012 UTC revision 378 by william, Tue Jun 19 07:56:36 2012 UTC
# Line 14  namespace RomCheater.Docking.UI Line 14  namespace RomCheater.Docking.UI
14      {      {
15          private const int max_address_width = 16;          private const int max_address_width = 16;
16          private byte[] byte_data = new byte[] { };          private byte[] byte_data = new byte[] { };
17          private int base_address = 0;          private uint base_address = 0;
18          public ByteEditor()          public ByteEditor()
19          {          {
20              InitializeComponent();              InitializeComponent();
# Line 28  namespace RomCheater.Docking.UI Line 28  namespace RomCheater.Docking.UI
28                  lblAddressMarker.Text = lblAddressMarker.Text + string.Format("{0:X2} ", i);                  lblAddressMarker.Text = lblAddressMarker.Text + string.Format("{0:X2} ", i);
29              }              }
30          }          }
31          public ByteEditor(byte[] data, int BaseAddress) : this() { byte_data = data; base_address = BaseAddress; }          public ByteEditor(byte[] data, uint BaseAddress) : this() { byte_data = data; base_address = BaseAddress; }
32    
33          private void ByteEditor_Load(object sender, EventArgs e)          private void ByteEditor_Load(object sender, EventArgs e)
34          {          {
35              uint max_ram_view = (uint)byte_data.Length;              uint max_ram_view = (uint)byte_data.Length;
36              //for (uint i = 0; i < byte_data.Length; i += max_address_width) { max_ram_view += max_address_width; }              //for (uint i = 0; i < byte_data.Length; i += max_address_width) { max_ram_view += max_address_width; }
37              for (int i = base_address; i < (base_address + max_ram_view); i += max_address_width)              for (uint i = base_address; i < (base_address + max_ram_view); i += max_address_width)
38              {              {
39                  txtAddresses.Text = txtAddresses.Text + string.Format("{0:X8}:\n", i);                  txtAddresses.Text = txtAddresses.Text + string.Format("{0:X8}:\n", i);
40              }              }

Legend:
Removed from v.352  
changed lines
  Added in v.378

  ViewVC Help
Powered by ViewVC 1.1.22