Пример #1
0
        public PrintDoc()
        {
            this.BeginPrint += new PrintEventHandler(PrintDoc_BeginPrint);
            this.PrintPage  += new System.Drawing.Printing.PrintPageEventHandler(PrintDoc_PrintPage);

            this.Items = new List <IPrintable>();

            PrintDialogBox = new PrintDialog
            {
                Document         = this,
                ShowNetwork      = true,
                UseEXDialog      = true,
                AllowCurrentPage = true,
                AllowPrintToFile = true,
                AllowSelection   = true,
                AllowSomePages   = true,
                ShowHelp         = true
            };

            PrintPreviewDialogBox = new PrintPreviewDialog
            {
                Document = this
            };
            PrintPreviewDialogBox.Scale(new SizeF(1.4f, 1.4f));
            PrintPreviewDialogBox.Load += new EventHandler(m_pp_Load);
        }