private void BTN_SCAN_Click(object sender, EventArgs e) { try { if (Constants.PASSPORT_TYPE < 0)//여권스캐너 미 선택시 경고창 { MetroMessageBox.Show(this, Constants.getMessage("PASSPORT_NOTHING"), "Issue", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } //Wait 커서 상태면 return 처리 //if (Cursor.Current == Cursors.WaitCursor) if (this.UseWaitCursor) { return; } setWaitCursor(true); if (m_passScan.open(Constants.PASSPORT_TYPE) > 0) { int strmrz = m_passScan.scan(7); if (strmrz > 0) { //공용 TXT_PASSPORT_NAME.Text = m_passScan.GetPassportName(); TXT_PASSPORT_NO.Text = m_passScan.GetPassportNo(); TXT_PASSPORT_NAT.Text = m_passScan.GetNationality(); //TXT_PASSPORT_NAT_NAME.Text = this.searchNatonalityName(m_passScan.GetNationality()); COM_PASSPORT_SEX.Text = m_passScan.GetSex(); COM_PASSPORT_SEX.SelectedValue = m_passScan.GetSex(); Utils gtfUtil = new Utils(); string strBirth = gtfUtil.getFullDate(m_passScan.GetBirthDate()); strBirth = strBirth.Substring(0, 4) + "-" + strBirth.Substring(4, 2) + "-" + strBirth.Substring(6, 2); //string strExp = gtfUtil.getFullDate(m_passScan.GetExpireDate()); string strExp = "20" + m_passScan.GetExpireDate(); strExp = strExp.Substring(0, 4) + "-" + strExp.Substring(4, 2) + "-" + strExp.Substring(6, 2); //TXT_PASSPORT_BIRTH.Text = gtfUtil.getFullDate(m_passScan.GetBirthDate()); //TXT_PASSPORT_EXP.Text = gtfUtil.getFullDate(m_passScan.GetExpireDate()); TXT_PASSPORT_BIRTH.Text = strBirth; TXT_PASSPORT_EXP.Text = strExp; } else { MetroMessageBox.Show(this, Constants.getMessage("PASSPORT_REMOVE"), "Issue", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } } finally { setWaitCursor(false); } }