private void ConnectNode(String sourceNode, String targetNode, UMLRelationships relationship) { Connector connector = new Connector(); connector.Name = "connector" + DiagramWebControl1.Connectors.Count + 1; connector.TargetNode = targetNode; connector.SourceNode = sourceNode; connector.Segments = new Collection() { new Segment() { Type = Segments.Straight } }; connector.Shape = new UMLConnectorShape() { Relationship = relationship }; connector.Constraints = ConnectorConstraints.None; DiagramWebControl1.Connectors.Add(connector); }
public Connector GetConnector(string name, string sourceNode, string targetNode, UMLRelationships relationship) { Connector connector = new Connector(); connector.Name = name; connector.TargetNode = targetNode; connector.SourceNode = sourceNode; connector.Segments = new Collection() { new Segment() { Type = Segments.Straight } }; connector.Shape = new UMLConnectorShape() { Relationship = relationship }; connector.Constraints = ConnectorConstraints.None; return(connector); }