• 大小: 26KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-08
  • 语言: C#
  • 标签: IC卡读写  

资源简介

IC卡(智能卡SmartCard)读写,(纯代码,无封装),有问题欢迎大家邮件我zuoqianzhou@qq.com。(仅提供思路,部分地方需要根据自己的要求修改代码)

资源截图

代码片段和文件信息

/**************************************************************************************
 * Read & Write Mifare IC Card
 * 
 * Author | Date | Changes
 **************************************************************************************
 * zuoqianzhou@qq.com | 2012/09/20 | Created.
 *************************************************************************************/
 
using System;

namespace izuo.me
{
    /// 
    /// 发布IC卡处理事件
    /// 

    public class ICCardEvent
    {
        /// 
        /// 定义事件参数类
        /// 

        public class ICCardEventArgs : EventArgs
        {
            public readonly string EventMsg = string.Empty;
            public ICCardEventArgs(string msg)
            {
                EventMsg = msg;
            }
        }

        /// 
        /// 定义delegate
        /// 

        /// 
        /// 
        public delegate void ICCardEventHandler(object sender ICCardEventArgs e);

        /// 
        /// 连接读卡器失败
        /// 

        public event ICCardEventHandler ICCardReader_Connect_Failed;
        /// 
        /// 连接读卡器成功
        /// 

        public event ICCardEventHandler ICCardReader_Connect_Succeed;
        /// 
        /// 连接卡失败
        /// 

        public event ICCardEventHandler ICCard_Connect_Failed;
        /// 
        /// 连接卡成功
        /// 

        public event ICCardEventHandler ICCard_Connect_Succeed;
        /// 
        /// 块验证失败
        /// 

        public event ICCardEventHandler ICCard_LoadAuthentication_Failed;
        /// 
        /// 块验证成功
        /// 

        public event ICCardEventHandler ICCard_LoadAuthentication_Succeed;
        /// 
        /// 读卡失败
        /// 

        public event ICCardEventHandler ICCard_Read_Failed;
        /// 
        /// 读卡成功
        /// 

        public event ICCardEventHandler ICCard_Read_Succeed;
        /// 
        /// 写卡失败
        /// 

        public event ICCardEventHandler ICCard_Write_Failed;
        /// 
        /// 写卡成功
        /// 

        public event ICCardEventHandler ICCard_Write_Succeed;

        /// 
        /// 发现新卡
        /// 

        public event ICCardEventHandler ICCard_NewCardFound;

        public event ICCardEventHandler ICCard_Removed;

        /// 
        /// 触发事件
        /// 

        /// 
        /// 
        public void RaiseICCardEvent(string msg string option)
        {
            ICCardEventArgs e = new ICCardEventArgs(msg);
            OnICCardEvent(e option);
        }

        protected virtual void OnICCardEvent(ICCardEventArgs estring o

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-11-07 11:33  JrlibICCardHandler\
     文件        5314  2012-11-07 11:48  JrlibICCardHandler\ICCardEvent.cs
     文件        3298  2012-11-07 10:58  JrlibICCardHandler\ICCardReader_Connect.cs
     文件        5209  2012-11-07 10:50  JrlibICCardHandler\ICCardReadProcess.cs
     文件        7002  2012-11-07 11:00  JrlibICCardHandler\ICCardWriteProcess.cs
     文件        2823  2012-11-07 09:55  JrlibICCardHandler\ICCard_Connect.cs
     文件        3352  2012-11-07 10:51  JrlibICCardHandler\ICCard_LoadAuthenticationkeys.cs
     文件        2395  2012-11-07 09:48  JrlibICCardHandler\ICCard_Monitor.cs
     文件        3942  2012-11-07 10:54  JrlibICCardHandler\ICCard_Read.cs
     文件        2677  2012-11-07 10:55  JrlibICCardHandler\ICCard_SendAPDU.cs
     文件        3915  2012-11-07 10:57  JrlibICCardHandler\ICCard_Write.cs
     文件        3450  2012-11-07 09:48  JrlibICCardHandler\MainForm.cs
     文件        8602  2012-11-07 11:42  JrlibICCardHandler\ModWinsCard.cs
     文件       70775  2012-11-07 09:37  JrlibICCardHandler\SpringCardPCSC.cs

评论

共有 条评论