本文整理汇总了C#中SimiasWebService.ValidatePassPhrase方法的典型用法代码示例。如果您正苦于以下问题:C# SimiasWebService.ValidatePassPhrase方法的具体用法?C# SimiasWebService.ValidatePassPhrase怎么用?C# SimiasWebService.ValidatePassPhrase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimiasWebService
的用法示例。
在下文中一共展示了SimiasWebService.ValidatePassPhrase方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowVerifyDialog
public static bool ShowVerifyDialog(string DomainID, SimiasWebService simws)
{
bool status = false;
int result;
Status passPhraseStatus= null;
VerifyPassPhraseDialog vpd = new VerifyPassPhraseDialog();
if (!Util.RegisterModalWindow(vpd))
{
vpd.Destroy();
vpd = null;
return false;
}
try
{
do
{
result = vpd.Run();
vpd.Hide();
if( result == (int)ResponseType.Ok)
passPhraseStatus = simws.ValidatePassPhrase(DomainID, vpd.PassPhrase);
if( passPhraseStatus != null)
{
if( passPhraseStatus.statusCode == StatusCodes.PassPhraseInvalid)
{
Debug.PrintLine("Invalid Passphrase");
iFolderMsgDialog dialog = new iFolderMsgDialog(
null,
iFolderMsgDialog.DialogType.Error,
iFolderMsgDialog.ButtonSet.None,
Util.GS("Invalid Passphrase"),
Util.GS("The Passphrase entered is invalid"),
Util.GS("Please enter the passphrase again"));
dialog.Run();
dialog.Hide();
dialog.Destroy();
dialog = null;
passPhraseStatus = null;
}
else if(passPhraseStatus.statusCode == StatusCodes.Success)
break;
}
}while( result != (int)ResponseType.Cancel && result !=(int)ResponseType.DeleteEvent);
if( result == (int)ResponseType.Cancel || result == (int)ResponseType.DeleteEvent)
{
try
{
simws.StorePassPhrase(DomainID, "", CredentialType.None, false);
status = false;
}
catch(Exception)
{
return false;
}
}
else if( passPhraseStatus != null && passPhraseStatus.statusCode == StatusCodes.Success)
{
try
{
simws.StorePassPhrase( DomainID, vpd.PassPhrase, CredentialType.Basic, vpd.ShouldSavePassPhrase);
status = true;
}
catch(Exception)
{
return false;
}
}
}
catch(Exception)
{
return false;
}
return status;
}