예제 #1
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();
        }
예제 #2
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();
        }
예제 #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...
     using (PrintPreviewDialog printDlg = new PrintPreviewDialog())
     {
         PrintDocument doc = GetCommonPrintDocument();
         printDlg.Document = doc;
         PrintManager pm = new PrintManager(doc, this.host, this, true);
         pm.Print();
         printDlg.ShowDialog();
     }
 }
예제 #4
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();
            }
        }
예제 #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      = 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();
        }
예제 #6
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();
            }
        }
예제 #7
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();
 }
예제 #8
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();
            }
        }
예제 #9
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();
 }
예제 #10
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();
            }
        }
예제 #11
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();
 }
예제 #12
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();
        }