private void menuItemFilePrintPreview_Click(object sender, System.EventArgs e) { try { //this.checkPrintReqs(); PanchangaPrintDocument mdoc = new PanchangaPrintDocument(opts, h, globals, locals); PrintPreviewDialog dlgPreview = new PrintPreviewDialog(); dlgPreview.Document = mdoc; dlgPreview.ShowDialog(); } catch {} }
private void menuItemPrintPanchanga_Click(object sender, System.EventArgs e) { try { //this.checkPrintReqs(); PanchangaPrintDocument mdoc = new PanchangaPrintDocument(opts, h, globals, locals); PrintDialog dlgPrint = new PrintDialog(); dlgPrint.Document = mdoc; if (dlgPrint.ShowDialog() == DialogResult.OK) { mdoc.Print(); } } catch {} }