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); } }
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); } }
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(); } }