private void StartCardScanner()
 {
     try
     {
         cardApp = new DesfireTerminalApplicationBase(new CardQProcessor(cardInterfaceManger, SessionSingleton.DeviceId));
         cardApp.UserInterfaceRequest += Ta_UserInterfaceRequest;
         cardApp.ProcessCompleted     += Ta_ProcessCompleted;
         cardApp.ExceptionOccured     += Ta_ExceptionOccured;
         cardApp.StartTransactionRequest(DesFireTransactionTypeEnum.ProcessTransaction);
     }
     catch (Exception ex)
     {
         SetStatusLabel(ex.Message);
     }
 }
Пример #2
0
        private async void CmdInstall_Click(object sender, EventArgs e)
        {
            try
            {
                List <string> ids = (await cardInterfaceManger.GetCardReaders()).Where(x => x.ToLower().Contains("contactless")).ToList();
                if (ids.Count == 0)
                {
                    await App.Current.MainPage.DisplayAlert("Error", "No contactless reader found", "OK");

                    return;
                }
                ta = new DesfireTerminalApplicationBase(new CardQProcessor(cardInterfaceManger, ids[0]));
                ta.UserInterfaceRequest += Ta_UserInterfaceRequest;
                ta.ProcessCompleted     += Ta_ProcessCompleted;
                ta.ExceptionOccured     += Ta_ExceptionOccured;
                ta.StartTransactionRequest(DesFireTransactionTypeEnum.InstallApp);
            }
            catch (Exception ex)
            {
                SetStatusLabel(ex.Message);
            }
        }