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 |
} |
} |
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 |
} |
} |
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++; |