Class HIBCLICPrimaryDataCodetext

HIBCLICPrimaryDataCodetext class

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

public class HIBCLICPrimaryDataCodetext : HIBCLICComplexCodetext

Constructors

NameDescription
HIBCLICPrimaryDataCodetext()The default constructor.

Properties

NameDescription
BarcodeType { get; set; }Gets or sets barcode type. HIBC LIC codetext can be encoded using HIBCCode39LIC, HIBCCode128LIC, HIBCAztecLIC, HIBCDataMatrixLIC and HIBCQRLIC encode types. Default value: HIBCCode39LIC.
Data { get; set; }Identifies primary data.

Methods

NameDescription
override Equals(object)Returns a value indicating whether this instance is equal to a specified HIBCLICPrimaryDataCodetext value.
GetBarcodeType()Gets barcode type.
override GetConstructedCodetext()Constructs codetext
override GetHashCode()Returns the hash code for this instance.
override InitFromString(string)Initializes instance from constructed codetext.

Examples

This sample shows how to encode and decode HIBC LIC using HIBCLICPrimaryDataCodetext.

[C#]
HIBCLICPrimaryDataCodetext complexCodetext  = new HIBCLICPrimaryDataCodetext();
complexCodetext.BarcodeType = EncodeTypes.HIBCQRLIC;
complexCodetext.Data = new PrimaryData();
complexCodetext.Data.ProductOrCatalogNumber = "12345";
complexCodetext.Data.LabelerIdentificationCode = "A999";
complexCodetext.Data.UnitOfMeasureID = 1;
using (ComplexBarcodeGenerator generator = new ComplexBarcodeGenerator(complexCodetext))
{
    Bitmap image = generator.GenerateBarCodeImage();
    using (BarCodeReader reader = new BarCodeReader(image, DecodeType.HIBCQRLIC))
    {
        reader.ReadBarCodes();
        string codetext = reader.FoundBarCodes[0].CodeText;
        HIBCLICPrimaryDataCodetext result = (HIBCLICPrimaryDataCodetext)ComplexCodetextReader.TryDecodeHIBCLIC(codetext);
        Console.WriteLine("Product or catalog number: " + result.Data.ProductOrCatalogNumber);
        Console.WriteLine("Labeler identification code: " + result.Data.LabelerIdentificationCode);
        Console.WriteLine("Unit of measure ID: " + result.Data.UnitOfMeasureID);
    }
}

See Also