/[RomCheater]/trunk/RomCheater.RVACalculator/RVACalculatorDockControl.cs
ViewVC logotype

Diff of /trunk/RomCheater.RVACalculator/RVACalculatorDockControl.cs

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

revision 665 by william, Mon Jun 17 02:55:56 2013 UTC revision 666 by william, Mon Jun 17 03:28:46 2013 UTC
# Line 44  namespace RomCheater.RVACalculator Line 44  namespace RomCheater.RVACalculator
44    
45              name = Microsoft.VisualBasic.Interaction.InputBox("Input Dialog", "Enter the cheat name", string.Empty);              name = Microsoft.VisualBasic.Interaction.InputBox("Input Dialog", "Enter the cheat name", string.Empty);
46              address = Microsoft.VisualBasic.Interaction.InputBox("Input Dialog", "Enter the cheat address (in hex : 0xXXXXXXXX)", string.Empty);              address = Microsoft.VisualBasic.Interaction.InputBox("Input Dialog", "Enter the cheat address (in hex : 0xXXXXXXXX)", string.Empty);
47              uint physical = Convert.ToUInt32(address) + txtRVA.ToUInt32();              uint physical = Convert.ToUInt32(address, 16) + txtRVA.ToUInt32();
48              ListViewItem li = new ListViewItem(name);              ListViewItem li = new ListViewItem(name);
49              li.SubItems.Add(new ListViewItem.ListViewSubItem(li, string.Format("0x{0:x8}", Convert.ToUInt32(address))));              li.SubItems.Add(new ListViewItem.ListViewSubItem(li, string.Format("0x{0:x8}", Convert.ToUInt32(address, 16))));
50              li.SubItems.Add(new ListViewItem.ListViewSubItem(li, string.Format("0x{0:x8}", physical)));              li.SubItems.Add(new ListViewItem.ListViewSubItem(li, string.Format("0x{0:x8}", physical)));
51              lstCheats.Items.Add(li);              lstCheats.Items.Add(li);
52          }          }
# Line 68  namespace RomCheater.RVACalculator Line 68  namespace RomCheater.RVACalculator
68    
69              name = Microsoft.VisualBasic.Interaction.InputBox("Input Dialog", "Enter the cheat name", name);              name = Microsoft.VisualBasic.Interaction.InputBox("Input Dialog", "Enter the cheat name", name);
70              address = Microsoft.VisualBasic.Interaction.InputBox("Input Dialog", "Enter the cheat address (in hex : 0xXXXXXXXX)", address);              address = Microsoft.VisualBasic.Interaction.InputBox("Input Dialog", "Enter the cheat address (in hex : 0xXXXXXXXX)", address);
71              uint physical = Convert.ToUInt32(address) + txtRVA.ToUInt32();              uint physical = Convert.ToUInt32(address, 16) + txtRVA.ToUInt32();
72              li.Text = name;              li.Text = name;
73              li.SubItems[1].Text = string.Format("0x{0:x8}", Convert.ToUInt32(address));              li.SubItems[1].Text = string.Format("0x{0:x8}", Convert.ToUInt32(address, 16));
74              li.SubItems[2].Text = string.Format("0x{0:x8}", physical);              li.SubItems[2].Text = string.Format("0x{0:x8}", physical);
75              lstCheats.Items[index] = li;                          lstCheats.Items[index] = li;            
76          }          }
# Line 98  namespace RomCheater.RVACalculator Line 98  namespace RomCheater.RVACalculator
98              {              {
99                  string name = li.Text;                  string name = li.Text;
100                  string address = li.SubItems[1].Text;                  string address = li.SubItems[1].Text;
101                  uint physical = Convert.ToUInt32(address) + txtRVA.ToUInt32();                  uint physical = Convert.ToUInt32(address, 16) + txtRVA.ToUInt32();
102                  li.SubItems[2].Text = string.Format("0x{0:x8}", physical);                                  li.SubItems[2].Text = string.Format("0x{0:x8}", physical);                
103                  lstCheats.Items[index] = li;                  lstCheats.Items[index] = li;
104                  index++;                  index++;

Legend:
Removed from v.665  
changed lines
  Added in v.666

  ViewVC Help
Powered by ViewVC 1.1.22