// Undo标记删除 // return: // false 没有必要Undo // true 已经Undo public bool UndoMaskDeleteItem(IssueItem issueitem) { if (issueitem.ItemDisplayState != ItemDisplayState.Deleted) { return(false); // 要Undo的事项根本就不是Deleted状态,所以谈不上Undo } // 因为不知道上次标记删除前数据是否改过,因此全当改过 issueitem.ItemDisplayState = ItemDisplayState.Changed; issueitem.Changed = true; // 刷新 issueitem.RefreshListView(); return(true); }
// 标记删除 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(); } }
// Undo标记删除 // return: // false 没有必要Undo // true 已经Undo public bool UndoMaskDeleteItem(IssueItem issueitem) { if (issueitem.ItemDisplayState != ItemDisplayState.Deleted) return false; // 要Undo的事项根本就不是Deleted状态,所以谈不上Undo // 因为不知道上次标记删除前数据是否改过,因此全当改过 issueitem.ItemDisplayState = ItemDisplayState.Changed; issueitem.Changed = true; // 刷新 issueitem.RefreshListView(); return true; }
// 标记删除 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(); } }