| | |
| | | { |
| | | try |
| | | { |
| | | List<string> barcodes = new List<string>(); |
| | | List<BarcodeInfo> barcodeInfos = new List<BarcodeInfo>(); |
| | | // 解析条码 |
| | | for (int i = 0; i < frameInfo.codeNum; i++) |
| | |
| | | string data = Marshal.PtrToStringAnsi(codeInfo.data); |
| | | if (!string.IsNullOrEmpty(data)) |
| | | { |
| | | barcodes.Add(data); |
| | | BarcodeInfo info = new BarcodeInfo |
| | | { |
| | | Text = data, |
| | |
| | | } |
| | | |
| | | // 触发事件 |
| | | OnBarcodeRead(new BarcodeEventArgs(this.SN, barcodes, bitmap)); |
| | | OnBarcodeRead(new BarcodeEventArgs(this.SN, barcodeInfos, bitmap)); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Drawing; |
| | | using System.Linq; |
| | | |
| | | namespace LB_VisionProcesses.BarcodeReaders |
| | | { |