示例#1
0
文件: Form1.cs 项目: zhifu10001/YAGP
        private void printPreviewToolStripMenuItem_Click(object sender, EventArgs e)
        {
            EnhancedPrintPreviewDialog newPreview = new EnhancedPrintPreviewDialog();

            newPreview.Owner = this;
            newPreview.ShowDialog();
        }
示例#2
0
        private void previewToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var previewDlg = new EnhancedPrintPreviewDialog();

            previewDlg.ShowPageSettingsButton         = true;
            previewDlg.ShowPrinterSettingsButton      = true;
            previewDlg.ShowPrinterSettingsBeforePrint = true;

            using (var printBmp = drawToImage())
            {
                var pd = new TreePrintDoc(printBmp);

                previewDlg.OnPrintRangeSet += pd.OnPrintRangeSet;

                if (_pageSettings != null)
                {
                    pd.DefaultPageSettings = _pageSettings;
                }
                if (_printSettings != null)
                {
                    pd.PrinterSettings = _printSettings;
                }

                previewDlg.Document      = pd;
                previewDlg.Owner         = this;
                previewDlg.StartPosition = FormStartPosition.CenterParent;
                previewDlg.ShowDialog();
            }
        }
示例#3
0
        private void printPreviewToolStripMenuItem_Click(object sender, EventArgs e)
        {
            drawer.AncData = _ancIndi;
            EnhancedPrintPreviewDialog newPreview = new EnhancedPrintPreviewDialog();

            newPreview.Owner    = this;
            newPreview.Document = drawer.PrintAncTree();
            newPreview.ShowDialog();
            drawer.AncData = null;
        }