BaconBuilder.View.MainWindow.printDocument_PrintPage C# (CSharp) Метод

printDocument_PrintPage() приватный Метод

Print multiple pages. Russell
private printDocument_PrintPage ( object sender, System.Drawing.Printing.PrintPageEventArgs e ) : void
sender object
e System.Drawing.Printing.PrintPageEventArgs
Результат void
        private void printDocument_PrintPage(object sender, PrintPageEventArgs e)
        {
            //e.Graphics.DrawRectangle(Pens.Red, new Rectangle (e.MarginBounds.X, e.MarginBounds.Y, e.MarginBounds.Width, e.MarginBounds.Height));
            //Info width = 827
            //Info height = 1169
            float top = e.MarginBounds.Top;
            float bot = e.MarginBounds.Top;
            for (; _codecount < Files.Count; _codecount++)
            {
                if (bot > e.MarginBounds.Bottom)
                {
                    e.HasMorePages = true;
                    return;
                }

                var info = new FileInfo(Files[_codecount].Text);
                var text = info.Name.Substring(0, info.Name.Length - info.Extension.Length);

                float height;
                PrintCodeImageText(e, text, ref top, out bot, 32, out height);
                bot = top + height;
            }

             e.HasMorePages = false;
        }