コード例 #1
0
        protected void attachToTrue(BaseNode newNode, bool addToEnd)
        {
            if (addToEnd)
            {
                BaseNode lastNode = this.TrueNode;
                while (!(lastNode.OutConnector.EndNode is HolderNode))
                {
                    lastNode = lastNode.OutConnector.EndNode;
                }
                lastNode.attachNode(newNode);
            }

            else
            {
                this.TrueNode.attachNode(newNode);
            }
        }
コード例 #2
0
 protected void attachToTrue(BaseNode newNode, bool addToEnd)
 {
     if (addToEnd) //this means that the clicked link is between holder and loop
     {
         //add this node to last node in true link
         BaseNode lastNode = TrueNode;
         while (!(lastNode.OutConnector.EndNode is HolderNode))
         {
             lastNode = lastNode.OutConnector.EndNode;
         }
         lastNode.attachNode(newNode);
     }
     else
     {
         TrueNode.attachNode(newNode);
     }
 }
コード例 #3
0
        public void addNewNode(BaseNode toAttachNode)
        {
            if (toAttachNode != null)
            {
                if (checkIfHolderExist() != null)
                {
                    toAttachNode.ParentNode = (checkIfHolderExist()).ParentNode;
                    toAttachNode.ParentNode.attachNode(toAttachNode, this);
                }

                else
                {
                    toAttachNode.ParentNode = startNode.ParentNode;
                    startNode.attachNode(toAttachNode);
                }
                toAttachNode.addToModel();
            }
        }