本文整理汇总了C#中SimiasWebService.IsPassPhraseSet方法的典型用法代码示例。如果您正苦于以下问题:C# SimiasWebService.IsPassPhraseSet方法的具体用法?C# SimiasWebService.IsPassPhraseSet怎么用?C# SimiasWebService.IsPassPhraseSet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimiasWebService
的用法示例。
在下文中一共展示了SimiasWebService.IsPassPhraseSet方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowVerifyDialog
private 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.Cancel || result == (int)ResponseType.DeleteEvent)
break;
if( result == (int)ResponseType.Ok)
{
passPhraseStatus = simws.ValidatePassPhrase(DomainID, vpd.PassPhrase);
}
if( passPhraseStatus != null)
{
if( passPhraseStatus.statusCode == StatusCodes.PassPhraseInvalid)
{
Debug.PrintLine("Invalid Passphrase");
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 re-enter the passphrase"));
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)
{
status = false;
simws.StorePassPhrase(DomainID, "", CredentialType.None, false);
}
else if( passPhraseStatus != null && passPhraseStatus.statusCode == StatusCodes.Success)
{
try
{
simws.StorePassPhrase( DomainID, vpd.PassPhrase, CredentialType.Basic, vpd.ShouldSavePassPhrase);
status = simws.IsPassPhraseSet(DomainID);
}
catch(Exception) {}
}
}
catch(Exception)
{
return false;
}
return status;
}