Esempio n. 1
0
 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 {}
 }
Esempio n. 2
0
        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 {}
        }