/// <summary> /// Replaces the type of the node with inherited. /// </summary> /// <param name="origNode">The orig node.</param> /// <param name="newType">The new type.</param> public void replaceNodeWithInheritedType(node origNode, Type newType) { addNode(origNode.name, newType); origNode.copy(nodes.Last()); nodes.Last().DisplayShape = origNode.DisplayShape; for (var i = 0; i != origNode.arcsFrom.Count; i++) { origNode.arcsFrom[i].From = nodes.Last(); } for (var i = 0; i != origNode.arcsTo.Count; i++) { origNode.arcsTo[i].To = nodes.Last(); } removeNode(origNode); }
private void replaceNodeWithInheritedType(node origNode) { this.addNode(origNode.name, origNode.nodeType); origNode.copy(nodes[lastNode]); nodes[lastNode].displayShape = origNode.displayShape; for (int i = 0; i != origNode.arcsFrom.Count; i++) { origNode.arcsFrom[i].From = nodes[lastNode]; } for (int i = 0; i != origNode.arcsTo.Count; i++) { origNode.arcsTo[i].To = nodes[lastNode]; } this.removeNode(origNode); }
private void replaceNodeWithInheritedType(node origNode) { this.addNode(origNode.name, origNode.nodeType); origNode.copy(nodes[lastNode]); nodes[lastNode].displayShape = origNode.displayShape; foreach (arc a in origNode.arcsFrom) { a.From = nodes[lastNode]; } foreach (arc a in origNode.arcsTo) { a.To = nodes[lastNode]; } this.removeNode(origNode); }
private void replaceNodeWithInheritedType(node origNode) { this.addNode(origNode.name, origNode.nodeType); origNode.copy(nodes[lastNode]); nodes[lastNode].displayShape = origNode.displayShape; for (int i = 0; i != origNode.arcsFrom.Count; i++) origNode.arcsFrom[i].From = nodes[lastNode]; for (int i = 0; i != origNode.arcsTo.Count; i++) origNode.arcsTo[i].To = nodes[lastNode]; this.removeNode(origNode); }
private void replaceNodeWithInheritedType(node origNode) { this.addNode(origNode.name, origNode.nodeType); origNode.copy(nodes[lastNode]); nodes[lastNode].displayShape = origNode.displayShape; foreach (arc a in origNode.arcsFrom) a.From = nodes[lastNode]; foreach (arc a in origNode.arcsTo) a.To = nodes[lastNode]; this.removeNode(origNode); }