Exemplo n.º 1
0
        private void createPrintFile()
        {
            string finaltextfile = "";
            string temptemplate  = "";
            string epc           = "";

            EpcTools epctool = new EpcTools();

            foreach (TagPrint tag in tprint)
            {
                if (tag.count > 0)
                {
                    for (int i = 0; i < tag.count; i++)
                    {
                        temptemplate  = ttemplate;
                        epc           = epctool.getNewEPC(48, 1, 5, tag.upc, tsequence[tag.upc].Sequence);
                        temptemplate  = temptemplate.Replace("<<EPC>>", epc);
                        temptemplate  = temptemplate.Replace("<<UPC>>", tag.upc);
                        temptemplate  = temptemplate.Replace("<<NAME>>", tag.name);
                        temptemplate  = temptemplate.Replace("<<BARCODEEPC>>", tag.upc);
                        finaltextfile = finaltextfile + temptemplate;
                        temptemplate  = "";
                        tsequence[tag.upc].Sequence++;
                    }
                }
            }
            setSequence(rconfig.SequenceFilePath);
            File.WriteAllText(AssemblyDirectory + "\\printfile.txt", finaltextfile);
        }