Class BarCodeResult
Tên không gian: Aspose.BarCode.BarCodeRecognition Tổng hợp: Aspose.BarCode.dll (25.4.0)
Lưu trữ nhận dạng dữ liệu mã thanh như Aspose.BarCode.BarCodeRecognition.SingleDecodeType, System.String codetext,Aspose.BarCode.BarCodeRecognition.BarCodeRegionCác thông số khu vực và các thông số khác
public sealed class BarCodeResult : ICloneable, IEquatable<barcoderesult>
Inheritance
Implements
Thành viên thừa kế
object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
Mẫu này cho thấy cách để có được BarCodeResult.
using (BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.Code128, "12345"))
{
generator.Save(@"c:\test.png");
}
using (BarCodeReader reader = new BarCodeReader(@"c:\test.png", DecodeType.Code39, DecodeType.Code128))
{
foreach (BarCodeResult result in reader.ReadBarCodes())
{
Console.WriteLine("BarCode Type: " + result.CodeTypeName);
Console.WriteLine("BarCode CodeText: " + result.CodeText);
Console.WriteLine("BarCode Confidence: " + result.Confidence);
Console.WriteLine("BarCode ReadingQuality: " + result.ReadingQuality);
Console.WriteLine("BarCode Angle: " + result.Region.Angle);
}
}
Using generator As New BarcodeGenerator(EncodeTypes.Code128, "12345")
generator.Save("c:\test.png")
End Using
Using reader As New BarCodeReader("c:\test.png", DecodeType.Code39, DecodeType.Code128)
For Each result As BarCodeResult In reader.ReadBarCodes()
Console.WriteLine("BarCode Type: " + result.CodeTypeName)
Console.WriteLine("BarCode CodeText: " + result.CodeText)
Console.WriteLine("BarCode Confidence: " + result.Confidence)
Console.WriteLine("BarCode ReadingQuality: " + result.ReadingQuality)
Console.WriteLine("BarCode Angle: " + result.Region.Angle)
Next
End Using
Constructors
BarCodeResult(BarCodeResult)
Tạo bản sao của lớp Aspose.BarCode.BarCodeRecognition.BarCodeResult.
public BarCodeResult(BarCodeResult result)
Parameters
result
BarCodeResult
Một bản sao Aspose.BarCode.BarCodeRecognition.BarCodeResult.
Properties
CodeBytes
Nhận coded code bytes
public byte[] CodeBytes { get; }
Giá trị bất động sản
byte [ ]
CodeText
Nhận mã văn bản
public string CodeText { get; }
Giá trị bất động sản
CodeType
Nhận loại barcode
public SingleDecodeType CodeType { get; }
Giá trị bất động sản
CodeTypeName
Nhận tên của loại barcode
public string CodeTypeName { get; }
Giá trị bất động sản
Confidence
Nhận mức độ tin cậy của mã thanh được công nhận
public BarCodeConfidence Confidence { get; }
Giá trị bất động sản
Extended
Nhận thông số mở rộng của mã thanh được công nhận
public BarCodeExtendedParameters Extended { get; }
Giá trị bất động sản
ReadingQuality
Có được chất lượng đọc. làm việc cho mã thanh 1D và thư.
public double ReadingQuality { get; }
Giá trị bất động sản
Region
Nhận Barcode khu vực
public BarCodeRegionParameters Region { get; }
Giá trị bất động sản
Methods
Clone()
Tạo một bản sao của lớp Aspose.BarCode.BarCodeRecognition.BarCodeResult.
public object Clone()
Returns
Quay lại bản sao của lớp Aspose.BarCode.BarCodeRecognition.BarCodeResult.
Equals(BarCodeResult)
Quay lại một giá trị cho thấy nếu mẫu này tương đương với giá trị Aspose.BarCode.BarCodeRecognition.BarCodeResult.
public bool Equals(BarCodeResult other)
Parameters
other
BarCodeResult
Một Aspose.BarCode.BarCodeRecognition.BarCodeResult giá trị để so sánh với trường hợp này.
Returns
đúng nếu obj có giá trị tương tự như trường hợp này; nếu không, giả.
Equals(đối tượng)
Quay lại một giá trị cho thấy nếu mẫu này tương đương với giá trị Aspose.BarCode.BarCodeRecognition.BarCodeResult.
public override bool Equals(object obj)
Parameters
obj
object
Một System.Object giá trị để so sánh với trường hợp này.
Returns
đúng nếu obj có giá trị tương tự như trường hợp này; nếu không, giả.
GetCodeText(Encoding)
Nhận mã văn bản với mã hóa.
public string GetCodeText(Encoding encoding)
Parameters
encoding
Encoding
Mã hóa cho codetext.
Returns
Một dòng có chứa văn bản mã được công nhận.
GetHashCode()
Quay lại mã hash cho trường hợp này.
public override int GetHashCode()
Returns
Một 32-bit ký mã hash toàn bộ.
ToString()
Trở lại một biểu hiện dòng người đọc của Aspose.BarCode.BarCodeRecognition.BarCodeResult này.
public override string ToString()
Returns
Một dòng đại diện cho Aspose.BarCode.BarCodeRecognition.BarCodeResult.
Operators
Nhà điều hành =(Đánh giá BarCodeResult)
Quay lại một giá trị cho thấy liệu giá trị Aspose.BarCode.BarCodeRecognition.BarCodeResult đầu tiên có tương đương với giá trị thứ hai hay không.
public static bool operator ==(BarCodeResult first, BarCodeResult second)
Parameters
first
BarCodeResult
Giá trị so sánh đầu tiên
second
BarCodeResult
Giá trị so sánh thứ hai
Returns
đúng Nếu đầu tiên có giá trị tương tự như thứ hai; nếu không, giả.
Nhà điều hành !=(Đánh giá BarCodeResult)
Trả lại một giá trị cho biết nếu giá trị Aspose.BarCode.BarCodeRecognition.BarCodeResult đầu tiên khác với giá trị thứ hai.
public static bool operator !=(BarCodeResult first, BarCodeResult second)
Parameters
first
BarCodeResult
Giá trị so sánh đầu tiên
second
BarCodeResult
Giá trị so sánh thứ hai
Returns
đúng Nếu đầu tiên có giá trị khác với thứ hai; nếu không, giả.