Ejemplo n.º 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();
        }
Ejemplo n.º 2
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();
            }
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 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();
 }
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 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();
 }
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 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();
 }
Ejemplo n.º 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();
        }