Class HIBCLICSecondaryAndAdditionalDataCodetext
Contents
[
Hide
]HIBCLICSecondaryAndAdditionalDataCodetext class
Class for encoding and decoding the text embedded in the HIBC LIC code which stores seconday data.
public class HIBCLICSecondaryAndAdditionalDataCodetext : HIBCLICComplexCodetext
Constructors
Name | Description |
---|---|
HIBCLICSecondaryAndAdditionalDataCodetext() | The default constructor. |
Properties
Name | Description |
---|---|
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 secodary and additional supplemental data. |
LinkCharacter { get; set; } | Identifies link character. |
Methods
Name | Description |
---|---|
override Equals(object) | Returns a value indicating whether this instance is equal to a specified HIBCLICSecondaryAndAdditionalDataCodetext 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 HIBCLICSecondaryAndAdditionalDataCodetext.
[C#]
HIBCLICSecondaryAndAdditionalDataCodetext complexCodetext = new HIBCLICSecondaryAndAdditionalDataCodetext();
complexCodetext.BarcodeType = EncodeTypes.HIBCQRLIC;
complexCodetext.LinkCharacter = 'L';
complexCodetext.Data = new SecondaryAndAdditionalData();
complexCodetext.Data.ExpiryDate = DateTime.Now;
complexCodetext.Data.ExpiryDateFormat = HIBCLICDateFormat.MMDDYY;
complexCodetext.Data.Quantity = 30;
complexCodetext.Data.LotNumber = "LOT123";
complexCodetext.Data.SerialNumber = "SERIAL123";
complexCodetext.Data.DateOfManufacture = DateTime.Now;
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;
HIBCLICSecondaryAndAdditionalDataCodetext result = (HIBCLICSecondaryAndAdditionalDataCodetext)ComplexCodetextReader.TryDecodeHIBCLIC(codetext);
Console.WriteLine("Expiry date: " + result.Data.ExpiryDate);
Console.WriteLine("Quantity: " + result.Data.Quantity);
Console.WriteLine("Lot number: " + result.Data.LotNumber);
Console.WriteLine("Serial number: " + result.Data.SerialNumber);
Console.WriteLine("Date of manufacture: " + result.Data.DateOfManufacture);
}
}
See Also
- class HIBCLICComplexCodetext
- namespace Aspose.BarCode.ComplexBarcode
- assembly Aspose.BarCode