private void pageExistingCryptoKey_Commit(object sender, WizardPageConfirmEventArgs e)
{
_cryptoKey = textBoxCryptoKey.Text;
try
{
using (var handler = new DialogTaskHandler(this))
handler.RunTask(new SimpleTask(Text, CheckCryptoKey));
}
#region Error handling
catch (WebException ex)
{
Log.Warn(ex);
Msg.Inform(this, ex.Message, MsgSeverity.Warn);
e.Cancel = true;
}
catch (InvalidDataException ex)
{
Log.Warn(ex);
Msg.Inform(this, ex.Message, MsgSeverity.Warn);
e.Cancel = true;
}
catch (OperationCanceledException)
{
e.Cancel = true;
}
#endregion
pageExistingCryptoKey.NextPage = _troubleshooting ? pageChangeCryptoKey : pageSetupFinished;
}