本文整理汇总了C#中SimiasWebService.GetDomainInformation方法的典型用法代码示例。如果您正苦于以下问题:C# SimiasWebService.GetDomainInformation方法的具体用法?C# SimiasWebService.GetDomainInformation怎么用?C# SimiasWebService.GetDomainInformation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimiasWebService
的用法示例。
在下文中一共展示了SimiasWebService.GetDomainInformation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PassphraseHelper
private static bool PassphraseHelper( EnterPassPhraseDialog epd, string DomainID, SimiasWebService simws)
{
bool status = false;
int result;
do
{
result = epd.Run();
if(result == (int)ResponseType.Cancel || result == (int) ResponseType.DeleteEvent)
{
epd.Hide();
return false;
}
if( epd.PassPhrase != epd.RetypedPassPhrase )
{
iFolderMsgDialog dialog = new iFolderMsgDialog(
null,
iFolderMsgDialog.DialogType.Error,
iFolderMsgDialog.ButtonSet.None,
Util.GS("passphrase mismatch"),
Util.GS("The passphrase and retyped passphrase are not same"),
Util.GS("Please enter the passphrase again"));
dialog.Run();
dialog.Hide();
dialog.Destroy();
dialog = null;
}
else
{
break;
}
}while( result != (int)ResponseType.Cancel );
if( result != (int)ResponseType.Cancel || result != (int) ResponseType.DeleteEvent)
{
string publicKey = null;
if( epd.RecoveryAgent != null && epd.RecoveryAgent != "Server_Default")
{
byte [] RACertificateObj = DomainController.GetDomainController().GetRACertificate(DomainID, epd.RecoveryAgent);
if( RACertificateObj != null && RACertificateObj.Length != 0)
{
System.Security.Cryptography.X509Certificates.X509Certificate Cert = new System.Security.Cryptography.X509Certificates.X509Certificate(RACertificateObj);
CertificateDialog dlg = new CertificateDialog(Cert.ToString(true));
if (!Util.RegisterModalWindow(dlg))
{
dlg.Destroy();
dlg = null;
return false;
}
int res = dlg.Run();
dlg.Hide();
dlg.Destroy();
dlg = null;
if( res == (int)ResponseType.Ok)
{
publicKey = Convert.ToBase64String(Cert.GetPublicKey());
}
else
{
status = false;
simws.StorePassPhrase(DomainID, "", CredentialType.None, false);
return ShowEnterPassPhraseDialog(DomainID, simws);
}
}
status = SetPassPhrase( epd, DomainID, publicKey, simws );
epd.Hide();
return status;
}
else
{
DomainInformation domainInfo = (DomainInformation)simws.GetDomainInformation(DomainID);
string memberID = domainInfo.MemberUserID;
iFolderWebService ifWebService = DomainController.GetiFolderService();
publicKey = ifWebService.GetDefaultServerPublicKey(DomainID,memberID);
status = SetPassPhrase(epd,DomainID,publicKey,simws);
epd.Hide();
return status;
}
}
else
{
epd.Hide();
}
return true;
}