private void button2_Click(object sender, EventArgs e)
        {
            string[] arr = ReadTxt.ReadTxt.ReadTXT(path);
            VBprinter.VB2008Print myp = new VBprinter.VB2008Print();
            myp.PageUnits    = VBprinter.VB2008Print.PageExportUnit.CentiMeter; //以百分之一厘米为单位
            myp.PaperMargins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
            myp.NewDoc();
            //Font font1 = new Font("黑体", 12, FontStyle.Bold);
            //Font font2 = new Font("宋体", 10);

            //方框选择
            string check1, check2, check3, check4, check5;

            check1 = Check(checkBox1.Checked);
            check2 = Check(checkBox2.Checked);
            check3 = Check(checkBox3.Checked);
            check4 = Check(checkBox4.Checked);
            check5 = Check(checkBox5.Checked);
            //市县选择
            string check6 = RCheck(radioButton2.Checked);
            string check7 = RCheck(radioButton1.Checked);
            //小写金额位数
            string aa = jexx.Text;//小写金额去小数点

            aa = aa.Replace(",", "");
            aa = aa.Replace(".", "");
            int le = aa.Length;

            string[] st = St(aa);
            //str.Substring(start - 1, length));
            //打印数组
            string[] arr1 = { yy.Text,    mm.Text,    dd.Text,    check1,     check2,     check3,     textBox4.Text, check4,     check5,
                              sqrcc.Text, skrcc.Text, sqrzh.Text, skrzh.Text, sqryt.Text, hrhmc.Text, sqrdh.Text,    sheng.Text, shi.Text,check6, check7,
                              jedx.Text,  st[10],     st[9],      st[8],      st[7],      st[6],      st[5],         st[4],      st[3],   st[2],  st[1], st[0] };


            myp.NewPage();
            myp.IsImmediatePrintNotPreview = true;
            for (int i = 0; i < arr.Length; i++)
            {
                //定义字体
                Font font = new Font(arr[i].Split(',')[1].ToString(), Convert.ToInt32(arr[i].Split(',')[2]));
                //打印起点
                string x = arr[i].Split(',')[3];
                string y = arr[i].Split(',')[4];
                //myp.Location = new Point(Convert.ToInt32(Convert.ToDecimal(x) * 10), Convert.ToInt32(Convert.ToDecimal(y) * 10));
                myp.Currentx = Convert.ToInt32(Convert.ToDecimal(x) * 10);
                myp.Currenty = Convert.ToInt32(Convert.ToDecimal(y) * 10);
                myp.DrawText(arr1[i], font);
            }
            myp.EndDoc("打印预览");
        }
Exemple #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            string[] arr = ReadTxt.ReadTxt.ReadTXT(path);
            VBprinter.VB2008Print myp = new VBprinter.VB2008Print();
            myp.PageUnits    = VBprinter.VB2008Print.PageExportUnit.CentiMeter; //以百分之一厘米为单位
            myp.PaperMargins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
            myp.NewDoc();
            //方框选择
            string [] c = { Check(c1.Checked),  Check(c2.Checked),  Check(c3.Checked),
                            Check(c4.Checked),  Check(c5.Checked),  Check(c6.Checked), Check(c7.Checked),
                            Check(c8.Checked),  Check(c9.Checked),  Check(c10.Checked),Check(c11.Checked),
                            Check(c12.Checked), Check(c13.Checked), Check(c14.Checked),Check(c15.Checked),
                            Check(c16.Checked), Check(c17.Checked), Check(c18.Checked),Check(c19.Checked),
                            Check(c20.Checked), Check(c21.Checked), Check(c22.Checked),Check(c23.Checked) };
            //小写金额位数
            string aa = je.Text;//小写金额去小数点

            aa     =
                aa = aa.Replace(",", "");
            aa     = aa.Replace(".", "");
            int le = aa.Length;

            string[] st = St(aa);
            //str.Substring(start - 1, length));
            //打印数组
            string[] arr1 = { yy.Text,  mm.Text,    dd.Text,   t1.Text,              t2.Text,             t3.Text,   t4.Text,  t5.Text,   t6.Text,
                              t7.Text,  t8.Text,    t9.Text,   RCheck(xian.Checked), RCheck(shi.Checked), t10.Text,
                              yi.Text,  qianw.Text, baiw.Text, shiw.Text,            wan.Text,            qian.Text, bai.Text, shii.Text, yuan.Text,jiao.Text,fen.Text, t11.Text, t12.Text,
                              t13.Text, t14.Text,   t15.Text,  t16.Text,             t17.Text,            t18.Text,  c[0],     c[1],      c[2],     c[3],   c[4],     c[5],     c[6],
                              c[7],     c[8],       c[9],      c[10],                c[11],               c[12],     t19.Text, c[13],     c[14],    c[15],  c[16],    c[17],    c[18],   c[19],c[20],
                              c[21],    c[22],      t20.Text,  t21.Text };


            myp.NewPage();
            myp.IsImmediatePrintNotPreview = true;
            for (int i = 0; i < arr.Length; i++)
            {
                //定义字体
                Font font = new Font(arr[i].Split(',')[1].ToString(), Convert.ToInt32(arr[i].Split(',')[2]));
                //打印位置
                string x = arr[i].Split(',')[3];
                string y = arr[i].Split(',')[4];
                myp.Currentx = Convert.ToInt32(Convert.ToDecimal(x) * 10);
                myp.Currenty = Convert.ToInt32(Convert.ToDecimal(y) * 10);
                myp.DrawText(arr1[i], font);
            }
            myp.EndDoc("打印预览");
        }
Exemple #3
0
        private void button2_Click(object sender, EventArgs e)
        {
            string[] arr = ReadTxt.ReadTxt.ReadTXT(path);
            VBprinter.VB2008Print myp = new VBprinter.VB2008Print();
            myp.PageUnits    = VBprinter.VB2008Print.PageExportUnit.CentiMeter; //以百分之一厘米为单位
            myp.PaperMargins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
            myp.NewDoc();

            //方框选择
            string cc1, cc2, cc3, cc4, cc5, cc6, cc7, cc8, cc9, cc10, cc11;

            cc1  = Check(c1.Checked);
            cc2  = Check(c2.Checked);
            cc3  = Check(c3.Checked);
            cc4  = Check(c4.Checked);
            cc5  = Check(c5.Checked);
            cc6  = Check(c6.Checked);
            cc7  = Check(c7.Checked);
            cc8  = Check(c8.Checked);
            cc9  = Check(c9.Checked);
            cc10 = Check(c10.Checked);
            cc11 = Check(c11.Checked);

            //打印数组
            string[] arr1 = { t1.Text,  t2.Text,  t3.Text,  t4.Text,  t5.Text,  t6.Text,  t7.Text,  t8.Text,
                              cc1,      cc2,      t9.Text,  t10.Text, t11.Text, t12.Text, t13.Text, t14.Text,t15.Text,  t16.Text,
                              t17.Text, t18.Text, t19.Text, t20.Text, t21.Text, t22.Text, t23.Text, t24.Text,t25.Text,
                              t26.Text, t27.Text, t28.Text, cc3,      cc4,      cc5,      cc6,      cc7,     cc8,       cc9,     t29.Text,t30.Text, t31.Text,
                              t32.Text, t33.Text, t34.Text, t35.Text, t36.Text, cc10,     cc11,     t37.Text,t38.Text,  t39.Text,
                              t40.Text, t41.Text, t42.Text, t43.Text, t44.Text, t45.Text };


            myp.NewPage();
            myp.IsImmediatePrintNotPreview = true;
            for (int i = 0; i < arr.Length; i++)
            {
                //定义字体
                Font font = new Font(arr[i].Split(',')[1].ToString(), Convert.ToInt32(arr[i].Split(',')[2]));
                //打印位置
                string x = arr[i].Split(',')[3];
                string y = arr[i].Split(',')[4];
                myp.Currentx = Convert.ToInt32(Convert.ToDecimal(x) * 10);
                myp.Currenty = Convert.ToInt32(Convert.ToDecimal(y) * 10);
                myp.DrawText(arr1[i], font);
            }
            myp.EndDoc("打印预览");
        }
        private void button2_Click(object sender, EventArgs e)
        {
            string[] arr = ReadTxt.ReadTxt.ReadTXT(path);
            VBprinter.VB2008Print myp = new VBprinter.VB2008Print();
            myp.PageUnits    = VBprinter.VB2008Print.PageExportUnit.CentiMeter; //以百分之一厘米为单位
            myp.PaperMargins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
            myp.NewDoc();

            //打印数组
            string[] arr1 = { t1.Text,             Check(c2.Checked),  Check(c3.Checked),   t4.Text,             t5.Text,            t6.Text,            t7.Text,             t8.Text,            t9.Text,
                              Check(c10.Checked),  Check(c11.Checked), Check(c12.Checked),  Check(c13.Checked),  t14.Text,           t15.Text,           t16.Text,            t17.Text,
                              t18.Text,            t19.Text,           Check(c20.Checked),  Check(c21.Checked),  Check(c22.Checked), Check(c23.Checked), Check(c24.Checked),
                              Check(c25.Checked),  t26.Text,           t27.Text,            t28.Text,            t29.Text,           Check(c30.Checked), t31.Text,            Check(c32.Checked), t33.Text,
                              Check(c34.Checked),  Check(c35.Checked), Check(c36.Checked),  Check(c37.Checked),  Check(c38.Checked), Check(c39.Checked),
                              t40.Text,            Check(c41.Checked), t42.Text,            Check(c43.Checked),  Check(c44.Checked), Check(c45.Checked), Check(c46.Checked),
                              Check(c47.Checked),  Check(c48.Checked), t49.Text,            Check(c50.Checked),  Check(c51.Checked), t52.Text,           Check(c53.Checked),
                              Check(c54.Checked),  t55.Text,           Check(c56.Checked),  Check(c57.Checked),  t58.Text,           t59.Text,           t60.Text,            t61.Text,
                              t62.Text,            t63.Text,           Check(c64.Checked),  Check(c65.Checked),  Check(c66.Checked), Check(c67.Checked), Check(c68.Checked),
                              Check(c69.Checked),  Check(c70.Checked), Check(c71.Checked),  Check(c72.Checked),  Check(c73.Checked), Check(c74.Checked),
                              Check(c75.Checked),  Check(c76.Checked), t77.Text,            Check(c78.Checked),  Check(c79.Checked), Check(c80.Checked),
                              Check(c81.Checked),  Check(c82.Checked), t83.Text,            t84.Text,            t85.Text,           t86.Text,           t87.Text,            t88.Text,           t89.Text,
                              t90.Text,            t91.Text,           t92.Text,            t93.Text,            t94.Text,           t95.Text,           Check(c96.Checked),  Check(c97.Checked), Check(c98.Checked),
                              Check(c99.Checked),  t100.Text,          Check(c101.Checked), Check(c102.Checked), t103.Text,          t104.Text,          Check(c105.Checked),
                              Check(c106.Checked), t107.Text,          Check(c108.Checked), Check(c109.Checked), t110.Text,          t111.Text };


            myp.NewPage();
            myp.IsImmediatePrintNotPreview = true;
            for (int i = 0; i < arr.Length; i++)
            {
                //定义字体
                Font font = new Font(arr[i].Split(',')[1].ToString(), Convert.ToInt32(arr[i].Split(',')[2]));
                //打印位置
                string x = arr[i].Split(',')[3];
                string y = arr[i].Split(',')[4];
                myp.Currentx = Convert.ToInt32(Convert.ToDecimal(x) * 10);
                myp.Currenty = Convert.ToInt32(Convert.ToDecimal(y) * 10);
                myp.DrawText(arr1[i], font);
            }
            myp.EndDoc("打印预览");
        }
Exemple #5
0
        private void button2_Click(object sender, EventArgs e)
        {
            string[] arr = ReadTxt.ReadTxt.ReadTXT(path);
            VBprinter.VB2008Print myp = new VBprinter.VB2008Print();
            myp.PageUnits    = VBprinter.VB2008Print.PageExportUnit.CentiMeter; //以百分之一厘米为单位
            myp.PaperMargins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
            myp.NewDoc();

            //小写金额位数
            string aa = je.Text;//小写金额去小数点

            aa = aa.Replace(",", "");
            aa = aa.Replace(".", "");
            int le = aa.Length;

            string[] st = St(aa);
            //str.Substring(start - 1, length));
            //打印数组
            string[] arr1 = { tyear.Text,   tmonth.Text, tday.Text,    tjkr.Text,    tjjbh.Text,  tjkrsfzh.Text, tdkzkh.Text, tdkzh.Text,  tskzh.Text,
                              thkzh1.Text,  thkzh2.Text, tjkjedx.Text, tyi.Text,     tqwan.Text,  tbwan.Text,    tswan.Text,  twan.Text,   tqian.Text,  tbai.Text,    tshi.Text,
                              tyuan.Text,   tjiao.Text,  tfen.Text,    tyongtu.Text, tlilv.Text,  tdkfs.Text,    tjkhth.Text, tdbhth.Text, tjknian.Text,tjkyue.Text,  tjkri.Text,
                              tdqnian.Text, tdqyue.Text, tdqri.Text,   tzqnian.Text, tzqyue.Text, tzqri.Text };


            myp.NewPage();
            myp.IsImmediatePrintNotPreview = true;
            for (int i = 0; i < arr.Length; i++)
            {
                //定义字体
                Font font = new Font(arr[i].Split(',')[1].ToString(), Convert.ToInt32(arr[i].Split(',')[2]));
                //打印位置
                string x = arr[i].Split(',')[3];
                string y = arr[i].Split(',')[4];
                myp.Currentx = Convert.ToInt32(Convert.ToDecimal(x) * 10);
                myp.Currenty = Convert.ToInt32(Convert.ToDecimal(y) * 10);
                myp.DrawText(arr1[i], font);
            }
            myp.EndDoc("打印预览");
        }
Exemple #6
0
        private void button2_Click(object sender, EventArgs e)
        {
            string[] arr = ReadTxt.ReadTxt.ReadTXT(path);
            VBprinter.VB2008Print myp = new VBprinter.VB2008Print();
            myp.PageUnits    = VBprinter.VB2008Print.PageExportUnit.CentiMeter; //以百分之一厘米为单位
            myp.PaperMargins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
            myp.NewDoc();

            //方框选择
            string aa2, aa3, aa7, aa8, aa10, aa11, aa18, aa26, aa27, aa30, aa31, bb1, bb2, bb3, bb4, bb5, bb6, bb9, bb10, bb12, bb13, bb14, bb15,
                   bb16, bb17, bb18, bb19, bb20, bb21, bb22, bb23, bb25, bb26, bb27, bb28, bb29, bb30, bb31, bb32, cc1, cc4, cc6, cc7, cc8, cc9, cc12,
                   cc13, cc15, cc20, cc22, cc23, cc24, cc25, cc26, cc31;

            aa2  = Check(a2.Checked);
            aa3  = Check(a3.Checked);
            aa7  = Check(a7.Checked);
            aa8  = Check(a8.Checked);
            aa10 = Check(a10.Checked);
            aa11 = Check(a11.Checked);
            aa18 = Check(a18.Checked);
            aa26 = Check(a26.Checked);
            aa27 = Check(a27.Checked);
            aa30 = Check(a30.Checked);
            aa31 = Check(a31.Checked);
            bb1  = Check(b1.Checked);
            bb2  = Check(b2.Checked);
            bb3  = Check(b3.Checked);
            bb4  = Check(b4.Checked);
            bb5  = Check(b5.Checked);
            bb6  = Check(b6.Checked);
            bb9  = Check(b9.Checked);
            bb10 = Check(b10.Checked);
            bb12 = Check(b12.Checked);
            bb13 = Check(b13.Checked);
            bb14 = Check(b14.Checked);
            bb15 = Check(b15.Checked);
            bb16 = Check(b16.Checked);
            bb17 = Check(b17.Checked);
            bb18 = Check(b18.Checked);
            bb19 = Check(b19.Checked);
            bb20 = Check(b20.Checked);
            bb21 = Check(b21.Checked);
            bb22 = Check(b22.Checked);
            bb23 = Check(b23.Checked);
            bb25 = Check(b25.Checked);
            bb26 = Check(b26.Checked);
            bb27 = Check(b27.Checked);
            bb28 = Check(b28.Checked);
            bb29 = Check(b29.Checked);
            bb30 = Check(b30.Checked);
            bb31 = Check(b31.Checked);
            bb32 = Check(b32.Checked);
            cc1  = Check(c1.Checked);
            cc4  = Check(c4.Checked);
            cc6  = Check(c6.Checked);
            cc7  = Check(c7.Checked);
            cc8  = Check(c8.Checked);
            cc9  = Check(c9.Checked);
            cc12 = Check(c12.Checked);
            cc13 = Check(c13.Checked);
            cc15 = Check(c15.Checked);
            cc20 = Check(c20.Checked);
            cc22 = Check(c22.Checked);
            cc23 = Check(c23.Checked);
            cc24 = Check(c24.Checked);
            cc25 = Check(c25.Checked);
            cc26 = Check(c26.Checked);
            cc31 = Check(c31.Checked);

            //打印数组
            string[] arr1 = { a1.Text,  aa2,      aa3,      a4.Text,  a5.Text,  a6.Text,  aa7,      aa8,      a9.Text,  aa10,     aa11,     a12.Text,
                              a13.Text, a14.Text, a15.Text, a16.Text, a17.Text, aa18,     a19.Text, a20.Text, a21.Text, a22.Text, a23.Text,
                              a24.Text, a25.Text, aa26,     aa27,     a28.Text, a29.Text, aa30,     aa31,     a32.Text, a33.Text, a34.Text, bb1,     bb2,       bb3,
                              bb4,      bb5,      bb6,      b7.Text,  b8.Text,  bb9,      bb10,     b11.Text, bb12,     bb13,     bb14,     bb15,    bb16,      bb17,    bb18, bb19,    bb20, bb21,
                              bb22,     bb23,     b24.Text, bb25,     bb26,     bb27,     bb28,     bb29,     bb30,     bb31,     bb32,     cc1,     c2.Text,   c3.Text, cc4,  c5.Text, cc6,
                              cc7,      cc8,      cc9,      c10.Text, c11.Text, cc12,     cc13,     c14.Text, cc15,     c16.Text, c17.Text, c18.Text,c19.Text,  cc20,
                              c21.Text, cc22,     cc23,     cc24,     cc25,     cc26,     c27.Text, c28.Text, c29.Text, c30.Text, cc31,     c32.Text,c33.Text,  c34.Text,
                              c35.Text, c36.Text, c37.Text, c38.Text, c39.Text, c40.Text, c41.Text, c42.Text, c43.Text };


            myp.NewPage();
            myp.IsImmediatePrintNotPreview = true;
            for (int i = 0; i < arr.Length; i++)
            {
                //定义字体
                Font font = new Font(arr[i].Split(',')[1].ToString(), Convert.ToInt32(arr[i].Split(',')[2]));
                //打印位置
                string x = arr[i].Split(',')[3];
                string y = arr[i].Split(',')[4];
                myp.Currentx = Convert.ToInt32(Convert.ToDecimal(x) * 10);
                myp.Currenty = Convert.ToInt32(Convert.ToDecimal(y) * 10);
                myp.DrawText(arr1[i], font);
            }
            this.TopMost = false;

            //myp.EndDoc("打印预览");
            if (MessageBox.Show("是否打印个税声明?", "Confirm Message", MessageBoxButtons.OKCancel) == DialogResult.OK)
            {
                //myp.NewDoc();
                string   tx1   = a1.Text;
                string   tx2   = "身份证";
                string   tx3   = a13.Text;
                string   tx4   = ((char)8730).ToString();
                string[] arr11 = ReadTxt.ReadTxt.ReadTXT("print\\gssm.dat");
                string[] arr12 = { tx1, tx2, tx3, tx4 };
                myp.NewPage();
                myp.IsImmediatePrintNotPreview = true;
                for (int i1 = 0; i1 < arr11.Length; i1++)
                {
                    //定义字体
                    Font font1 = new Font(arr[i1].Split(',')[1].ToString(), Convert.ToInt32(arr[i1].Split(',')[2]));
                    //打印位置
                    string x1 = arr[i1].Split(',')[3];
                    string y1 = arr[i1].Split(',')[4];
                    //myp.Location = new Point(Convert.ToInt32(Convert.ToDecimal(x) * 10), Convert.ToInt32(Convert.ToDecimal(y) * 10));
                    myp.Currentx = Convert.ToInt32(Convert.ToDecimal(x1) * 10);
                    myp.Currenty = Convert.ToInt32(Convert.ToDecimal(y1) * 10);
                    myp.DrawText(arr12[i1], font1);
                }



                //delete
            }
            myp.EndDoc("打印预览");
            this.TopMost = true;
        }