Class HIBCLICCombinedCodetext
Tên không gian: Aspose.BarCode.ComplexBarcode Tổng hợp: Aspose.BarCode.dll (25.4.0)
Khóa học để mã hóa và giải mã văn bản tích hợp trong mã HIBC LIC mà lưu trữ dữ liệu cơ bản và thứ cấp.
public class HIBCLICCombinedCodetext : HIBCLICComplexCodetext, IComplexCodetext
Inheritance
object ← HIBCLICComplexCodetext ← HIBCLICCombinedCodetext
Implements
Thành viên thừa kế
HIBCLICComplexCodetext.GetConstructedCodetext() , HIBCLICComplexCodetext.InitFromString(string) , HIBCLICComplexCodetext.GetBarcodeType() , HIBCLICComplexCodetext.BarcodeType , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
Mẫu này cho thấy cách mã hóa và giải mã HIBC LIC bằng cách sử dụng HIBCLICCombinedCodetext.
HIBCLICCombinedCodetext combinedCodetext = new HIBCLICCombinedCodetext();
combinedCodetext.BarcodeType = EncodeTypes.HIBCQRLIC;
combinedCodetext.PrimaryData = new PrimaryData();
combinedCodetext.PrimaryData.ProductOrCatalogNumber = "12345";
combinedCodetext.PrimaryData.LabelerIdentificationCode = "A999";
combinedCodetext.PrimaryData.UnitOfMeasureID = 1;
combinedCodetext.SecondaryAndAdditionalData = new SecondaryAndAdditionalData();
combinedCodetext.SecondaryAndAdditionalData.ExpiryDate = DateTime.Now;
combinedCodetext.SecondaryAndAdditionalData.ExpiryDateFormat = HIBCLICDateFormat.MMDDYY;
combinedCodetext.SecondaryAndAdditionalData.Quantity = 30;
combinedCodetext.SecondaryAndAdditionalData.LotNumber = "LOT123";
combinedCodetext.SecondaryAndAdditionalData.SerialNumber = "SERIAL123";
combinedCodetext.SecondaryAndAdditionalData.DateOfManufacture = DateTime.Now;
using (ComplexBarcodeGenerator generator = new ComplexBarcodeGenerator(combinedCodetext))
{
Bitmap image = generator.GenerateBarCodeImage();
using (BarCodeReader reader = new BarCodeReader(image, DecodeType.HIBCQRLIC))
{
reader.ReadBarCodes();
string codetext = reader.FoundBarCodes[0].CodeText;
HIBCLICCombinedCodetext result = (HIBCLICCombinedCodetext)ComplexCodetextReader.TryDecodeHIBCLIC(codetext);
Console.WriteLine("Product or catalog number: " + result.PrimaryData.ProductOrCatalogNumber);
Console.WriteLine("Labeler identification code: " + result.PrimaryData.LabelerIdentificationCode);
Console.WriteLine("Unit of measure ID: " + result.PrimaryData.UnitOfMeasureID);
Console.WriteLine("Expiry date: " + result.SecondaryAndAdditionalData.ExpiryDate);
Console.WriteLine("Quantity: " + result.SecondaryAndAdditionalData.Quantity);
Console.WriteLine("Lot number: " + result.SecondaryAndAdditionalData.LotNumber);
Console.WriteLine("Serial number: " + result.SecondaryAndAdditionalData.SerialNumber);
Console.WriteLine("Date of manufacture: " + result.SecondaryAndAdditionalData.DateOfManufacture);
}
}
Constructors
HIBCLICCombinedThông tin()
public HIBCLICCombinedCodetext()
Properties
PrimaryData
Xác định dữ liệu cơ bản.
public PrimaryData PrimaryData { get; set; }
Giá trị bất động sản
SecondaryAndAdditionalData
Xác định các dữ liệu thứ cấp và bổ sung.
public SecondaryAndAdditionalData SecondaryAndAdditionalData { get; set; }
Giá trị bất động sản
Methods
Equals(đối tượng)
Quay lại một giá trị cho thấy nếu mẫu này tương đương với giá trị Aspose.BarCode.ComplexBarcode.HIBCLICCombinedCodetext.
public override bool Equals(object obj)
Parameters
obj
object
Một Aspose.BarCode.ComplexBarcode.HIBCLICCombinedCodetext giá trị để so sánh với trường hợp này.
Returns
đúng nếu obj có giá trị tương tự như trường hợp này; nếu không, giả.
GetConstructedCodetext()
Xây dựng codetext
public override string GetConstructedCodetext()
Returns
Xây dựng codetext
GetHashCode()
Quay lại mã hash cho trường hợp này.
public override int GetHashCode()
Returns
Một 32-bit ký mã hash toàn bộ.
InitFromString(String)
Bắt đầu ví dụ từ codetext được xây dựng.
public override void InitFromString(string constructedCodetext)
Parameters
constructedCodetext
string
Xây dựng codetext.