Beispiel #1
0
        /// <summary> Insert a new node so that it is located at the given index </summary>
        public RemoteTreeNode InsertNode(int index)
        {
            remoteTreeStore.AddModification(new RemoteTreeModification.InsertNode(this.Path, index));

            RemoteTreeNode newNode = new RemoteTreeNode(remoteTreeStore, this);

            childs.Insert(index, newNode);
            // Must create the reference only once the node is in the tree so that we can get the path
            newNode.SetValue(0, new RemoteTreeNodeRef());
            remoteTreeStore.NotifyNodeAdded(newNode);
            return(newNode);
        }