![]() Question: How can I make my application fire the correct event? It also does, if I start 2 different instances of my application, each one reading from one of the scanners. If I use two or more different scanners, that do not share the driver, it works as expected. This issue only arises, when two scanners use the same driver. Scanner scanner = (Scanner)sender // <- sender is always the last one void ScanningDevice_DataEvent(object sender, DataEventArgs e) Problem: When reading data inside the event handler ScanningDevice_DataEvent, I can no longer distinguish between them, because for both scanners, the identical event is fired, no matter which scanner is actually reading the barcode. ScanningDevice.ErrorEvent += ScanningDevice_ErrorEvent ScanningDevice.DataEvent += ScanningDevice_DataEvent Var scanningDevice = posExp.CreateInstance(device) as Var listOfScanners = // symbolical codeįoreach (string device in listOfScanners) posExp = new PosExplorer(this) ĭeviceCollection devices = posExp.GetDevices("Scanner",ĭeviceCompatibilities.OposAndCompatibilityLevel1) The Scanner objcts are created as follows // This code is only for illustrating how my application works I need to know, which scanner is delivering the data. Both scanners use the Honeywell POS4NET driver. For some business requirements, both devices need to be used from the same machine. I want to read input from two Honeywell scanners, namely Voyager 1202g and Orbit 7190g.
0 Comments
Leave a Reply. |