private void readIDCrad_OnReadedInfo(object sender, ReadEventArgs e)
        {
            if (isShowFrom == false)
            {
                idinfo      = new IDCardInfo();
                idinfo.Name = e.NewHuman.Name;

                idinfo.Address   = e.NewHuman.Address;
                idinfo.Sex       = e.NewHuman.Gender;
                idinfo.Birthday  = e.NewHuman.BirthDay.ToString("yyyy-MM-dd");
                idinfo.Signdate  = e.NewHuman.InceptDate;
                idinfo.Number    = e.NewHuman.IDCardNo;
                idinfo.Name      = e.NewHuman.Name;
                idinfo.People    = e.NewHuman.Nation;
                idinfo.ValidDate = e.NewHuman.ExpireDate;
                idinfo.ImagePath = e.NewHuman.PhotoLocation;
                if (idinfo != null && !string.IsNullOrEmpty(idinfo.Name))
                {
                    rc.Over();
                    isShowFrom = true;
                    if (ShowForm() == true)
                    {
                        this.DialogResult = DialogResult.OK;
                    }
                    else
                    {
                        if (!rc.IsRun)
                        {
                            rc.Start(ReadType.读基本信息);
                        }
                    }
                }
            }
        }
        private void FrmIdentityCard_Load(object sender, EventArgs e)
        {
            //读取二代身份证信息
            rc = IDCardConfig.GetIDCardReader("0");

            rc.OnReadedInfo += new EventHandler <ReadEventArgs>(readIDCrad_OnReadedInfo);
            rc.OnReadError  += new EventHandler <ReadErrorEventArgs>(readIDCrad_OnReadError);
            if (!rc.IsRun)
            {
                rc.Start(ReadType.读基本信息);
            }
        }
        private void FrmReadIdenetityGS_Load(object sender, EventArgs e)
        {
            //读取二代身份证信息
            rc = IDCardConfig.GetIDCardReader("0");

            rc.OnReadedInfo += new EventHandler <ReadEventArgs>(readIDCrad_OnReadedInfo);
            rc.OnReadError  += new EventHandler <ReadErrorEventArgs>(readIDCrad_OnReadError);
            if (!rc.IsRun)
            {
                rc.Start(ReadType.读基本信息);
            }
            timer1.Start();
            timer2.Start();
            backgroundWorker1.RunWorkerAsync();
        }
Esempio n. 4
0
        private void FrmSendCardMain_Load(object sender, EventArgs e)
        {
            LogService.GlobalInfoMessage("进入方法");
            LogService.GlobalInfoMessage("身份真读卡器类型" + AutoHostConfig.IDCardType);
            if (SendCardType == "成人")
            {
                this.label5.Text = "等待读取...";
            }
            string projectType = SkyComm.getvalue("项目版本标识");

            if (!string.IsNullOrEmpty(projectType) && projectType == "锡林郭勒盟医院")
            {
                this.label12.Text = "2.	请仔细核对身份信息,本卡系就诊专用卡。";
            }

            Log.Info("开始读取身份证", "开始读取身份证", "开始读取身份证");
            if (AutoHostConfig.IDCardType.Equals("XUHUI_PH"))
            {
                this.backgroundWorker2.RunWorkerAsync();
            }
            else
            {
                //读取二代身份证信息
                rc = IDCardConfig.GetIDCardReader("0");

                rc.OnReadedInfo += new EventHandler <ReadEventArgs>(readIDCrad_OnReadedInfo);
                rc.OnReadError  += new EventHandler <ReadErrorEventArgs>(readIDCrad_OnReadError);
                if (!rc.IsRun)
                {
                    rc.Start(ReadType.读基本信息);
                }
            }

            backgroundWorker1.RunWorkerAsync();
            ucTime1.Sec = 60;
            ucTime1.timer1.Start();
            if (Debugger.IsAttached)
            {
                timer1.Start();
            }
        }
        private void FrmReIssueCard_Load(object sender, EventArgs e)
        {
            this.label5.Text = "等待读取...";

            string projectType = SkyComm.getvalue("项目版本标识");

            if (!string.IsNullOrEmpty(projectType) && projectType == "锡林郭勒盟医院")
            {
                this.label12.Text   = "2.	请仔细核对身份信息,本卡系就诊专用卡。";
                this.label2.Visible = false;
                this.label3.Top     = this.label12.Location.Y + 30;
                this.label8.Top     = this.label12.Location.Y + 60;
            }

            if (AutoHostConfig.IDCardType.Equals("XUHUI_PH"))
            {
                this.backgroundWorker2.RunWorkerAsync();
            }
            else
            {
                //读取二代身份证信息
                rc = IDCardConfig.GetIDCardReader("0");

                rc.OnReadedInfo += new EventHandler <ReadEventArgs>(readIDCrad_OnReadedInfo);
                rc.OnReadError  += new EventHandler <ReadErrorEventArgs>(readIDCrad_OnReadError);
                if (!rc.IsRun)
                {
                    rc.Start(ReadType.读基本信息);
                }
            }


            backgroundWorker1.RunWorkerAsync();
            ucTime1.Sec = 60;
            ucTime1.timer1.Start();
            if (Debugger.IsAttached)
            {
                timer1.Start();
            }
        }