예제 #1
0
 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);
 }
예제 #2
0
파일: Form1.cs 프로젝트: anbrousse1/projet
 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();
 }
예제 #3
0
파일: Form1.cs 프로젝트: anbrousse1/projet
        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;
        }
예제 #4
0
        public void CardReset()
        {
            if (connActive)
            {
                retCode = ModWinsCard.SCardDisconnect(hCard, ModWinsCard.SCARD_UNPOWER_CARD);
            }

            retCode = ModWinsCard.SCardReleaseContext(hCard);
        }
예제 #5
0
        private void bReset_Click(object sender, EventArgs e)
        {
            if (connActive)
            {
                retCode = ModWinsCard.SCardDisconnect(hCard, ModWinsCard.SCARD_UNPOWER_CARD);
            }

            retCode = ModWinsCard.SCardReleaseContext(hCard);
            InitMenu();
        }
예제 #6
0
 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);
 }
예제 #8
0
 public void Dispose()
 {
     ModWinsCard.SCardEndTransaction(_hCard, ModWinsCard.SCARD_EJECT_CARD);
     ModWinsCard.SCardReleaseContext(_hContext);
     ModWinsCard.SCardDisconnect(_hCard, ModWinsCard.SCARD_EJECT_CARD);
 }