コード例 #1
0
ファイル: PanchangaControl.cs プロジェクト: rahulyhg/mhora
 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 {}
 }
コード例 #2
0
ファイル: PanchangaControl.cs プロジェクト: rahulyhg/mhora
        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 {}
        }