Class HIBCLICCombinedCodetext

Class HIBCLICCombinedCodetext

Название пространства: Aspose.BarCode.ComplexBarcode Ассоциация: Aspose.BarCode.dll (25.4.0)

Класс для кодирования и декодирования текста, встроенного в код HIBC LIC, который хранит основные и вторичные данные.

public class HIBCLICCombinedCodetext : HIBCLICComplexCodetext, IComplexCodetext

Inheritance

object HIBCLICComplexCodetext HIBCLICCombinedCodetext

Implements

IComplexCodetext

Наследованные члены

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

Этот шаблон показывает, как кодировать и декодировать HIBC LIC с помощью 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

ГИБКЛИККомбинированКодтекст()

public HIBCLICCombinedCodetext()

Properties

PrimaryData

Идентификация первичных данных.

public PrimaryData PrimaryData { get; set; }

Стоимость недвижимости

PrimaryData

SecondaryAndAdditionalData

Идентификация вторичных и дополнительных данных.

public SecondaryAndAdditionalData SecondaryAndAdditionalData { get; set; }

Стоимость недвижимости

SecondaryAndAdditionalData

Methods

Equals(Объекты)

Возвращает стоимость, указывающую на то, равна ли эта инстанция определенной стоимости Aspose.BarCode.ComplexBarcode.HIBCLICCombinedCodetext.

public override bool Equals(object obj)

Parameters

obj object

A Aspose.BarCode.ComplexBarcode.HIBCLICCombinedCodetext значение сравнивать с этим примером.

Returns

bool

Истинный если OBJ имеет такую же ценность, как и эта инстанция; в противном случае, Фальшивый.

GetConstructedCodetext()

Создание кодетекста

public override string GetConstructedCodetext()

Returns

string

Конструированный кодекс

GetHashCode()

Возвращайте код хаша для этого случая.

public override int GetHashCode()

Returns

int

32-битный подписанный полный хаш-код.

InitFromString(Стриг)

Инициализует пример из построенного кодекста.

public override void InitFromString(string constructedCodetext)

Parameters

constructedCodetext string

Созданный кодекс.

 Русский