/// <summary>
/// Shows standard decryption error UI within the context of a parent form
/// </summary>
public static DecryptionErrorAction OnDecryptionError(Control form, IContentEncryption encryptor)
{
if (form.InvokeRequired)
{
DecryptionErrorAction result = DecryptionErrorAction.Skip;
IAsyncResult async = form.BeginInvoke(new MethodInvoker(delegate
{
result = ShowDecryptionErrorDialog(form, encryptor);
}));
form.EndInvoke(async);
return result;
}
return ShowDecryptionErrorDialog(form, encryptor);
}