/[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 198 by william, Thu May 31 07:13:43 2012 UTC revision 249 by william, Sun Jun 3 16:09:05 2012 UTC
# Line 12  namespace RomCheater.Docking.UI Line 12  namespace RomCheater.Docking.UI
12  {  {
13      public partial class ByteEditor : Form      public partial class ByteEditor : Form
14      {      {
15          private const uint 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 uint base_address = 0;          private int 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, uint BaseAddress) : this() { byte_data = data; base_address = BaseAddress; }          public ByteEditor(byte[] data, int 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 (uint i = base_address; i < (base_address + max_ram_view); i += max_address_width)              for (int 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.198  
changed lines
  Added in v.249

  ViewVC Help
Powered by ViewVC 1.1.22