Exemplo n.º 1
0
        private void btnRead_Click(object sender, EventArgs e)
        {
            try
            {
                btnVerify.Enabled = false;
                txtName.Text      = "";
                txtMyKad.Text     = "";

                ReadingMyKadForm rmf = new ReadingMyKadForm();
                rmf.Show();
                _mp.UserProfile = _mp.MyKad.ReadFromMyKad();
                rmf.Close();
                if (_mp.UserProfile == null)
                {
                    MessageBox.Show("Read failed. Please check your reader or card.");
                    return;
                }
                txtName.Text  = _mp.UserProfile.FullName;
                txtMyKad.Text = _mp.UserProfile.IcNo;
                btnVerify_Click(this, e);
                btnVerify.Enabled = true;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemplo n.º 2
0
        private void btnRead_Click(object sender, EventArgs e)
        {
            btnVerify.Enabled = false;

            ReadingMyKadForm rmf = new ReadingMyKadForm();

            rmf.Show();
            ProfileInfo = ReadFromMyKad();
            UpdateUI();
            rmf.Close();
            btnVerify.Enabled = true;
        }
Exemplo n.º 3
0
        private void btnRead_Click(object sender, EventArgs e)
        {
            btnVerify.Enabled = false;

            ReadingMyKadForm rmf = new ReadingMyKadForm();
            rmf.Show();
            ProfileInfo = ReadFromMyKad();
            UpdateUI();
            rmf.Close();
            btnVerify.Enabled = true;
        }
Exemplo n.º 4
0
        private void btnRead_Click(object sender, EventArgs e)
        {
            try
            {
                btnVerify.Enabled = false;
                txtName.Text = "";
                txtMyKad.Text = "";

                ReadingMyKadForm rmf = new ReadingMyKadForm();
                rmf.Show();
                _mp.UserProfile = _mp.MyKad.ReadFromMyKad();
                rmf.Close();
                if (_mp.UserProfile == null)
                {
                    MessageBox.Show("Read failed. Please check your reader or card.");
                    return;
                }
                txtName.Text = _mp.UserProfile.FullName;
                txtMyKad.Text = _mp.UserProfile.IcNo;
                btnVerify_Click(this, e);
                btnVerify.Enabled = true;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }