Exemplo n.º 1
0
        public void Connect(IZebraScanner scanner)
        {
            var s = (ZebraScanner)scanner;

            connectedScanner = s.Scanner;
            apiInstance.SbtEstablishCommunicationSession(scanner.ScannerID);
            apiInstance.SbtEnableAutomaticSessionReestablishment(true, scanner.ScannerID);
        }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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:");
     }
 }
Exemplo n.º 5
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);
                }
            }
        }
Exemplo n.º 6
0
 public override void SbtEventScannerAppeared(SbtScannerInfo availableScanner)
 {
     SbtEventScannerAppearedCallback?.Invoke(availableScanner);
 }
Exemplo n.º 7
0
 public override void SbtEventCommunicationSessionEstablished(SbtScannerInfo activeScanner)
 {
     SbtEventCommunicationSessionEstablishedCallback?.Invoke(activeScanner);
 }
Exemplo n.º 8
0
 public abstract void SbtEventScannerAppeared(SbtScannerInfo availableScanner);
Exemplo n.º 9
0
 public abstract void SbtEventCommunicationSessionEstablished(SbtScannerInfo activeScanner);
Exemplo n.º 10
0
 public ZebraScanner(SbtScannerInfo scanner)
 {
     Scanner = scanner;
 }