public void OnCopyBagItems(CCBBag targetBag, string[] bagItems) { CCBTreeViewBag bagNode = FindBagNodeFromBag(targetBag); if (null != bagNode) { CCBBag bag = bagNode.Bag; bagNode.StartBulkEdit(); foreach (string item in bagItems) { CCBBagItem bagItem = bag.AddItem(item); bagNode.Items.Add(new CCBTreeViewItem(bagItem)); } bagNode.EndBulkEdit(); } }
public bool OnDeleteBagItems(CCBBag targetBag, string[] bagItems) { CCBTreeViewBag bagNode = FindBagNodeFromBag(targetBag); if (null != bagNode) { CCBBag bag = bagNode.Bag; bagNode.StartBulkEdit(); foreach (string item in bagItems) { bag.RemoveItem(item); bagNode.Remove(item); } bagNode.EndBulkEdit(); ResetEntitiesList(); return(true); } return(false); }