예제 #1
0
        public Connector AddConnection(string id, Shape from, Shape to, string label,
            VA.Shapes.Connections.ConnectorType type, int beginArrow, int endArrow, string hyperlink)
        {
            var new_connector = new Connector(from, to);
            new_connector.ID = id;
            new_connector.Label = label;
            new_connector.ConnectorType = type;
            new_connector.Cells = new VA.DOM.ShapeCells();
            new_connector.Cells.BeginArrow = beginArrow;
            new_connector.Cells.BeginArrowSize = beginArrow;
            new_connector.Cells.EndArrow = endArrow;
            new_connector.Cells.EndArrowSize = endArrow;

            if (!string.IsNullOrEmpty(hyperlink))
            {

                //new_connector.VisioShape = IVisio.Shape; // IVisio.Shape();
                var h = new_connector.VisioShape.Hyperlinks.Add();

                h.Name = hyperlink; // Name of Hyperlink
                h.Address = hyperlink; // Address of Hyperlink
            }

            this.Connectors.Add(id, new_connector);
            return new_connector;
        }
예제 #2
0
        public Connector AddConnection(string id, Shape from, Shape to, string label, string stencil_name, string master_name)
        {
            var new_connector = new Connector(from, to);
               new_connector.ID = id;
               new_connector.Label = label;
               new_connector.StencilName = stencil_name;
               new_connector.MasterName = master_name;

               this.Connectors.Add(id, new_connector);
               return new_connector;
        }
예제 #3
0
        private VA.DOM.BezierCurve draw_edge_bezier(
            VA.DOM.ShapeList page,
            DGMODEL.Connector connector,
            MG.Edge edge)
        {
            var final_bez_points =
                VA.Internal.MSAGLUtil.ToVAPoints(edge).Select(p => ToDocumentCoordinates(p)).ToList();

            var bez_shape = new VA.DOM.BezierCurve(final_bez_points);

            return(bez_shape);
        }
예제 #4
0
        public Connector Connect(
            string id, 
            Shape from, 
            Shape to, 
            string label,
             ConnectorType type)
        {
            var new_connector = new Connector(from, to);
            new_connector.Label = label;
            new_connector.ConnectorType = type;

            this.Connectors.Add(id, new_connector);
            return new_connector;
        }