// 从集合中和视觉上同时删除 public void PhysicalDeleteItem( IssueItem issueitem) { // 从listview中消失 issueitem.DeleteFromListView(); this.Remove(issueitem); }
// 标记删除 public void MaskDeleteItem( bool bRemoveFromList, IssueItem issueitem) { if (issueitem.ItemDisplayState == ItemDisplayState.New) { PhysicalDeleteItem(issueitem); return; } issueitem.ItemDisplayState = ItemDisplayState.Deleted; issueitem.Changed = true; // 从listview中消失? if (bRemoveFromList == true) { issueitem.DeleteFromListView(); } else { issueitem.RefreshListView(); } }
// 标记删除 public void MaskDeleteItem( bool bRemoveFromList, IssueItem issueitem) { if (issueitem.ItemDisplayState == ItemDisplayState.New) { PhysicalDeleteItem(issueitem); return; } issueitem.ItemDisplayState = ItemDisplayState.Deleted; issueitem.Changed = true; // 从listview中消失? if (bRemoveFromList == true) issueitem.DeleteFromListView(); else { issueitem.RefreshListView(); } }