Exemplo n.º 1
0
        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);

            VACONNECT.ConnectorHelper.ConnectShapes(a, b, c1);

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

            if (a_arrow || b_arrow)
            {
                var update = new VASS.Update();
                if (a_arrow)
                {
                    update.SetFormula(c1.ID16, VASS.SRCConstants.BeginArrow, "13");
                }
                if (b_arrow)
                {
                    update.SetFormula(c1.ID16, VASS.SRCConstants.EndArrow, "13");
                }
                update.Execute(page);
            }
        }
Exemplo n.º 2
0
        public IVisio.Page CreatePage(FormPage formpage)
        {
            this.FormPage = formpage;

            this.page      = this.VisioPages.Add();
            this.page.Name = formpage.Name;

            // Update the Page Cells
            var pagesheet  = page.PageSheet;
            var pageupdate = new VA.ShapeSheet.Update();

            var pagecells = new VA.Pages.PageCells();

            pagecells.PageWidth        = formpage.Size.Width;
            pagecells.PageHeight       = formpage.Size.Height;
            pagecells.PageLeftMargin   = formpage.Margin.Left;
            pagecells.PageRightMargin  = formpage.Margin.Right;
            pagecells.PageTopMargin    = formpage.Margin.Top;
            pagecells.PageBottomMargin = formpage.Margin.Bottom;
            pageupdate.SetFormulas(pagecells);
            pageupdate.Execute(pagesheet);


            this.Reset();
            return(this.page);
        }
        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);
            VACONNECT.ConnectorHelper.ConnectShapes(a, b, c1);

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

            if (a_arrow || b_arrow)
            {
                var update = new VASS.Update();
                if (a_arrow)
                {
                    update.SetFormula(c1.ID16, VASS.SRCConstants.BeginArrow, "13");                    
                }
                if (b_arrow)
                {
                    update.SetFormula(c1.ID16, VASS.SRCConstants.EndArrow, "13");
                }
                update.Execute(page);
            }
        }
Exemplo n.º 4
0
        public static void Set(IVisio.Shape shape, short row, CustomPropertyCells cp)
        {
            if (shape == null)
            {
                throw new ArgumentNullException("shape");
            }

            var update = new VA.ShapeSheet.Update();

            update.SetFormulas(cp, row);
            update.Execute(shape);
        }
Exemplo n.º 5
0
        public void Finish()
        {
            var update = new VA.ShapeSheet.Update();

            foreach (var block in this.Blocks)
            {
                update.SetFormulas((short)block.VisioShapeID, block.FormatCells);
                update.SetFormulas((short)block.VisioShapeID, block.Textcells);
                update.SetFormulas((short)block.VisioShapeID, block.ParagraphCells, (short)0);
                update.SetFormulas((short)block.VisioShapeID, block.CharacterCells, (short)0);
            }
            update.Execute(this.page);
        }
        public IVisio.Page CreatePage(FormPage formpage)
        {
            this.FormPage = formpage;

            this.page = this.VisioPages.Add();
            this.page.Name = formpage.Name;

            // Update the Page Cells
            var pagesheet = page.PageSheet;
            var pageupdate = new VA.ShapeSheet.Update();

            var pagecells = new VA.Pages.PageCells();
            pagecells.PageWidth = formpage.Size.Width;
            pagecells.PageHeight = formpage.Size.Height;
            pagecells.PageLeftMargin = formpage.Margin.Left;
            pagecells.PageRightMargin = formpage.Margin.Right;
            pagecells.PageTopMargin = formpage.Margin.Top;
            pagecells.PageBottomMargin = formpage.Margin.Bottom;
            pageupdate.SetFormulas(pagecells);
            pageupdate.Execute(pagesheet);

            this.Reset();
            return this.page;
        }
 public void Finish()
 {
     var update = new VA.ShapeSheet.Update();
     foreach (var block in this.Blocks)
     {
         update.SetFormulas((short)block.VisioShapeID,block.FormatCells);
         update.SetFormulas((short)block.VisioShapeID,block.Textcells);
         update.SetFormulas((short)block.VisioShapeID,block.ParagraphCells, (short)0);
         update.SetFormulas((short)block.VisioShapeID,block.CharacterCells, (short)0);
     }
     update.Execute(this.page);
 }
        public static void Set(IVisio.Shape shape, short row, CustomPropertyCells cp)
        {
            if (shape == null)
            {
                throw new ArgumentNullException("shape");
            }

            var update = new VA.ShapeSheet.Update();
            update.SetFormulas(cp, row);
            update.Execute(shape);
        }