示例#1
0
        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();
            }
            }
        }
示例#2
0
        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();
            }
            }
        }
示例#3
0
        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);
        }