private IVisio.VisCellVals ConnectorTypeToCellVal_Style(Shapes.Connections.ConnectorType ct) { switch (ct) { case (Shapes.Connections.ConnectorType.Curved): { return(IVisio.VisCellVals.visLORouteRightAngle); } case (Shapes.Connections.ConnectorType.Straight): { return(IVisio.VisCellVals.visLORouteCenterToCenter); } case (Shapes.Connections.ConnectorType.RightAngle): { return(IVisio.VisCellVals.visLORouteFlowchartNS); } default: { throw new ArgumentOutOfRangeException(); } } }
private IVisio.VisCellVals ConnectorTypeToCellVal_Appearance(Shapes.Connections.ConnectorType ct) { switch (ct) { case (Shapes.Connections.ConnectorType.Curved): { return(IVisio.VisCellVals.visLORouteExtNURBS); } case (Shapes.Connections.ConnectorType.Straight): { return(IVisio.VisCellVals.visLORouteExtStraight); } case (Shapes.Connections.ConnectorType.RightAngle): { return(IVisio.VisCellVals.visLORouteExtStraight); } default: { throw new ArgumentOutOfRangeException(); } } }
public Connector AddConnection( string id, Shape from, Shape to, string label, Shapes.Connections.ConnectorType type) { var new_connector = new Connector(from, to); new_connector.ID = id; new_connector.Label = label; new_connector.ConnectorType = type; this.Connectors.Add(id, new_connector); return(new_connector); }