private void mnuRelocationsEdit_Click(object sender, EventArgs e) { if (lvRelocation.SelectedItems.Count < 1) { return; } Relocations.Reloc reloc = (Relocations.Reloc)lvRelocation.SelectedItems[0].Tag; frmEditRelocation frm = new frmEditRelocation(baseAddress + reloc.offset, reloc.type); if (frm.ShowDialog() != System.Windows.Forms.DialogResult.OK) { return; } if (!rel.EditRelocation(frm.GetOldAddress(), frm.GetNewAddress(), frm.GetRelocType())) { MessageBox.Show("Cannot edit this address"); return; } RefreshData(); }
private void mnuRelocationsEdit_Click(object sender, EventArgs e) { if (lvRelocation.SelectedItems.Count < 1) return; Relocations.Reloc reloc = (Relocations.Reloc)lvRelocation.SelectedItems[0].Tag; frmEditRelocation frm = new frmEditRelocation(baseAddress + reloc.offset, reloc.type); if (frm.ShowDialog() != System.Windows.Forms.DialogResult.OK) return; if (!rel.EditRelocation(frm.GetOldAddress(), frm.GetNewAddress(), frm.GetRelocType())) { MessageBox.Show("Cannot edit this address"); return; } RefreshData(); }