internal static DialogResult ShowDialog(IOConnectionInfo ioInfo,
bool bCreatingNew, out KeyCreationFormResult r)
{
bool bSecDesk = (Program.Config.Security.MasterKeyOnSecureDesktop &&
ProtectedDialog.IsSupported);
GFunc <KeyCreationForm> fConstruct = delegate()
{
KeyCreationForm f = new KeyCreationForm();
f.InitEx(ioInfo, bCreatingNew);
f.SecureDesktopMode = bSecDesk;
return(f);
};
GFunc <KeyCreationForm, KeyCreationFormResult> fResultBuilder = delegate(
KeyCreationForm f)
{
KeyCreationFormResult rEx = new KeyCreationFormResult();
rEx.CompositeKey = f.CompositeKey;
rEx.InvokeAfterClose = f.InvokeAfterClose;
return(rEx);
};
DialogResult dr = ProtectedDialog.ShowDialog <KeyCreationForm,
KeyCreationFormResult>(bSecDesk, fConstruct, fResultBuilder, out r);
GAction fIac = ((r != null) ? r.InvokeAfterClose : null);
if (fIac != null)
{
fIac();
}
return(dr);
}