Пример #1
0
        /// <summary>
        /// Handle addition of a node.
        /// </summary>
        private void project_treeNodeAdded(ITreeNodeChangedEventManager o, TreeNodeAddedEventArgs e)
        {
            AudioBlock block = new AudioBlock();

            block.Panel           = this;
            block.Project         = project;
            block.Node            = e.getTreeNode();
            block.PixelsPerSecond = pixelsPerSecond;
            flowLayout.Controls.Add(block);
            flowLayout.Controls.SetChildIndex(block, e.getTreeNode().getParent().indexOf(e.getTreeNode()));
            nodeMap[e.getTreeNode()] = block;
        }
Пример #2
0
 /// <summary>
 /// Handle deletion of a node.
 /// </summary>
 private void project_treeNodeRemoved(ITreeNodeChangedEventManager o, TreeNodeRemovedEventArgs e)
 {
     flowLayout.Controls.Remove(nodeMap[e.getTreeNode()]);
     nodeMap.Remove(e.getTreeNode());
 }