示例#1
0
        private void button3_Click_1(object sender, EventArgs e)
        {
            try
            {
                string st = printSakuseiList();

                PrintForm pf = new PrintForm(this, st, Common.Util.CommonTeisu.SIZE_A4, true);
                pf.ShowDialog(this);
                //if (this.printFlg == CommonTeisu.ACTION_PREVIEW)
                //{
                //    pf.execPreview(st);
                //    pf.ShowDialog(this);
                //}
                //else if (this.printFlg == CommonTeisu.ACTION_PRINT)
                //{
                //    pf.execPrint(null, st, CommonTeisu.SIZE_A4, CommonTeisu.TATE, false);
                //    pf.Close();
                //    pf.Dispose();
                //}
                pf.Dispose();
            }
            catch (Exception ex)
            {
                //データロギング
                new CommonException(ex);
                //例外発生メッセージ(OK)
                BaseMessageBox basemessagebox = new BaseMessageBox(this, CommonTeisu.TEXT_ERROR, CommonTeisu.LABEL_ERROR_MESSAGE, CommonTeisu.BTN_OK, CommonTeisu.DIAG_ERROR);
                basemessagebox.ShowDialog();
                return;
            }
        }
示例#2
0
 private void PDFPreview_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F11)
     {
         PrintForm pf = new PrintForm(this, strPath, Common.Util.CommonTeisu.SIZE_A4, false);
         pf.ShowDialog(this);
         if (this.printFlg == Common.Util.CommonTeisu.ACTION_PREVIEW)
         {
             pf.execPreview(strPath);
             pf.ShowDialog(this);
         }
         else if (this.printFlg == Common.Util.CommonTeisu.ACTION_PRINT)
         {
             pf.execPrint(null, strPath, Common.Util.CommonTeisu.SIZE_B4, Common.Util.CommonTeisu.YOKO, false);
             pf.Close();
             pf.Dispose();
         }
     }
     else if (e.KeyCode == Keys.F12)
     {
         this.Close();
     }
 }