Esempio n. 1
0
        private async void ButtonOk_Click(object sender, EventArgs e)
        {
            try
            {
                await WaitDialog.Execute(this, () => _slot.InitToken(null, TextBoxTokenLabel.Text));

                DialogResult = DialogResult.OK;
            }
            catch (Exception ex)
            {
                WinFormsUtils.ShowError(this, ex);
            }
        }
Esempio n. 2
0
        private async void ButtonOk_Click(object sender, EventArgs e)
        {
            if (TextBoxPin.Text != TextBoxConfirmPin.Text)
            {
                WinFormsUtils.ShowInfo(this, "New PIN entries do not match");
                return;
            }

            try
            {
                await WaitDialog.Execute(this, () => _slot.InitToken(TextBoxPin.Text, TextBoxTokenLabel.Text));

                DialogResult = DialogResult.OK;
            }
            catch (Exception ex)
            {
                WinFormsUtils.ShowError(this, ex);
            }
        }