public void Connect(IZebraScanner scanner)
        {
            var s = (ZebraScanner)scanner;

            connectedScanner = s.Scanner;
            apiInstance.SbtEstablishCommunicationSession(scanner.ScannerID);
            apiInstance.SbtEnableAutomaticSessionReestablishment(true, scanner.ScannerID);
        }
Exemple #2
0
 public void SbtEventCommunicationSessionEstablished(SbtScannerInfo activeScanner)
 {
     if (activeScanner == null)
     {
         throw new ArgumentNullException("activeScanner");
     }
     global::ApiDefinition.ZebraMessaging.void_objc_msgSend_IntPtr(this.Handle, Selector.GetHandle("sbtEventCommunicationSessionEstablished:"), activeScanner.Handle);
 }
Exemple #3
0
 public void SbtEventScannerAppeared(SbtScannerInfo availableScanner)
 {
     if (availableScanner == null)
     {
         throw new ArgumentNullException("availableScanner");
     }
     global::ApiDefinition.ZebraMessaging.void_objc_msgSend_IntPtr(this.Handle, Selector.GetHandle("sbtEventScannerAppeared:"), availableScanner.Handle);
 }
Exemple #4
0
 public FirmwareUpdateEvent(SbtScannerInfo _scannerInfo, int _maxRecords, int _swComponent, int _currentRecord, SbtFwUpdateResult _status)
     : base(NSObjectFlag.Empty)
 {
     if (_scannerInfo == null)
     {
         throw new ArgumentNullException("_scannerInfo");
     }
     IsDirectBinding = GetType().Assembly == global::ApiDefinition.ZebraMessaging.this_assembly;
     if (IsDirectBinding)
     {
         InitializeHandle(global::ApiDefinition.ZebraMessaging.IntPtr_objc_msgSend_IntPtr_int_int_int_UInt32(this.Handle, Selector.GetHandle("initWithScannerInfo:withRecords:withSWComponenet:withCurrentRecord:withStatus:"), _scannerInfo.Handle, _maxRecords, _swComponent, _currentRecord, (UInt32)_status), "initWithScannerInfo:withRecords:withSWComponenet:withCurrentRecord:withStatus:");
     }
     else
     {
         InitializeHandle(global::ApiDefinition.ZebraMessaging.IntPtr_objc_msgSendSuper_IntPtr_int_int_int_UInt32(this.SuperHandle, Selector.GetHandle("initWithScannerInfo:withRecords:withSWComponenet:withCurrentRecord:withStatus:"), _scannerInfo.Handle, _maxRecords, _swComponent, _currentRecord, (UInt32)_status), "initWithScannerInfo:withRecords:withSWComponenet:withCurrentRecord:withStatus:");
     }
 }
        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);
                }
            }
        }
Exemple #6
0
 public override void SbtEventScannerAppeared(SbtScannerInfo availableScanner)
 {
     SbtEventScannerAppearedCallback?.Invoke(availableScanner);
 }
Exemple #7
0
 public override void SbtEventCommunicationSessionEstablished(SbtScannerInfo activeScanner)
 {
     SbtEventCommunicationSessionEstablishedCallback?.Invoke(activeScanner);
 }
Exemple #8
0
 public abstract void SbtEventScannerAppeared(SbtScannerInfo availableScanner);
Exemple #9
0
 public abstract void SbtEventCommunicationSessionEstablished(SbtScannerInfo activeScanner);
Exemple #10
0
 public ZebraScanner(SbtScannerInfo scanner)
 {
     Scanner = scanner;
 }