Exemple #1
0
        private Node AddBomNode(Node parent, BomLink link)
        {
            Node node = new BomNode("Child Node " + parent.Nodes.Count.ToString(), link);

            parent.Nodes.Add(node);
            return(node);
        }
Exemple #2
0
 private void AssignBomNode(BomNode bNode)
 {
     foreach (BomNode node in bNode.Nodes)
     {
         node.Assign = true;
         AssignBomNode(node);
     }
 }
Exemple #3
0
        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);
                }
            }
        }
Exemple #4
0
 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;
             }
         }
     }
 }