예제 #1
0
        public static string GetLabelMultiZpl(params ZplMultiParam[] parms)
        {
            if ((parms == null) || (parms.Length < 1))
            {
                return null;
            }

            ZplSetup setup = new ZplSetup(); // setup clear/default

            ZplClear clear = new ZplClear(); // clear after labels print

            StringBuilder sb = new StringBuilder();

            foreach (string instr in setup.Instructions)
            {
                sb.Append(instr);
            }

            foreach (var parm in parms)
            {
                ZplCstMulti lbl = new ZplCstMulti(parm);

                sb.Append(Environment.NewLine);
                foreach (string instr in lbl.Instructions)
                {
                    sb.Append(instr);
                }
            }

            sb.Append(Environment.NewLine);
            foreach (string instr in clear.Instructions)
            {
                sb.Append(instr);
            }

            return sb.ToString();
        }
예제 #2
0
        protected string GetLabelMultiZpl()
        {
            ZplSetup setup = new ZplSetup(); // setup clear/default

            ZplCstMulti lbl1 = new ZplCstMulti
            {
                SerialNo = "111111",
                ProdCD = "101010",
                ProdDescr = "One Truck",
                ColorCD = "001",
                ColorDescr = "Unimer",
                DecoStr = "EPH",
                Note = "Notes",
                Pattern = "1111111-PT",
                EmbStr = "E-1018",
                HSStr = "H-3e3e",
                PerfStr = "P-4532",
                Priority = "Priority",
                PrdnOrder = "1523ALX"
            };
            ZplCstMulti lbl2 = new ZplCstMulti
            {
                SerialNo = "2222222",
                ProdCD = "20202",
                ProdDescr = "Second Truck",
                ColorCD = "002",
                ColorDescr = "Doesimer",
                DecoStr = "EPH",
                Note = "Notes",
                Pattern = "111111-PT",
                EmbStr = "E-1018",
                Priority = "Priority",
                PrdnOrder = "1523ALX"
            };
            ZplCstMulti lbl3 = new ZplCstMulti
            {
                SerialNo = "333986",
                ProdCD = "482822",
                ProdDescr = "Big red Truck",
                Note = "Notes",
                Pattern = "1234567-PT",
                Priority = "Priority",
                PrdnOrder = "1523ALX"
            };
            ZplClear clear = new ZplClear(); // clear after labels print

            StringBuilder sb = new StringBuilder();

            foreach (string instr in setup.Instructions)
            {
                sb.Append(instr);
            }

            sb.Append(Environment.NewLine);
            foreach (string instr in lbl1.Instructions)
            {
                sb.Append(instr);
            }
            sb.Append(Environment.NewLine);
            foreach (string instr in lbl2.Instructions)
            {
                sb.Append(instr);
            }

            sb.Append(Environment.NewLine);
            foreach (string instr in clear.Instructions)
            {
                sb.Append(instr);
            }

            return sb.ToString();
        }