예제 #1
0
        // 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);
        }
예제 #2
0
        // 标记删除
        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();
            }
        }
예제 #3
0
파일: IssueItem.cs 프로젝트: renyh1013/dp2
        // 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;
        }
예제 #4
0
파일: IssueItem.cs 프로젝트: renyh1013/dp2
        // 标记删除
        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();
            }
        }