コード例 #1
0
        public void Connect(IZebraScanner scanner)
        {
            var s = (ZebraScanner)scanner;

            connectedScanner = s.Scanner;
            apiInstance.SbtEstablishCommunicationSession(scanner.ScannerID);
            apiInstance.SbtEnableAutomaticSessionReestablishment(true, scanner.ScannerID);
        }
コード例 #2
0
ファイル: ISbtSdkApiDelegate.cs プロジェクト: shewison/Zebra
 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);
 }
コード例 #3
0
ファイル: ISbtSdkApiDelegate.cs プロジェクト: shewison/Zebra
 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);
 }
コード例 #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:");
     }
 }
コード例 #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);
                }
            }
        }
コード例 #6
0
 public override void SbtEventScannerAppeared(SbtScannerInfo availableScanner)
 {
     SbtEventScannerAppearedCallback?.Invoke(availableScanner);
 }
コード例 #7
0
 public override void SbtEventCommunicationSessionEstablished(SbtScannerInfo activeScanner)
 {
     SbtEventCommunicationSessionEstablishedCallback?.Invoke(activeScanner);
 }
コード例 #8
0
ファイル: ISbtSdkApiDelegate.cs プロジェクト: shewison/Zebra
 public abstract void SbtEventScannerAppeared(SbtScannerInfo availableScanner);
コード例 #9
0
ファイル: ISbtSdkApiDelegate.cs プロジェクト: shewison/Zebra
 public abstract void SbtEventCommunicationSessionEstablished(SbtScannerInfo activeScanner);
コード例 #10
0
 public ZebraScanner(SbtScannerInfo scanner)
 {
     Scanner = scanner;
 }