| | |
| | | |
| | | barcode = otherDevice.Communicator.Read<string>("DB15.32"); //鏉$爜 |
| | | |
| | | List<byte> bytes = otherDevice.Communicator.Read("DB15.34", 40).ToList(); |
| | | //List<byte> bytes = otherDevice.Communicator.Read("DB15.34", 40).ToList(); |
| | | |
| | | byte[] temp = bytes.ToArray().SelectMiddle(0, bytes.IndexOf(0)); |
| | | //byte[] temp = bytes.ToArray().SelectMiddle(0, bytes.IndexOf(0)); |
| | | |
| | | barcode = Encoding.Default.GetString(temp); |
| | | //barcode = Encoding.Default.GetString(temp); |
| | | |
| | | string pattern = @"\d+"; // 鍖归厤鏁板瓧 |
| | | Match match = Regex.Match(barcode, pattern); |
| | | string barcodeNumber = match.Value; |
| | | string barcodeNumber = barcode; |
| | | |
| | | if (!string.IsNullOrEmpty(barcodeNumber)) |
| | | { |