private TreeListViewItem AddBreakpointItem(Breakpoint bp) { TreeListViewItem tlvi = new TreeListViewItem(bp); tlvi.Tag = bp; tlvi.Checked = bp.Enabled; tlvi.ImageIndex = GetBreakpointImageIndex(bp); tlvi.SubItems.Add(new TreeListViewSubItem(0, string.IsNullOrEmpty(bp.Condition) ? "(no condition)" : bp.Condition)); tlvi.SubItems.Add(new TreeListViewSubItem(1, bp.GetHitConditionString())); tlvwBreakpoints.Items.Add(tlvi); ValidateButtons(); return(tlvi); }
private void UpdateBreakpoint(Breakpoint bp) { TreeListViewItem tlvi = FindBreakpointItem(bp); if (tlvi != null) { tlvi.Object = bp; tlvi.Checked = bp.Enabled; tlvi.ImageIndex = GetBreakpointImageIndex(bp); tlvi.SubItems[1].Object = bp.Condition == "" ? "(no condition)" : bp.Condition; tlvi.SubItems[2].Object = bp.GetHitConditionString(); } tlvwBreakpoints.Refresh(tlvi); ValidateButtons(); }