本文整理汇总了C#中ShowDialog类的典型用法代码示例。如果您正苦于以下问题:C# ShowDialog类的具体用法?C# ShowDialog怎么用?C# ShowDialog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ShowDialog类属于命名空间,在下文中一共展示了ShowDialog类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Authenticate
public IAccessToken Authenticate(
AzureAccount account,
AzureEnvironment environment,
string tenant,
SecureString password,
ShowDialog promptBehavior,
TokenCache tokenCache,
AzureEnvironment.Endpoint resourceId = AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId)
{
var configuration = GetAdalConfiguration(environment, tenant, resourceId, tokenCache);
TracingAdapter.Information(Resources.AdalAuthConfigurationTrace, configuration.AdDomain, configuration.AdEndpoint,
configuration.ClientId, configuration.ClientRedirectUri, configuration.ResourceClientUri, configuration.ValidateAuthority);
IAccessToken token;
if (account.IsPropertySet(AzureAccount.Property.CertificateThumbprint))
{
var thumbprint = account.GetProperty(AzureAccount.Property.CertificateThumbprint);
token = TokenProvider.GetAccessTokenWithCertificate(configuration, account.Id, thumbprint, account.Type);
}
else
{
token = TokenProvider.GetAccessToken(configuration, promptBehavior, account.Id, password, account.Type);
}
account.Id = token.UserId;
return token;
}
示例2: Authenticate
public IAccessToken Authenticate(ref AzureAccount account, AzureEnvironment environment, string tenant, SecureString password,
ShowDialog promptBehavior)
{
var token = TokenProvider.GetAccessToken(GetAdalConfiguration(environment, tenant), promptBehavior, account.Id, password, account.Type);
account.Id = token.UserId;
return token;
}
示例3: Authenticate
public IAccessToken Authenticate(
AzureAccount account,
AzureEnvironment environment,
string tenant,
SecureString password,
ShowDialog promptBehavior,
IdentityModel.Clients.ActiveDirectory.TokenCache tokenCache,
AzureEnvironment.Endpoint resourceId = AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId)
{
if (account.Id == null)
{
account.Id = "test";
}
if (TokenProvider == null)
{
return new MockAccessToken()
{
AccessToken = account.Id,
LoginType = LoginType.OrgId,
UserId = account.Id
};
}
else
{
return TokenProvider(account, environment, tenant);
}
}
示例4: ShowInputDialog
public IEnumerable<IResult> ShowInputDialog() {
var showDialog = new ShowDialog<DialogViewModel>();
yield return showDialog;
var result = showDialog.Dialog.Result;
if(result != null) {
yield return new ShowDialog<MessageViewModel>()
.ConfigureWith(x => x.Message = "The user entered: " + result);
}
}
示例5: Authenticate
public IAccessToken Authenticate(AzureAccount account, AzureEnvironment environment, string tenant, SecureString password, ShowDialog promptBehavior)
{
if (account.Id == null)
{
account.Id = "test";
}
return TokenProvider(account, environment, tenant);
}
示例6: GetAccessToken
public IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBehavior, string userId, SecureString password,
AzureAccount.AccountType credentialType)
{
if (credentialType == AzureAccount.AccountType.User)
{
throw new ArgumentException(string.Format(Resources.InvalidCredentialType, "User"), "credentialType");
}
return new ServicePrincipalAccessToken(config, AcquireTokenWithSecret(config, userId, password), this.RenewWithSecret, userId);
}
示例7: Authenticate
public IAccessToken Authenticate(AzureAccount account, AzureEnvironment environment, string tenant, SecureString password, ShowDialog promptBehavior,
AzureEnvironment.Endpoint resourceId = AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId)
{
var configuration = GetAdalConfiguration(environment, tenant, resourceId);
TracingAdapter.Information(Resources.AdalAuthConfigurationTrace, configuration.AdDomain, configuration.AdEndpoint,
configuration.ClientId, configuration.ClientRedirectUri, configuration.ResourceClientUri, configuration.ValidateAuthority);
var token = TokenProvider.GetAccessToken(configuration, promptBehavior, account.Id, password, account.Type);
account.Id = token.UserId;
return token;
}
示例8: Authenticate
public IAccessToken Authenticate(
AzureAccount account,
AzureEnvironment environment,
string tenant,
SecureString password,
ShowDialog promptBehavior,
AzureEnvironment.Endpoint resourceId = AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId)
{
return Authenticate(account, environment, tenant, password, promptBehavior, AzureSession.TokenCache, resourceId);
}
示例9: IncomingCall
private IEnumerator<IResult> IncomingCall()
{
var callDialog = new ShowDialog<IncomingCallDialogViewModel>().ConfigureWith(x => x.CallerID = CalleeID);
yield return callDialog;
if (callDialog.Dialog.Answered)
navService.UriFor<ActiveCallPageViewModel>()
.WithParam(x => x.calleeID, CalleeID)
.WithParam(x => x.isIncoming, true)
.Navigate();
}
示例10: Authenticate
public IAccessToken Authenticate(AzureAccount account, AzureEnvironment environment, string tenant, SecureString password, ShowDialog promptBehavior,
AzureEnvironment.Endpoint resourceId = AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId)
{
if (account.Id == null)
{
account.Id = "test";
}
return TokenProvider(account, environment, tenant);
}
示例11: ReportDueFungalResults
public IEnumerable<IResult> ReportDueFungalResults()
{
var showCriteriaDialog = new ShowDialog<DateDialogViewModel>().ConfigureWith(x => { x.DisplayName = "Enter Result Read Date"; }, UILib.GetSettingsWithOutCloseOrResize());
yield return showCriteriaDialog;
var selectedDate = (DateTime?)showCriteriaDialog.Dialog.ReturnObject;
if (selectedDate != null)
{
var reportParameters = new Dictionary<string, object> { { "reportDate", selectedDate } };
Shell.Value.Dialogs.ShowDialog(new ReportViewModel("Fungal Results Due Report", "ReportDueFungalResults", reportParameters, true));
}
}
示例12: GetAccessToken
public IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBehavior, string userId, SecureString password,
AzureAccount.AccountType credentialType)
{
switch (credentialType)
{
case AzureAccount.AccountType.User:
return userTokenProvider.GetAccessToken(config, promptBehavior, userId, password, credentialType);
case AzureAccount.AccountType.ServicePrincipal:
return servicePrincipalTokenProvider.GetAccessToken(config, promptBehavior, userId, password, credentialType);
default:
throw new ArgumentException(Resources.UnknownCredentialType, "credentialType");
}
}
示例13: Authenticate
public IAccessToken Authenticate(AzureAccount account, AzureEnvironment environment, string tenant, SecureString password, ShowDialog promptBehavior)
{
if (account.Id == null)
{
account.Id = "test";
}
var token = new MockAccessToken
{
UserId = account.Id,
LoginType = LoginType.OrgId,
AccessToken = "123"
};
return token;
}
示例14: Authenticate
public IAccessToken Authenticate(AzureAccount account, AzureEnvironment environment, string tenant, SecureString password, ShowDialog promptBehavior,
AzureEnvironment.Endpoint resourceId = AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId)
{
if (account.Id == null)
{
account.Id = "test";
}
var token = new MockAccessToken
{
UserId = account.Id,
LoginType = LoginType.OrgId,
AccessToken = "123"
};
return token;
}
示例15: HandleException
//public static GlobalExceptionHandler(IEventAggregator eventAggregator)
//{
// this.eventAggregator = eventAggregator;
//}
public static IEnumerable<IResult> HandleException(Exception ex)
{
var showDialog = new ShowDialog<ExceptionViewModel>();
yield return showDialog;
var sendException = showDialog.Dialog.SendException;
if (sendException)
{
EmailComposeTask emailCompose = new EmailComposeTask();
emailCompose.To = "[email protected]";
emailCompose.Subject = ex.Message;
string exceptionString = ex.ToString();
for (Exception innerException = ex.InnerException; innerException != null; innerException = innerException.InnerException)
exceptionString = exceptionString + "\n\n" + "INNER EXCEPTION:\n" + ((object)innerException).ToString();
string exceptionWithVersion = exceptionString + "APPLICATION VERSION: " + AppResources.ApplicationVersion;
emailCompose.Body = exceptionWithVersion;
emailCompose.Show();
//yield return new ShowDialog<MessageViewModel>()
// .Init(x => x.Message = "The user entered: " + result);
}
}