Exemple #1
0
        private void btnDeleteCertificate_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(tbSerialNumber.Text))
            {
                MessageBox.Show("Please enter the serial number of the certificate.");
                tbSerialNumber.Focus();
                return;
            }

            Request(
                delegate { },
                delegate {
                if (!mPenCommV2.IsSupportEncryption)
                {
                    MessageBox.Show("The pen does not support secure communication.");
                }

                if (!mPenCommV2.ReqDeleteCertificate(tbSerialNumber.Text))
                {
                    MessageBox.Show("Please check the serial number of the certificate. (Only numbers can be entered.)");
                    tbSerialNumber.Focus();
                }
            }
                );
        }