예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            var mrzData = MrzParser.Parse(dfsMRZ.Text);

            dfsDocumentType.Text   = mrzData.DocumentType;
            dfsIssuingCountry.Text = mrzData.IssuingCountryIso;
            dfsFirstName.Text      = mrzData.FirstName;
            dfsLastName.Text       = mrzData.LastName;
            dfsDocumentNumber.Text = mrzData.DocumentNumber;
            dfsNationality.Text    = mrzData.NationalityIso;
            dfdDOB.Text            = mrzData.DateOfBirth.ToString("dd/MM/yyyy");
            dfdExpireDate.Text     = mrzData.ExpireDate.ToString("dd/MM/yyyy");
            dfsGender.Text         = mrzData.Gender;
        }
예제 #2
0
        private void btnMake_Click(object sender, EventArgs e)
        {
            var mrzData = new MrzData
            {
                DocumentType      = dfsDocumentType.Text,
                IssuingCountryIso = dfsIssuingCountry.Text,
                FirstName         = dfsFirstName.Text,
                LastName          = dfsLastName.Text,
                DocumentNumber    = dfsDocumentNumber.Text,
                NationalityIso    = dfsNationality.Text,
                DateOfBirth       = DateTime.Parse(dfdDOB.Text),
                ExpireDate        = DateTime.Parse(dfdExpireDate.Text),
                Gender            = dfsGender.Text,
            };

            dfsMRZ.Text = MrzParser.CreatMrz(mrzData);
        }
예제 #3
0
        public void Create(string expectedMrz, MrzData data)
        {
            var mrz = MrzParser.CreatMrz(data);

            mrz.Equals(expectedMrz).ShouldBeTrue();
        }
예제 #4
0
        public void Parse(string mrz, MrzData expectedData)
        {
            var data = MrzParser.Parse(mrz);

            data.Equals(expectedData).ShouldBeTrue();
        }