private void btnReadData_Click(object sender, EventArgs e) { Cursor old = Cursor.Current; Cursor.Current = Cursors.WaitCursor; try { SmartCardReadAction action = (SmartCardReadAction)Enum.Parse(typeof(SmartCardReadAction), cbSmartCardReadAction.Text); byte [] outputData = _smartCard.ReadData(action, inputData); if (_smartCard.CapInterfaceMode == SmartCardInterfaceModes.Apdu) { tbResultData.Text = DisplayRapdu(outputData); } else { tbResultData.Text = GetString(outputData); } } catch (Exception ae) { ShowException(ae); } finally { Cursor.Current = old; } }
public override byte[] ReadData(SmartCardReadAction action, byte[] data) { int iCount = 0; string sData = InteropCommon.ToStringFromByteArray(data, _binaryConversion); VerifyResult(_cco.ReadData((int)action, ref iCount, ref sData)); return(InteropCommon.ToByteArrayFromString(sData, _binaryConversion)); }