예제 #1
0
        public string DecodeBarcode()
        {
            if (string.IsNullOrEmpty(Data))
            {
                throw new Exception("BarcodeGenerator: Input data can not be empty.");
            }

            var ibarcode = new UPCA(Data, Width, Height, _Scale);

            return(ibarcode.Decode(Data));
        }
예제 #2
0
        public Image DrawBarcode()
        {
            if (string.IsNullOrEmpty(Data))
            {
                throw new Exception("BarcodeGenerator: Input data can not be empty.");
            }

            var ibarcode = new UPCA(Data, Width, Height, _Scale);

            Data = ibarcode.Data;

            return(ibarcode.GenerateImage());
        }