Exemplo n.º 1
0
        internal ChartSheetPageSetup ExportChartSheetPageSetup()
        {
            ChartSheetPageSetup ps = new ChartSheetPageSetup();
            if (this.PaperSize != SLPaperSizeValues.LetterPaper) ps.PaperSize = (uint)this.PaperSize;
            if (this.FirstPageNumber != 1)
            {
                ps.FirstPageNumber = this.FirstPageNumber;
                ps.UseFirstPageNumber = true;
            }
            if (this.Orientation != OrientationValues.Default) ps.Orientation = this.Orientation;
            if (!this.UsePrinterDefaults) ps.UsePrinterDefaults = this.UsePrinterDefaults;
            if (this.BlackAndWhite) ps.BlackAndWhite = this.BlackAndWhite;
            if (this.Draft) ps.Draft = this.Draft;
            if (this.HorizontalDpi != 600) ps.HorizontalDpi = this.HorizontalDpi;
            if (this.VerticalDpi != 600) ps.VerticalDpi = this.VerticalDpi;
            if (this.Copies != 1) ps.Copies = this.Copies;

            return ps;
        }
Exemplo n.º 2
0
        internal void ImportChartSheetPageSetup(ChartSheetPageSetup ps)
        {
            if (ps.PaperSize != null)
            {
                if (Enum.IsDefined(typeof(SLPaperSizeValues), ps.PaperSize.Value))
                {
                    this.PaperSize = (SLPaperSizeValues)ps.PaperSize.Value;
                }
                else
                {
                    this.PaperSize = SLPaperSizeValues.LetterPaper;
                }
            }

            if (ps.FirstPageNumber != null) this.iFirstPageNumber = ps.FirstPageNumber.Value;
            if (ps.Orientation != null) this.Orientation = ps.Orientation.Value;
            if (ps.UsePrinterDefaults != null) this.UsePrinterDefaults = ps.UsePrinterDefaults.Value;
            if (ps.BlackAndWhite != null) this.BlackAndWhite = ps.BlackAndWhite.Value;
            if (ps.Draft != null) this.Draft = ps.Draft.Value;
            if (ps.HorizontalDpi != null) this.HorizontalDpi = ps.HorizontalDpi.Value;
            if (ps.VerticalDpi != null) this.VerticalDpi = ps.VerticalDpi.Value;
            if (ps.Copies != null) this.Copies = ps.Copies.Value;
        }