public void Setup() { _validValue = new ValidValue { Label = "Lable", Value = "Value" }; _leafTreeNode = new LeafTreeNode("Prompt Name", "Parameter Name", _validValue, null); }
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); } }
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(); }
public LeafCreatedEventArgs(LeafTreeNode leaf, IComposite composite) : base(composite) { this.leaf = Leaf; }