private Node AddBomNode(Node parent, BomLink link) { Node node = new BomNode("Child Node " + parent.Nodes.Count.ToString(), link); parent.Nodes.Add(node); return(node); }
private void AssignBomNode(BomNode bNode) { foreach (BomNode node in bNode.Nodes) { node.Assign = true; AssignBomNode(node); } }
private void buttonAssign_Click(object sender, EventArgs e) { foreach (TreeNodeAdv node in treeViewBom.SelectedNodes) { if (node.Tag is BomNode) { BomNode bNode = node.Tag as BomNode; bNode.Assign = true; AssignBomNode(bNode); } } }
protected override void CheckNodeState(TreeNodeAdv node, ref DrawContext context) { if (node.Tag != null) { if (node.Tag.GetType() == typeof(BomNode)) { BomNode bnode = node.Tag as BomNode; if (bnode.Assign == true) { context.ForeColor = SystemColors.ControlLight; } } } }