VintaSoft Barcode .NET SDK 16.0: Руководство для .NET разработчика
Vintasoft.Barcode.SymbologySubsets Namespace / IataBcbpAztecBarcodeSymbology Class
Члены типа Объект Синтаксис Пример Иерархия Требования Смотрите также
В этом разделе
    Класс IataBcbpAztecBarcodeSymbology
    В этом разделе
    Определяет символику штрих-кода IATA BCBP - подмножество символики штрих-кода Aztec (IATA - Международная ассоциация воздушного транспорта; BCBP - Посадочный талон со штрих-кодом).
    Объектная модель
    BarcodeSymbologySubset IataBcbpAztecBarcodeSymbology
    Синтаксис
    'Declaration
    
    Public Class IataBcbpAztecBarcodeSymbology
       Inherits IataBcbpBarcodeSymbology
    
    
    public class IataBcbpAztecBarcodeSymbology : IataBcbpBarcodeSymbology
    
    
    public __gc class IataBcbpAztecBarcodeSymbology : public IataBcbpBarcodeSymbology*
    
    
    public ref class IataBcbpAztecBarcodeSymbology : public IataBcbpBarcodeSymbology^
    
    
    Пример

    Этот код на C#/VB.NET показывает, как распознать штрих-код IATA BCBP.

       
       
    Imports Vintasoft.Barcode   
    Imports Vintasoft.Barcode.BarcodeInfo   
    Imports Vintasoft.Barcode.SymbologySubsets   
       
    Class IATA_BCBP   
        ''' <summary>
        ''' Testing recognize the IATA BCBP barcode from an image.
        ''' </summary>
        ''' <param name="filename">The barcode image.</param>
        Public Shared Sub TestRecognize(filename As String)   
            ' create barcode reader
            Using reader As New BarcodeReader()   
                ' specify that all IATA BCBP barcode must be recognized
                reader.Settings.ScanBarcodeSubsets.Add(BarcodeSymbologySubsets.IATABCBPAztec)   
                reader.Settings.ScanBarcodeSubsets.Add(BarcodeSymbologySubsets.IATABCBPDataMatrix)   
                reader.Settings.ScanBarcodeSubsets.Add(BarcodeSymbologySubsets.IATABCBPPDF417)   
                reader.Settings.ScanBarcodeSubsets.Add(BarcodeSymbologySubsets.IATABCBPQRCode)   
       
                ' recognize barcodes
                Dim infos As IBarcodeInfo() = reader.ReadBarcodes(filename)   
                If infos.Length > 0 Then   
                    For Each info As IBarcodeInfo In infos   
                        If TypeOf info Is IataBcbpBarcodeInfo Then   
                            Dim iataBcbpInfo As IataBcbpBarcodeInfo = DirectCast(info, IataBcbpBarcodeInfo)   
                            Console.WriteLine(iataBcbpInfo.BarcodeSubset.Name)   
                            ' print some field values
                            Console.WriteLine("Passenger Name    = " & iataBcbpInfo.DecodedValue.PassengerName)   
                            Console.WriteLine("Date Of Flight    = " & iataBcbpInfo.DecodedValue.DateOfFlight)   
                            Console.WriteLine("From City Airport = " & iataBcbpInfo.DecodedValue.FromCityAirportCode)   
                            Console.WriteLine("To City Airport   = " & iataBcbpInfo.DecodedValue.ToCityAirportCode)   
                        Else   
                            Console.WriteLine(Convert.ToString(info.BarcodeType) & ": " & info.Value)   
                        End If   
                    Next   
                End If   
            End Using   
        End Sub   
    End Class
    
    
    
    using System;
    
    using Vintasoft.Barcode;
    using Vintasoft.Barcode.BarcodeInfo;
    using Vintasoft.Barcode.SymbologySubsets;
    
    class IATA_BCBP
    {
        /// <summary>
        /// Testing recognize the IATA BCBP barcode from an image.
        /// </summary>
        /// <param name="filename">The barcode image.</param>
        public static void TestRecognize(string filename)
        {
            // create barcode reader
            using (BarcodeReader reader = new BarcodeReader())
            {
                // specify that all IATA BCBP barcode must be recognized
                reader.Settings.ScanBarcodeSubsets.Add(BarcodeSymbologySubsets.IATABCBPAztec);
                reader.Settings.ScanBarcodeSubsets.Add(BarcodeSymbologySubsets.IATABCBPDataMatrix);
                reader.Settings.ScanBarcodeSubsets.Add(BarcodeSymbologySubsets.IATABCBPPDF417);
                reader.Settings.ScanBarcodeSubsets.Add(BarcodeSymbologySubsets.IATABCBPQRCode);
    
                // recognize barcodes
                IBarcodeInfo[] infos = reader.ReadBarcodes(filename);
                if (infos.Length > 0)
                {
                    foreach (IBarcodeInfo info in infos)
                    {
                        if (info is IataBcbpBarcodeInfo)
                        {
                            IataBcbpBarcodeInfo iataBcbpInfo = (IataBcbpBarcodeInfo)info;
                            Console.WriteLine(iataBcbpInfo.BarcodeSubset.Name);
                            // print some field values
                            Console.WriteLine("Passenger Name    = " + iataBcbpInfo.DecodedValue.PassengerName);
                            Console.WriteLine("Date Of Flight    = " + iataBcbpInfo.DecodedValue.DateOfFlight);
                            Console.WriteLine("From City Airport = " + iataBcbpInfo.DecodedValue.FromCityAirportCode);
                            Console.WriteLine("To City Airport   = " + iataBcbpInfo.DecodedValue.ToCityAirportCode);
                        }
                        else
                        {
                            Console.WriteLine(info.BarcodeType + ": " + info.Value);
                        }
                    }
                }
            }
        }    
    }
    
    

    Иерархия наследования

    System.Object
       Vintasoft.Barcode.BarcodeSymbology
          Vintasoft.Barcode.SymbologySubsets.BarcodeSymbologySubset
             Vintasoft.Barcode.SymbologySubsets.IataBcbpBarcodeSymbology
                Vintasoft.Barcode.SymbologySubsets.IataBcbpAztecBarcodeSymbology

    Требования

    Целевые платформы: .NET 10; .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

    Смотрите также