コード例 #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());
        }