public void AddChild(string aChildName) { Expand(); if (CollectionItem is RsCollectionFolder) { RsCollectionFolder lFolder = ((RsCollectionFolder)CollectionItem).AddSubFolder( ((RsCollectionFolder)CollectionItem).GetNextName(aChildName) ); RsCollectionTreeNode lNode = RsCollectionTreeNode.CreateNode(lFolder, this, Owner); lNode.DeleteOnCancel = true; lNode.Editing = true; } }
protected void ehSelectNode(RsCollectionTree aSender, RsCollectionTreeNode aNode) { if (ItemList.Items != null) { ItemList.Items.Clear(); } if (aNode != null && aNode.CollectionItem is RsCollectionFolder) { RsCollectionFolder lFolder = aNode.CollectionItem as RsCollectionFolder; List <RsCollectionItem> lItems = lFolder.GetSubItems(); foreach (RsCollectionItem iItem in lItems) { ItemList.Items.Add(new RsListViewItem(iItem)); } } }
public void Expand() { if (Expanded) { return; } Children = new List <RsCollectionTreeNode>(); if (CollectionItem is RsCollectionFolder) { RsCollectionFolder lFolder = (RsCollectionFolder)CollectionItem; List <RsCollectionFolder> lChildren = lFolder.GetSubFolders(); foreach (RsCollectionItem iItem in lChildren) { RsCollectionTreeNode.CreateNode(iItem, this, Owner); } } Expanded = true; }