Class HIBCPASCodetext
Namespace: Aspose.BarCode.ComplexBarcode
Assembly: Aspose.BarCode.dll (25.1.0)
Classe per la codifica e la decodifica del testo incorporato nel codice HIBC PAS.
public class HIBCPASCodetext : IComplexCodetext
Ereditarietà
Implementa
Membri Ereditati
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Esempi
Questo esempio mostra come codificare e decodificare HIBC PAS utilizzando HIBCPASCodetext.
HIBCPASComplexCodetext complexCodetext = new HIBCPASComplexCodetext();
complexCodetext.DataLocation = HIBCPASDataLocation.Patient;
complexCodetext.AddRecord(HIBCPASDataType.LabelerIdentificationCode, "A123");
complexCodetext.AddRecord(HIBCPASDataType.ManufacturerSerialNumber, "SERIAL123");
complexCodetext.BarcodeType = EncodeTypes.HIBCDataMatrixPAS;
using (ComplexBarcodeGenerator generator = new ComplexBarcodeGenerator(complexCodetext))
{
using (BarCodeReader reader = new BarCodeReader(generator.GenerateBarCodeImage(), DecodeType.HIBCDataMatrixPAS))
{
reader.ReadBarCodes();
string codetext = reader.FoundBarCodes[0].CodeText;
HIBCPASComplexCodetext readCodetext = ComplexCodetextReader.TryDecodeHIBCPAS(codetext);
Console.WriteLine("Posizione dei dati: {0}", readCodetext.DataLocation);
Console.Write("Tipo di dati: {0}. ", readCodetext.GetRecords()[0].DataType);
Console.WriteLine("Dati: {0}", readCodetext.GetRecords()[0].Data);
Console.Write("Tipo di dati: {0}. ", readCodetext.GetRecords()[1].DataType);
Console.WriteLine("Dati: {0}", readCodetext.GetRecords()[1].Data);
}
}
Costruttori
HIBCPASCodetext()
public HIBCPASCodetext()
Proprietà
BarcodeType
Ottiene o imposta il tipo di codice a barre. Il testo HIBC PAS può essere codificato utilizzando i tipi di codifica HIBCCode39PAS, HIBCCode128PAS, HIBCAztec:PAS, HIBCDataMatrixPAS e HIBCQRPAS. Valore predefinito: HIBCCode39PAS.
public BaseEncodeType BarcodeType { get; set; }
Valore della Proprietà
DataLocation
Identifica la posizione dei dati.
public HIBCPASDataLocation DataLocation { get; set; }
Valore della Proprietà
Metodi
AddRecord(HIBCPASDataType, string)
Aggiunge un nuovo record
public void AddRecord(HIBCPASDataType dataType, string data)
Parametri
dataType
HIBCPASDataType
Tipo di dati
data
string
Stringa di dati
AddRecord(HIBCPASRecord)
Aggiunge un nuovo record
public void AddRecord(HIBCPASRecord record)
Parametri
record
HIBCPASRecord
Record da aggiungere
Clear()
Svuota l’elenco dei record
public void Clear()
Equals(object)
Restituisce un valore che indica se questa istanza è uguale a un valore specificato di Aspose.BarCode.ComplexBarcode.HIBCPASCodetext.
public override bool Equals(object obj)
Parametri
obj
object
Un valore di Aspose.BarCode.ComplexBarcode.HIBCPASCodetext da confrontare con questa istanza.
Restituisce
true se obj ha lo stesso valore di questa istanza; altrimenti, false.
GetBarcodeType()
Ottiene il tipo di codice a barre.
public BaseEncodeType GetBarcodeType()
Restituisce
Tipo di codice a barre.
GetConstructedCodetext()
Costruisce il testo codificato
public string GetConstructedCodetext()
Restituisce
Testo codificato costruito
GetHashCode()
Restituisce il codice hash per questa istanza.
public override int GetHashCode()
Restituisce
Un codice hash intero firmato a 32 bit.
GetRecords()
Ottiene l’elenco dei record
public List<hibcpasrecord> GetRecords()
Restituisce
List<HIBCPASRecord>
Elenco dei record
InitFromString(string)
Inizializza l’istanza dal testo codificato costruito.
public void InitFromString(string constructedCodetext)
Parametri
constructedCodetext
string
Testo codificato costruito.