Exemplo n.º 1
0
        private XRBarCode CreateBarCode(BarCodeTypes Type)
        {
            XRBarCode barCode = null;

            switch (Type)
            {
            case BarCodeTypes.Codabar:
                barCode = CreateCodabarBarCode("0123-456789");
                break;

            case BarCodeTypes.Code11:
                barCode = CreateCode11BarCode("0123-456789");
                break;

            case BarCodeTypes.Code39:
                barCode = CreateCode39BarCode("01234-ABCD");
                break;

            case BarCodeTypes.Code39Extended:
                barCode = CreateCode39ExBarCode("012-Abc");
                break;

            case BarCodeTypes.Code93:
                barCode = CreateCode93BarCode("01234-ABCD");
                break;

            case BarCodeTypes.Code93Extended:
                barCode = CreateCode93ExBarCode("012-Abc");
                break;

            case BarCodeTypes.Code128:
                barCode = CreateCode128BarCode("01234-ABcd");
                break;

            case BarCodeTypes.EAN8:
                barCode = CreateEAN8BarCode("01234567");
                break;

            case BarCodeTypes.EAN13:
                barCode = CreateEAN13BarCode("0123456789");
                break;

            case BarCodeTypes.GS1128:
                barCode = CreateGS1128BarCode("01234-Abcd");
                break;

            case BarCodeTypes.GS1DataBar:
                barCode = CreateDataBarGS1BarCode("01906141410000153202000150");
                break;

            case BarCodeTypes.DataMatrix:
                barCode = CreateDataMatrixBarCode("01234-ABCD");
                break;

            case BarCodeTypes.DataMatrixGS1:
                barCode = CreateDataMatrixGS1BarCode("01234-ABCD");
                break;

            case BarCodeTypes.Industrial2of5:
                barCode = CreateIndustrial2of5BarCode("0123456789");
                break;

            case BarCodeTypes.IntelligentMail:
                barCode = CreateIntelligentMailBarCode("4408200000012345678991203");
                break;

            case BarCodeTypes.IntelligentMailPackage:
                barCode = CreateIntelligentMailPackageBarCode("9212391234567812345671");
                break;

            case BarCodeTypes.Interleaved2of5:
                barCode = CreateInterleaved2of5BarCode("0123456789");
                break;

            case BarCodeTypes.Matrix2of5:
                barCode = CreateMatrix2of5BarCode("0123456789");
                break;

            case BarCodeTypes.CodeMSI:
                barCode = CreateCodeMSIBarCode("0123456789");
                break;

            case BarCodeTypes.PDF417:
                barCode = CreatePDF417BarCode("01234-ABCD");
                break;

            case BarCodeTypes.PostNet:
                barCode = CreatePostNetBarCode("0123456789");
                break;

            case BarCodeTypes.QRCode:
                barCode = CreateQRCodeBarCode("01234-ABCD");
                break;

            case BarCodeTypes.UPCA:
                barCode = CreateUPCABarCode("00123456789");
                break;

            case BarCodeTypes.UPCE0:
                barCode = CreateUPCE0BarCode("123");
                break;

            case BarCodeTypes.UPCE1:
                barCode = CreateUPCE1BarCode("123");
                break;

            case BarCodeTypes.UPCSupplemental2:
                barCode = CreateUPCSupplemental2BarCode("01");
                break;

            case BarCodeTypes.UPCSupplemental5:
                barCode = CreateUPCSupplemental5BarCode("01234");
                break;

            case BarCodeTypes.UPCShippingContainer:
                barCode = CreateITF14BarCode("1234567890123");
                break;
            }

            return(barCode);
        }
Exemplo n.º 2
0
 public BarCode(BarCodeTypes BarCodeType, string BarCodeName)
 {
     Type        = BarCodeType;
     DisplayName = BarCodeName;
 }