Class HIBCLICCombinedCodetext

Class HIBCLICCombinedCodetext

Namespace: Aspose.BarCode.ComplexBarcode
Assembly: Aspose.BarCode.dll (25.1.0)

Lớp này dùng để mã hóa và giải mã văn bản nhúng trong mã HIBC LIC, lưu trữ dữ liệu chính và dữ liệu phụ.

public class HIBCLICCombinedCodetext : HIBCLICComplexCodetext, IComplexCodetext

Kế thừa

objectHIBCLICComplexCodetextHIBCLICCombinedCodetext

Thực hiện

IComplexCodetext

Các thành viên kế thừa

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()

Ví dụ

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("Số sản phẩm hoặc catalog: " + result.PrimaryData.ProductOrCatalogNumber);
        Console.WriteLine("Mã nhận diện nhà sản xuất: " + result.PrimaryData.LabelerIdentificationCode);
        Console.WriteLine("ID đơn vị đo: " + result.PrimaryData.UnitOfMeasureID);
        Console.WriteLine("Ngày hết hạn: " + result.SecondaryAndAdditionalData.ExpiryDate);
        Console.WriteLine("Số lượng: " + result.SecondaryAndAdditionalData.Quantity);
        Console.WriteLine("Số lô: " + result.SecondaryAndAdditionalData.LotNumber);
        Console.WriteLine("Số seri: " + result.SecondaryAndAdditionalData.SerialNumber);
        Console.WriteLine("Ngày sản xuất: " + result.SecondaryAndAdditionalData.DateOfManufacture);
    }
}

Các hàm khởi tạo

HIBCLICCombinedCodetext()

public HIBCLICCombinedCodetext()

Các thuộc tính

PrimaryData

Xác định dữ liệu chính.

public PrimaryData PrimaryData { get; set; }

Giá trị thuộc tính

PrimaryData

SecondaryAndAdditionalData

Xác định dữ liệu bổ sung và dữ liệu phụ.

public SecondaryAndAdditionalData SecondaryAndAdditionalData { get; set; }

Giá trị thuộc tính

SecondaryAndAdditionalData

Các phương thức

Equals(object)

Trả về giá trị cho biết liệu thể hiện này có bằng một giá trị Aspose.BarCode.ComplexBarcode.HIBCLICCombinedCodetext đã chỉ định hay không.

public override bool Equals(object obj)

Tham số

obj object

Một giá trị Aspose.BarCode.ComplexBarcode.HIBCLICCombinedCodetext để so sánh với thể hiện này.

Trả về

bool

true nếu obj có cùng giá trị với thể hiện này; ngược lại, false.

GetConstructedCodetext()

Xây dựng codetext

public override string GetConstructedCodetext()

Trả về

string

Codetext đã được xây dựng

GetHashCode()

Trả về mã băm cho thể hiện này.

public override int GetHashCode()

Trả về

int

Mã băm số nguyên có dấu 32 bit.

InitFromString(string)

Khởi tạo thể hiện từ codetext đã được xây dựng.

public override void InitFromString(string constructedCodetext)

Tham số

constructedCodetext string

Codetext đã được xây dựng.

 Tiếng Việt