示例#1
0
        private void SbtEventScannerAppearedHandler(SbtScannerInfo scanner)
        {
            if (Scanners.Count(m => m.ScannerName == scanner.ScannerName) == 0)
            {
                Scanners.Add(new ZebraScanner(scanner));
                ScannersChanged?.Invoke();
            }

            if (_activeScannerName != null)
            {
                if (scanner.ScannerName == _activeScannerName)
                {
                    connectedScanner = scanner;
                    apiInstance.SbtEstablishCommunicationSession(scanner.ScannerID);
                    apiInstance.SbtEnableAutomaticSessionReestablishment(true, scanner.ScannerID);
                }
            }
        }
示例#2
0
 private void SbtEventScannerDisappearedHandler(int scannerID)
 {
     Scanners = Scanners.Where(m => m.ScannerID != scannerID).ToList();
     ScannersChanged?.Invoke();
 }