Class HIBCLICCombinedCodetext

Class HIBCLICCombinedCodetext

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

Class for encoding and decoding the text embedded in the HIBC LIC code which stores primary and secodary data.

public class HIBCLICCombinedCodetext : HIBCLICComplexCodetext, IComplexCodetext

Inheritance

objectHIBCLICComplexCodetextHIBCLICCombinedCodetext

Implements

IComplexCodetext

Inherited Members

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

This sample shows how to encode and decode HIBC LIC using 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

HIBCLICCombinedCodetext()

public HIBCLICCombinedCodetext()

Properties

PrimaryData

Identifies primary data.

public PrimaryData PrimaryData { get; set; }

Property Value

PrimaryData

SecondaryAndAdditionalData

Identifies secondary and additional supplemental data.

public SecondaryAndAdditionalData SecondaryAndAdditionalData { get; set; }

Property Value

SecondaryAndAdditionalData

Methods

Equals(object)

Returns a value indicating whether this instance is equal to a specified Aspose.BarCode.ComplexBarcode.HIBCLICCombinedCodetext value.

public override bool Equals(object obj)

Parameters

obj object

An Aspose.BarCode.ComplexBarcode.HIBCLICCombinedCodetext value to compare to this instance.

Returns

bool

true if obj has the same value as this instance; otherwise, false.

GetConstructedCodetext()

Constructs codetext

public override string GetConstructedCodetext()

Returns

string

Constructed codetext

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer hash code.

InitFromString(string)

Initializes instance from constructed codetext.

public override void InitFromString(string constructedCodetext)

Parameters

constructedCodetext string

Constructed codetext.

 English