コード例 #1
0
ファイル: ScintillaPrintDocument.cs プロジェクト: ngoffee/ela
        private Rectangle DrawHeader(Graphics oGraphics, Rectangle oBounds, PageInformation oHeader)
        {
            if (oHeader.Display)
            {
                Rectangle oHeaderBounds = new Rectangle(oBounds.Left, oBounds.Top, oBounds.Width, oHeader.Height);

                oHeader.Draw(oGraphics, oHeaderBounds, this.DocumentName, _iCurrentPage);

                return(new Rectangle(
                           oBounds.Left, oBounds.Top + oHeaderBounds.Height + oHeader.Margin,
                           oBounds.Width, oBounds.Height - oHeaderBounds.Height - oHeader.Margin
                           ));
            }
            else
            {
                return(oBounds);
            }
        }
コード例 #2
0
ファイル: ScintillaPrintDocument.cs プロジェクト: ngoffee/ela
        private Rectangle DrawFooter(Graphics oGraphics, Rectangle oBounds, PageInformation oFooter)
        {
            if (oFooter.Display)
            {
                int       iHeight       = oFooter.Height;
                Rectangle oFooterBounds = new Rectangle(oBounds.Left, oBounds.Bottom - iHeight, oBounds.Width, iHeight);

                oFooter.Draw(oGraphics, oFooterBounds, this.DocumentName, _iCurrentPage);

                return(new Rectangle(
                           oBounds.Left, oBounds.Top,
                           oBounds.Width, oBounds.Height - oFooterBounds.Height - oFooter.Margin
                           ));
            }
            else
            {
                return(oBounds);
            }
        }
コード例 #3
0
        private Rectangle DrawHeader(Graphics oGraphics, Rectangle oBounds, PageInformation oHeader)
        {
            if (oHeader.Display)
            {
                Rectangle oHeaderBounds = new Rectangle(oBounds.Left, oBounds.Top, oBounds.Width, oHeader.Height);

                oHeader.Draw(oGraphics, oHeaderBounds, this.DocumentName, _iCurrentPage);

                return new Rectangle(
                    oBounds.Left, oBounds.Top + oHeaderBounds.Height + oHeader.Margin,
                    oBounds.Width, oBounds.Height - oHeaderBounds.Height - oHeader.Margin
                    );
            }
            else
            {
                return oBounds;
            }
        }
コード例 #4
0
        private Rectangle DrawFooter(Graphics oGraphics, Rectangle oBounds, PageInformation oFooter)
        {
            if (oFooter.Display)
            {
                int iHeight = oFooter.Height;
                Rectangle oFooterBounds = new Rectangle(oBounds.Left, oBounds.Bottom - iHeight, oBounds.Width, iHeight);

                oFooter.Draw(oGraphics, oFooterBounds, this.DocumentName, _iCurrentPage);

                return new Rectangle(
                    oBounds.Left, oBounds.Top,
                    oBounds.Width, oBounds.Height - oFooterBounds.Height - oFooter.Margin
                    );
            }
            else
            {
                return oBounds;
            }
        }