示例#1
0
        /// <summary>
        /// Displays a Print Preview dialog box.
        /// </summary>
        public void ShowPrintPreviewDialog()
        {
            // TODO: find out why it apparently only shows the first page on the preview...
            PrintPreviewDialog printDlg = new PrintPreviewDialog();
            PrintDocument      doc      = this.GetCommonPrintDocument();

            printDlg.Document = doc;
            PrintManager pm = new PrintManager(doc, this.host, this, true);

            pm.Print();
            printDlg.ShowDialog();
        }
        /// <summary>
        /// Displays a Print dialog box.
        /// </summary>
        public void ShowPrintDialog()
        {
            PrintDialog   printDlg = new PrintDialog();
            PrintDocument doc      = this.GetCommonPrintDocument();

            printDlg.Document = doc;

            if (printDlg.ShowDialog() == DialogResult.OK)
            {
                PrintManager pm = new PrintManager(doc, this.host, this, false);
                pm.Print();
            }
        }
示例#3
0
        /// <summary>
        /// Displays a Print Preview dialog box.
        /// </summary>
        public void ShowPrintPreviewDialog()
        {
            // TODO: find out why it apparently only shows the first page on the preview...
            PrintPreviewDialog printDlg = new PrintPreviewDialog();
            PrintDocument      doc      = new PrintDocument();

            doc.DocumentName        = this.DocumentTitle;
            doc.DefaultPageSettings = PageSettings;
            doc.OriginAtMargins     = true;
            printDlg.Document       = doc;
            PrintManager pm = new PrintManager(doc, this, true);

            pm.Print();
            printDlg.ShowDialog();
        }
示例#4
0
        /// <summary>
        /// Displays a Print dialog box.
        /// </summary>
        public void ShowPrintDialog()
        {
            PrintDialog   printDlg = new PrintDialog();
            PrintDocument doc      = new PrintDocument();

            doc.DocumentName = this.DocumentTitle;
            doc.DefaultPageSettings.Margins = new Margins(500, 100, 100, 100);
            doc.OriginAtMargins             = true;
            printDlg.Document = doc;

            if (printDlg.ShowDialog() == DialogResult.OK)
            {
                PrintManager pm = new PrintManager(doc, this);
                pm.Print();
            }
        }
示例#5
0
 /// <summary>
 /// Displays a Print Preview dialog box.
 /// </summary>
 public void ShowPrintPreviewDialog()
 {
     // TODO: find out why it apparently only shows the first page on the preview...
     PrintPreviewDialog printDlg = new PrintPreviewDialog();
     PrintDocument doc = this.GetCommonPrintDocument();
     printDlg.Document = doc;
     PrintManager pm = new PrintManager(doc, this.host, this, true);
     pm.Print();
     printDlg.ShowDialog();
 }
示例#6
0
        /// <summary>
        /// Displays a Print dialog box.
        /// </summary>
        public void ShowPrintDialog()
        {
            PrintDialog printDlg = new PrintDialog();
            PrintDocument doc = this.GetCommonPrintDocument();
            printDlg.Document = doc;

            if (printDlg.ShowDialog() == DialogResult.OK)
            {
                PrintManager pm = new PrintManager(doc, this.host, this, false);
                pm.Print();
            }
        }
示例#7
0
 /// <summary>
 /// Prints the document using the current print and page settings.
 /// </summary>
 public void Print()
 {
     PrintDocument doc = this.GetCommonPrintDocument();
     PrintManager pm = new PrintManager(doc, this.host, this, false);
     pm.Print();
 }
示例#8
0
        /// <summary>
        /// Displays a Print dialog box.
        /// </summary>
        public void ShowPrintDialog()
        {
            PrintDialog printDlg = new PrintDialog();
            PrintDocument doc = new PrintDocument();
            doc.DocumentName = this.DocumentTitle;
            doc.DefaultPageSettings.Margins = new Margins(500, 100, 100, 100);
            doc.OriginAtMargins = true;
            printDlg.Document = doc;

            if (printDlg.ShowDialog() == DialogResult.OK)
            {
                PrintManager pm = new PrintManager(doc, this);
                pm.Print();
            }
        }
示例#9
0
 /// <summary>
 /// Displays a Print Preview dialog box.
 /// </summary>
 public void ShowPrintPreviewDialog()
 {
     // TODO: find out why it apparently only shows the first page on the preview...
     PrintPreviewDialog printDlg = new PrintPreviewDialog();
     PrintDocument doc = new PrintDocument();
     doc.DocumentName = this.DocumentTitle;
     doc.DefaultPageSettings = PageSettings;
     doc.OriginAtMargins = true;
     printDlg.Document = doc;
     PrintManager pm = new PrintManager(doc, this, true);
     pm.Print();
     printDlg.ShowDialog();
 }
示例#10
0
        // printing methods

        /// <summary>
        /// Prints the document using the current print and page settings.
        /// </summary>
        public void Print()
        {
            PrintDocument doc = new PrintDocument();
            doc.DocumentName = this.DocumentTitle;
            doc.DefaultPageSettings = PageSettings;
            doc.OriginAtMargins = true;
            PrintManager pm = new PrintManager(doc, this, false);
            pm.Print();
        }