Esempio n. 1
0
        public void TestMethod9()
        {
            var barcodTemplate = "0000740617300000039000000015800000001KING-B913U";
            var expect         = ">;000074061730000003900000001580000000>61KING-B913U";
            var actual         = BarcodeConverter128.StringToBarcodeZplFormat(barcodTemplate);

            Assert.AreEqual(expect, actual);
        }
Esempio n. 2
0
        public void TestMethod6()
        {
            var barcodTemplate = "000074061730000003900000001580000000115-9917-02";
            var expect         = ">;00007406173000000390000000158000000011>65-9917-02";
            var actual         = BarcodeConverter128.StringToBarcodeZplFormat(barcodTemplate);

            Assert.AreEqual(expect, actual);
        }
Esempio n. 3
0
        public void TestMethod1()
        {
            var barcodTemplate = "S/N:941001-0114-0001";
            var expect         = ">:S/N:>5941001>6-0114->50001";
            var actual         = BarcodeConverter128.StringToBarcodeZplFormat(barcodTemplate);

            Assert.AreEqual(expect, actual);
        }
Esempio n. 4
0
        public void TestMethod3()
        {
            var barcodTemplate = "00007406173000000390000000158000000017100703OUT";
            var expect         = ">;00007406173000000390000000158000000017100703>6OUT";
            var actual         = BarcodeConverter128.StringToBarcodeZplFormat(barcodTemplate);

            Assert.AreEqual(expect, actual);
        }
Esempio n. 5
0
        public void TestMethod8()
        {
            var barcodTemplate = "0000740617300000039000000015800000001135S00130";
            var expect         = ">;0000740617300000039000000015800000001135>6S0>50130";

            var actual = BarcodeConverter128.StringToBarcodeZplFormat(barcodTemplate);

            Assert.AreEqual(expect, actual);
        }
Esempio n. 6
0
        public void TestMethod7()
        {
            var barcodTemplate = "0000740617300000039000000015800000001622-28670";
            var expect         = ">;0000740617300000039000000015800000001622>6-2>58670";

            var actual = BarcodeConverter128.StringToBarcodeZplFormat(barcodTemplate);

            Assert.AreEqual(expect, actual);
        }
Esempio n. 7
0
        public void TestMethod13()
        {
            var barcodTemplate = "00007406173000000390000000158000000010344655 A024148";
            var expect         = ">;00007406173000000390000000158000000010344655>6 A>5024148";

            var actual = BarcodeConverter128.StringToBarcodeZplFormat(barcodTemplate);

            Assert.AreEqual(expect, actual);
        }
Esempio n. 8
0
        private static void Main(string[] args)
        {
            var zplcodeList = new List <string>();


            var barcodTemplate = "0000740617300000039000000015800000001622-28670";

            zplcodeList.Add(BarcodeConverter128.StringToBarcodeZplFormat(barcodTemplate));

            barcodTemplate = "0000740617300000039000000015800000001135S00130";
            zplcodeList.Add(BarcodeConverter128.StringToBarcodeZplFormat(barcodTemplate));

            barcodTemplate = "0000740617300000039000000015800000001KING-B913U";
            zplcodeList.Add(BarcodeConverter128.StringToBarcodeZplFormat(barcodTemplate));

            barcodTemplate = "0000740617300000039000000015800000001KIN1280";
            zplcodeList.Add(BarcodeConverter128.StringToBarcodeZplFormat(barcodTemplate));

            barcodTemplate = "0000740617300000039000000015800000001KING-B4308";
            zplcodeList.Add(BarcodeConverter128.StringToBarcodeZplFormat(barcodTemplate));

            barcodTemplate = "0000740617300000039000000015800000001KSG-O2/128";
            zplcodeList.Add(BarcodeConverter128.StringToBarcodeZplFormat(barcodTemplate));

            barcodTemplate = "00007406173000000390000000158000000010344655 A024148";
            zplcodeList.Add(BarcodeConverter128.StringToBarcodeZplFormat(barcodTemplate));

            barcodTemplate = "0000740617300000039000000015800000001A029369";
            zplcodeList.Add(BarcodeConverter128.StringToBarcodeZplFormat(barcodTemplate));

            barcodTemplate = "0000740617300000039000000015800000001KST-E-09305";
            zplcodeList.Add(BarcodeConverter128.StringToBarcodeZplFormat(barcodTemplate));

            barcodTemplate = "0000740617300000039000000015800000001N18201";
            zplcodeList.Add(BarcodeConverter128.StringToBarcodeZplFormat(barcodTemplate));

            barcodTemplate = "0000740617300000039000000015800000001KIN-KGEN/14+";
            zplcodeList.Add(BarcodeConverter128.StringToBarcodeZplFormat(barcodTemplate));

            barcodTemplate = "0000740617300000039000000015800000001KIN-KGM100X64SC2/128";
            zplcodeList.Add(BarcodeConverter128.StringToBarcodeZplFormat(barcodTemplate));

            barcodTemplate = "000074061730000003900000001580000000107091682-R";
            zplcodeList.Add(BarcodeConverter128.StringToBarcodeZplFormat(barcodTemplate));

            barcodTemplate = "000074061730000003900000001580000000142000656-02-R";
            zplcodeList.Add(BarcodeConverter128.StringToBarcodeZplFormat(barcodTemplate));

            barcodTemplate = "0000740617300000039000000015800000001GDN7X";
            zplcodeList.Add(BarcodeConverter128.StringToBarcodeZplFormat(barcodTemplate));

            string result = null;

            var i      = 0;
            var height = 110;

            foreach (var zpl in zplcodeList)
            {
                result = result + "^FT49," + height + "^BCN,61,N,N,Y^FD" + zpl + "^FS" + "\r\n";

                height = height + 150;
                i++;
            }


            const string top = "^XA" + "\r\n" +
                               "^LS10" + "\r\n" +
                               "^PR3,6,6^FS" + "\r\n" +
                               "^JWH^FS" + "\r\n" +
                               "^JZY" + "\r\n" +
                               "^JJ0,0^FS" + "\r\n" +
                               "^MNY^FS" + "\r\n";

            const string down = "^PQ1,0,0,Y" + "\r\n" +
                                "^XZ" + "\r\n" +
                                "^XA" + "\r\n" +
                                "^IDSTRNWARE" + "\r\n" +
                                "^XZ";

            var zplstr = "";

            zplstr = top + result + down;


            using (var sw = new StreamWriter("label.zpl"))
            {
                sw.Write(zplstr);
            }
        }