Ejemplo n.º 1
0
        public IVisio.Page CreatePage(FormPage formpage)
        {
            this._form_page = formpage;

            this._page      = this._visio_pages.Add();
            this._page.Name = formpage.Name;

            // Update the Page Cells
            var pagesheet = this._page.PageSheet;
            var writer    = new SrcWriter();

            var page_fmt_cells = new Pages.PageFormatCells();

            page_fmt_cells.Width  = formpage.Size.Width;
            page_fmt_cells.Height = formpage.Size.Height;

            var page_print_cells = new Pages.PagePrintCells();

            page_print_cells.LeftMargin   = formpage.PageMargin.Left;
            page_print_cells.RightMargin  = formpage.PageMargin.Right;
            page_print_cells.TopMargin    = formpage.PageMargin.Top;
            page_print_cells.BottomMargin = formpage.PageMargin.Bottom;

            page_fmt_cells.SetFormulas(writer);
            page_fmt_cells.SetFormulas(writer);

            writer.Commit(pagesheet);

            this.Reset();
            return(this._page);
        }
Ejemplo n.º 2
0
        public override Pages.PagePrintCells CellDataToCellGroup(VisioAutomation.Utilities.ArraySegment <ShapeSheet.CellData> row)
        {
            var cells = new Pages.PagePrintCells();

            cells.LeftMargin   = row[this.LeftMargin];
            cells.CenterX      = row[this.CenterX];
            cells.CenterY      = row[this.CenterY];
            cells.OnPage       = row[this.OnPage];
            cells.BottomMargin = row[this.BottomMargin];
            cells.RightMargin  = row[this.RightMargin];
            cells.PagesX       = row[this.PagesX];
            cells.PagesY       = row[this.PagesY];
            cells.TopMargin    = row[this.TopMargin];
            cells.PaperKind    = row[this.PaperKind];
            cells.Grid         = row[this.Grid];
            cells.Orientation  = row[this.PageOrientation];
            cells.ScaleX       = row[this.ScaleX];
            cells.ScaleY       = row[this.ScaleY];
            cells.PaperSource  = row[this.PaperSource];
            return(cells);
        }