private void button_AddBP_Click(object sender, EventArgs e) { var f = new BpEditor(); var result = f.ShowDialog(); if (result == DialogResult.OK) { dynamic Data = f.Data; BREAK_POINT bp = BpObj.Toggle(Data.Address); if (bp != null) { bp.Data = f.Data; BpObj2UI(); VM_UpdateBPs(); RefreshCpuStatus(); } } }
private void editToolStripMenuItem_Click(object sender, EventArgs e) { var f = new BpEditor(); if (listView_BPs.SelectedItems.Count > 0) { ListViewItem lvitem = listView_BPs.SelectedItems[0]; UInt16 addr = Convert.ToUInt16(lvitem.Text, 16); BREAK_POINT bp = BpObj.Find(addr); f.Data = bp.Data; var result = f.ShowDialog(); if (result == DialogResult.OK) { bp.Data = f.Data; BpObj2UI(); VM_UpdateBPs(); RefreshCpuStatus(); } } }