SetBarCodeReadType

SetBarCodeReadType(params SingleDecodeType[])

KümelerSingleDecodeType tanıma için dizi yazın. ReadBarCodes() yönteminden önce çağrılmalıdır.

public void SetBarCodeReadType(params SingleDecodeType[] barcodeTypes)
Parametre Tip Tanım
barcodeTypes SingleDecodeType[] buSingleDecodeType okumak için dizi yazın.

Örnekler

Bu örnek, Code39 ve Code128 barkodlarının nasıl algılanacağını gösterir.

[C#]
using (BarCodeReader reader = new BarCodeReader())
{
    reader.SetBarCodeReadType(DecodeType.Code39Standard, DecodeType.Code128);
    reader.SetBarCodeImage(@"c:\test.png");
    foreach (BarCodeResult result in reader.ReadBarCodes())
    {
        Console.WriteLine("BarCode Type: " + result.CodeTypeName);
        Console.WriteLine("BarCode CodeText: " + result.CodeText);
    }
}
[VB.NET]
Using reader As New BarCodeReader()
    reader.SetBarCodeReadType(DecodeType.Code39Standard, DecodeType.Code128)
    reader.SetBarCodeImage("c:\test.png")
    For Each result As BarCodeResult In reader.ReadBarCodes()
        Console.WriteLine("BarCode Type: " + result.CodeTypeName)
        Console.WriteLine("BarCode CodeText: " + result.CodeText)
    Next
End Using

Ayrıca bakınız


SetBarCodeReadType(BaseDecodeType)

Tanıma için kod çözme türünü ayarlar. ReadBarCodes() yönteminden önce çağrılmalıdır.

public void SetBarCodeReadType(BaseDecodeType type)
Parametre Tip Tanım
type BaseDecodeType Okunacak barkod türü.

Örnekler

Bu örnek, Code39 ve Code128 barkodlarının nasıl algılanacağını gösterir.

[C#]
using (BarCodeReader reader = new BarCodeReader())
{
    reader.SetBarCodeReadType(new MultyDecodeType(DecodeType.Code39Standard, DecodeType.Code128));
    reader.SetBarCodeImage(@"c:\test.png");
    foreach (BarCodeResult result in reader.ReadBarCodes())
    {
        Console.WriteLine("BarCode Type: " + result.CodeTypeName);
        Console.WriteLine("BarCode CodeText: " + result.CodeText);
    }
}
[VB.NET]
Using reader As New BarCodeReader()
    reader.SetBarCodeReadType(New MultyDecodeType(DecodeType.Code39Standard, DecodeType.Code128))
    reader.SetBarCodeImage("c:\test.png")
    For Each result As BarCodeResult In reader.ReadBarCodes()
        Console.WriteLine("BarCode Type: " + result.CodeTypeName)
        Console.WriteLine("BarCode CodeText: " + result.CodeText)
    Next
End Using

Ayrıca bakınız