コード例 #1
0
 public void Setup()
 {
     _validValue = new ValidValue {
         Label = "Lable", Value = "Value"
     };
     _leafTreeNode = new LeafTreeNode("Prompt Name", "Parameter Name", _validValue, null);
 }
コード例 #2
0
        public void BuildBranch(ContainerTreeNode root, bool addFakeNode)
        {
            TreeNode current;

            Library.Common.Composite.IComponent currentComponent;

            for (int i = 0; i < root.Container.GetChildrenCount(); i++)
            {
                currentComponent = root.Container.GetChildAt(i);

                if (currentComponent is ILeaf)
                {
                    current = new LeafTreeNode((ILeaf)currentComponent);
                    RefreshImagesIndexes(current, false);
                    current.ContextMenuStrip = leafMenuStrip;
                }
                else
                {
                    current = CreateContainerNode((IComposite)currentComponent, addFakeNode);
                    RefreshImagesIndexes(current, false);
                    current.ContextMenuStrip = containerMenuStrip;
                }

                root.Nodes.Add(current);
            }
        }
コード例 #3
0
        private void leafToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LeafTreeNode node = new LeafTreeNode(LeafName);

            SelectedNode.Expand();
            RefreshImagesIndexes(node, false);
            SelectedNode.Nodes.Add(node);
            node.ContextMenuStrip = leafMenuStrip;
            SelectedNode          = node;
            newNode = node;
            node.BeginEdit();
        }
コード例 #4
0
 public LeafCreatedEventArgs(LeafTreeNode leaf, IComposite composite)
     : base(composite)
 {
     this.leaf = Leaf;
 }