Ejemplo n.º 1
0
        private void InitializeType()
        {
            IBarcode barcode;

            switch (_type)
            {
            case Type.Code128:
                barcode = new Code128(_data);
                break;

            case Type.Code128A:
                barcode = new Code128(_data, Code128.Code128Type.A);
                break;

            case Type.Code128B:
                barcode = new Code128(_data, Code128.Code128Type.B);
                break;

            case Type.Code128C:
                barcode = new Code128(_data, Code128.Code128Type.C);
                break;

            case Type.Code11:
                barcode = new Code11(_data);
                break;

            case Type.Code39:
                barcode = new Code39(_data);
                break;

            case Type.Code39E:
                barcode = new Code39(_data, true);
                break;

            case Type.Code93:
                barcode = new Code93(_data);
                break;

            case Type.EAN8:
                barcode = new EAN8(_data);
                break;

            case Type.EAN13:
                barcode = new EAN13(_data);
                break;

            case Type.Codabar:
                barcode = new Codabar(_data);
                break;

            default:
                barcode = new Code128(_data);
                break;
            }

            _encodedData = barcode.GetEncoding();
        }
Ejemplo n.º 2
0
        private void InitializeType()
        {
            IBarcode barcode;

            switch (_type)
            {
            case Type.Code128:
                barcode = new Code128(_data);
                break;

            case Type.Code11:
                barcode = new Code11(_data);
                break;

            case Type.Code39:
                barcode = new Code39(_data);
                break;

            case Type.Code93:
                barcode = new Code93(_data);
                break;

            case Type.EAN8:
                barcode = new EAN8(_data);
                break;

            case Type.EAN13:
                barcode = new EAN13(_data);
                break;

            default:
                barcode = new Code128(_data);
                break;
            }

            _encodedData = barcode.GetEncoding();
        }