private void StartReadCard() { iCard.Connect(reader, SHARE.Shared, PROTOCOL.T0orT1); System.Threading.Thread.Sleep(100); MyKad myKad = new MyKad(iCard); TouchNGoCard tngcard = new TouchNGoCard(iCard); EMVCard emvCard = new EMVCard(iCard); NETSCashCard netsCard = new NETSCashCard(iCard); //check if MyKad if (myKad.SelectApplication()) { myKad.ReadCard(); Card = myKad; } //check if its a touch n go card else if (tngcard.SelectApplication()) { tngcard.ReadCard(); Card = tngcard; } //check if EMV card else if (emvCard.SelectApplication()) { emvCard.ReadCard(); Card = emvCard; } //check if NETS cash card else if (netsCard.SelectApplication()) { netsCard.ReadCard(); Card = netsCard; } else { Card = new UnknownCard(); } iCard.Disconnect(DISCONNECT.Unpower); }
private void StartReadCard() { iCard.Connect(reader, SHARE.Shared, PROTOCOL.T0orT1); System.Threading.Thread.Sleep(100); MyKad myKad = new MyKad(iCard); TouchNGoCard tngcard = new TouchNGoCard(iCard); EMVCard emvCard = new EMVCard(iCard); NETSCashCard netsCard = new NETSCashCard(iCard); //check if MyKad if (myKad.SelectApplication()) { myKad.ReadCard(); Card = myKad; } //check if its a touch n go card else if (tngcard.SelectApplication()) { tngcard.ReadCard(); Card = tngcard; } //check if EMV card else if (emvCard.SelectApplication()) { emvCard.ReadCard(); Card = emvCard; } //check if NETS cash card else if (netsCard.SelectApplication()) { netsCard.ReadCard(); Card = netsCard; } else Card = new UnknownCard(); iCard.Disconnect(DISCONNECT.Unpower); }