Exemplo n.º 1
0
        private void Button1_Click(object sender, EventArgs e)
        {
            B_EV4D_GH17_R b_ev4D = new B_EV4D_GH17_R("A4", cbPrinter.Text, dt, stringList, frameList, hyoudaiList, tbZoom.Text.Trim());

            //pictureBox1.Image = b_ev4D.GetPrintImage(pictureBox1);
            b_ev4D.Print();
        }
Exemplo n.º 2
0
        private void btnHyouji_Click(object sender, EventArgs e)
        {
            //if (sender.GetType().Equals(typeof(TextBox)))
            //{
            //    if (((TextBox)sender).Text == "")
            //    {
            //        return;
            //    }
            //}

            ////////////////////////////////////////////////////////////////////////////////////////////////////////////
            // コピペ対象コード
            //文字列
            stringList.Clear();
            if (tbStr1.Text.Trim() != "")
            {
                stringList.Add(new string[] { tbH1.Text, tbW1.Text, tbX1.Text, tbY1.Text, tbStr1.Text, comboBox1.Text, "128", "0" });
            }
            if (tbStr2.Text.Trim() != "")
            {
                stringList.Add(new string[] { tbH2.Text, tbW2.Text, tbX2.Text, tbY2.Text, tbStr2.Text, comboBox2.Text, "128", "0" });
            }
            if (tbStr3.Text.Trim() != "")
            {
                stringList.Add(new string[] { tbH3.Text, tbW3.Text, tbX3.Text, tbY3.Text, tbStr3.Text, comboBox3.Text, "128", "0" });
            }
            if (tbStr4.Text.Trim() != "")
            {
                stringList.Add(new string[] { tbH4.Text, tbW4.Text, tbX4.Text, tbY4.Text, tbStr4.Text, comboBox4.Text, "128", "0" });
            }
            if (tbStr5.Text.Trim() != "")
            {
                stringList.Add(new string[] { tbH5.Text, tbW5.Text, tbX5.Text, tbY5.Text, tbStr5.Text, comboBox5.Text, "128", "0" });
            }
            if (tbStr6.Text.Trim() != "")
            {
                stringList.Add(new string[] { tbH6.Text, tbW6.Text, tbX6.Text, tbY6.Text, tbStr6.Text, comboBox6.Text, "128", "0" });
            }
            if (tbStr7.Text.Trim() != "")
            {
                stringList.Add(new string[] { tbH7.Text, tbW7.Text, tbX7.Text, tbY7.Text, tbStr7.Text, comboBox7.Text, "128", "0" });
            }
            if (tbStr8.Text.Trim() != "")
            {
                stringList.Add(new string[] { tbH8.Text, tbW8.Text, tbX8.Text, tbY8.Text, tbStr8.Text, comboBox8.Text, "128", "0" });
            }
            if (tbStr9.Text.Trim() != "")
            {
                stringList.Add(new string[] { tbH9.Text, tbW9.Text, tbX9.Text, tbY9.Text, tbStr9.Text, comboBox9.Text, "128", "0" });
            }
            if (tbStr10.Text.Trim() != "")
            {
                stringList.Add(new string[] { tbH10.Text, tbW10.Text, tbX10.Text, tbY10.Text, tbStr10.Text, comboBox10.Text, "128", "0" });
            }
            //バーコード
            if (tbStr21.Text.Trim() != "")
            {
                stringList.Add(new string[] { tbH21.Text, tbW21.Text, tbX21.Text, tbY21.Text, tbStr21.Text, comboBox21.Text, "0", "0" });
            }
            if (tbStr22.Text.Trim() != "")
            {
                stringList.Add(new string[] { tbH22.Text, tbW22.Text, tbX22.Text, tbY22.Text, tbStr22.Text, comboBox22.Text, "128", "0" });
            }
            if (tbStr23.Text.Trim() != "")
            {
                stringList.Add(new string[] { tbH23.Text, tbW23.Text, tbX23.Text, tbY23.Text, tbStr23.Text, comboBox23.Text, "0", "0" });
            }
            if (tbStr24.Text.Trim() != "")
            {
                stringList.Add(new string[] { tbH24.Text, tbW24.Text, tbX24.Text, tbY24.Text, tbStr24.Text, comboBox24.Text, "128", "0" });
            }
            //枠あり文字
            if (tbStr25.Text.Trim() != "")
            {
                stringList.Add(new string[] {
                    tbH25.Text == "" ? "0" : tbH25.Text,
                    tbW25.Text == "" ? "0" : tbW25.Text,
                    tbX25.Text == "" ? "0" : tbX25.Text,
                    tbY25.Text == "" ? "0" : tbY25.Text,
                    tbStr25.Text,
                    comboBox25.Text, "128",
                    cbVertival.Checked == true ? "900" : "0"
                });
            }
            frameList.Clear();
            if (tbStr25.Text.Trim() != "")
            {
                frameList.Add(new string[] {
                    tbH26.Text == "" ? "0" : tbH26.Text,
                    tbW26.Text == "" ? "0" :tbW26.Text,
                    tbX26.Text == "" ? "0" : tbX26.Text,
                    tbY26.Text == "" ? "0" : tbY26.Text
                });
            }
            //表題
            hyoudaiList.Clear();
            if (tbStr11.Text.Trim() != "")
            {
                hyoudaiList.Add(new string[] { tbH11.Text, tbW11.Text, tbX11.Text, tbY11.Text, tbStr11.Text, comboBox11.Text, "128", "0" });
            }
            if (tbStr12.Text.Trim() != "")
            {
                hyoudaiList.Add(new string[] { tbH12.Text, tbW12.Text, tbX12.Text, tbY12.Text, tbStr12.Text, comboBox12.Text, "128", "0" });
            }
            if (tbStr13.Text.Trim() != "")
            {
                hyoudaiList.Add(new string[] { tbH13.Text, tbW13.Text, tbX13.Text, tbY13.Text, tbStr13.Text, comboBox13.Text, "128", "0" });
            }
            if (tbStr14.Text.Trim() != "")
            {
                hyoudaiList.Add(new string[] { tbH14.Text, tbW14.Text, tbX14.Text, tbY14.Text, tbStr14.Text, comboBox14.Text, "128", "0" });
            }
            if (tbStr15.Text.Trim() != "")
            {
                hyoudaiList.Add(new string[] { tbH15.Text, tbW15.Text, tbX15.Text, tbY15.Text, tbStr15.Text, comboBox15.Text, "128", "0" });
            }
            if (tbStr16.Text.Trim() != "")
            {
                hyoudaiList.Add(new string[] { tbH16.Text, tbW16.Text, tbX16.Text, tbY16.Text, tbStr16.Text, comboBox16.Text, "128", "0" });
            }
            if (tbStr17.Text.Trim() != "")
            {
                hyoudaiList.Add(new string[] { tbH17.Text, tbW17.Text, tbX17.Text, tbY17.Text, tbStr17.Text, comboBox17.Text, "128", "0" });
            }
            if (tbStr18.Text.Trim() != "")
            {
                hyoudaiList.Add(new string[] { tbH18.Text, tbW18.Text, tbX18.Text, tbY18.Text, tbStr18.Text, comboBox18.Text, "128", "0" });
            }
            if (tbStr19.Text.Trim() != "")
            {
                hyoudaiList.Add(new string[] { tbH19.Text, tbW19.Text, tbX19.Text, tbY19.Text, tbStr19.Text, comboBox19.Text, "128", "0" });
            }
            if (tbStr20.Text.Trim() != "")
            {
                hyoudaiList.Add(new string[] { tbH20.Text, tbW20.Text, tbX20.Text, tbY20.Text, tbStr20.Text, comboBox20.Text, "128", "0" });
            }
            // コピペ対象コード ここまで
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////
            B_EV4D_GH17_R b_ev4D = new B_EV4D_GH17_R("", "", dt, stringList, frameList, hyoudaiList, "1.0");

            pictureBox1.Image = b_ev4D.GetPrintImage(pictureBox1);
        }