private IEnumerable<string> GetText(LogicalRectangle leadRect, BarcodeReadOptions[] coreReadOptions, ImageSource image, BarcodeImageType imageType) { var engine = new BarcodeEngine(); engine.Reader.ImageType = imageType; var barcodeDatas = engine.Reader.ReadBarcodes(image.ToRasterImage(), leadRect, 10, BarcodeSymbologies.ToArray(), coreReadOptions); var textForStrategy = barcodeDatas .Select(data => data.Value) .DefaultIfEmpty(); return textForStrategy; }
private void UpdateMessageLabel(BarcodeReadOptions readOptions) { if (readOptions != null) { _messageLabel.Text = string.Format(DemosGlobalization.GetResxString(GetType(), "Resx_ReadingBarcode"), readOptions.FriendlyName, _currentPageNumber, _lastPageNumber); } else { _messageLabel.Text = string.Format(DemosGlobalization.GetResxString(GetType(), "Resx_ReadingBarcodes"), _currentPageNumber, _lastPageNumber); } }
public SymbologyGroup(BarcodeReadOptions readOptions) { _readOptions = readOptions; }