private void connect(IVisio.Shape a, IVisio.Shape b, bool a_arrow, bool b_arrow)
        {
            var page = a.ContainingPage;
            var connectors_stencil = page.Application.Documents.OpenStencil("connec_u.vss");
            var connectors_masters = connectors_stencil.Masters;

            var dcm = connectors_masters["Dynamic Connector"];

            var drop_point = new VADRAW.Point(-2, -2);
            var c1         = page.Drop(dcm, drop_point);

            ConnectorHelper.ConnectShapes(a, b, c1);

            //a.AutoConnect(b, connect_dir_none, null);

            if (a_arrow || b_arrow)
            {
                var writer = new SidSrcWriter();
                if (a_arrow)
                {
                    writer.SetFormula(c1.ID16, VASS.SrcConstants.LineBeginArrow, "13");
                }
                if (b_arrow)
                {
                    writer.SetFormula(c1.ID16, VASS.SrcConstants.LineEndArrow, "13");
                }

                writer.Commit(page);
            }
        }
Beispiel #2
0
        public VisioAutomation.Geometry.Rectangle GetRectangle()
        {
            var pin    = new VisioAutomation.Geometry.Point(this.PinX, this.PinY);
            var locpin = new VisioAutomation.Geometry.Point(this.LocPinX, this.LocPinY);
            var size   = new VisioAutomation.Geometry.Size(this.Width, this.Height);

            return(new VisioAutomation.Geometry.Rectangle(pin - locpin, size));
        }