private void bQuit_Click(object sender, EventArgs e) { // terminate the application retCode = ModWinsCard.SCardReleaseContext(hContext); retCode = ModWinsCard.SCardDisconnect(hCard, ModWinsCard.SCARD_UNPOWER_CARD); System.Environment.Exit(0); }
private void btnExit_Click(object sender, System.EventArgs e) { //terminate the application retcode = ModWinsCard.SCardDisconnect(hCard, ModWinsCard.SCARD_UNPOWER_CARD); retcode = ModWinsCard.SCardReleaseContext(hContext); Application.Exit(); }
private void btnDisconnect_Click(object sender, System.EventArgs e) { //Disconnect and unpower card if (connActive) { retcode = ModWinsCard.SCardDisconnect(hCard, ModWinsCard.SCARD_UNPOWER_CARD); } retcode = ModWinsCard.SCardReleaseContext(hContext); connActive = false; btnFormat.Enabled = false; btnConnect.Enabled = false; btnReset.Enabled = false; txtData.Enabled = false; txtData.Text = ""; richTextBoxLogs.Clear(); cbReader.Items.Clear(); cbReader.Text = ""; GroupBox2.Enabled = false; GBUserFile.Enabled = false; RBAA11.Checked = false; RBBB22.Checked = false; RBCC33.Checked = false; }
public void CardReset() { if (connActive) { retCode = ModWinsCard.SCardDisconnect(hCard, ModWinsCard.SCARD_UNPOWER_CARD); } retCode = ModWinsCard.SCardReleaseContext(hCard); }
private void bReset_Click(object sender, EventArgs e) { if (connActive) { retCode = ModWinsCard.SCardDisconnect(hCard, ModWinsCard.SCARD_UNPOWER_CARD); } retCode = ModWinsCard.SCardReleaseContext(hCard); InitMenu(); }
private void frmStart_FormClosing(object sender, FormClosingEventArgs e) { retCode = ModWinsCard.SCardReleaseContext(hContext); retCode = ModWinsCard.SCardDisconnect(hCard, ModWinsCard.SCARD_UNPOWER_CARD); System.Environment.Exit(0); }
private static void EndTransaction() { ModWinsCard.SCardEndTransaction(hCard, ModWinsCard.SCARD_LEAVE_CARD); ModWinsCard.SCardDisconnect(hCard, ModWinsCard.SCARD_UNPOWER_CARD); ModWinsCard.SCardReleaseContext(hContext); }
public void Dispose() { ModWinsCard.SCardEndTransaction(_hCard, ModWinsCard.SCARD_EJECT_CARD); ModWinsCard.SCardReleaseContext(_hContext); ModWinsCard.SCardDisconnect(_hCard, ModWinsCard.SCARD_EJECT_CARD); }