基本信息
源码名称:神思身份证读卡demo(神思二代x64+x86demo)
源码大小:3.02M
文件格式:.rar
开发语言:C#
更新时间:2019-04-26
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 5 元 
   源码介绍

0、驱动安装,这个请从购买设备商那获取
1、读取身份证需要在项目路径下写入文件,如果读取失败请尝试给项目运行目录文件读取写入权限

详情细节,请参照神思给的官方文档

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using WindowsFormsApplication1.Class;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            

        }

        private void button2_Click(object sender, EventArgs e)
        {

            bool in64bit = (IntPtr.Size == 8);
            RdCardModel model = null;
            if (in64bit)
            {
                model = ReadCardInfo.ReadCard();
            }
            else
            {
                model = ReadCardInfo.ReadCard86();
            }
            if (model != null)
            {
                textBox1.Text = "";
                string text = string.Format("姓名:{0}\r\n 性别:{1}\r\n 民族:{2}\r\n 出生日期:{3}\r\n 住址:{4}\r\n 身份证号:{5}", model.NAME, model.SEX
                    , model.NATION, model.BIRTH, model.ADDRESS, model.IDNO);
                textBox1.Text = text;
            }
        }

        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            
        }

        private void button1_Click_1(object sender, EventArgs e)
        {
            Server serverFrm = new Server();
            serverFrm.Show();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            Clennt frm = new Clennt();
            frm.Show();
        }
    }

   
}