private void printPreviewToolStripMenuItem_Click(object sender, EventArgs e) { EnhancedPrintPreviewDialog newPreview = new EnhancedPrintPreviewDialog(); newPreview.Owner = this; newPreview.ShowDialog(); }
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(); } }
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; }