public List <AccountInfo> SearchAccountServices(string barcode)
 {
     using (var command = new BarcodeCommand(_settingService.GetServerIP(),
                                             SettingService.WorkingPort,
                                             _currentUser,
                                             barcode))
     {
         command.Execute();
         if (!command.Success)
         {
             throw new CommandException(command.ErrorMessage);
         }
         else
         {
             return(command.AccountInfos);
         }
     }
 }
        private void NurApi_IOChangeEvent(object sender, NurApi.IOChangeEventArgs e)
        {
            if (e.data.source == 100) // 100 == Accessory device trigger
            {
                if (e.data.dir == 1)
                {
                    // Trigger pressed
                }
                else
                {
                    // Trigger released

                    // Ignore if cancelled by device
                    if (!mIgnoreNextTrigger)
                    {
                        BarcodeCommand.Execute(null);
                    }
                    mIgnoreNextTrigger = false;
                }
            }
        }