本文整理汇总了C#中ShowDialog类的典型用法代码示例。如果您正苦于以下问题:C# ShowDialog类的具体用法?C# ShowDialog怎么用?C# ShowDialog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ShowDialog类属于命名空间,在下文中一共展示了ShowDialog类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:rohmano,项目名称:azure-powershell,代码行数:28,代码来源:AuthenticationFactory.cs
示例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;
}
开发者ID:djrosanova,项目名称:azure-sdk-tools,代码行数:7,代码来源:AuthenticationFactory.cs
示例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);
}
}
开发者ID:rohmano,项目名称:azure-powershell,代码行数:28,代码来源:MockTokenAuthenticationFactory.cs
示例4: 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);
}
开发者ID:nrevanthchinni,项目名称:azure-sdk-for-net,代码行数:9,代码来源:MockTokenAuthenticationFactory.cs
示例5: 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);
}
开发者ID:rohmano,项目名称:azure-powershell,代码行数:9,代码来源:ServicePrincipalTokenProvider.cs
示例6: 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;
}
开发者ID:theadriangreen,项目名称:azure-sdk-for-net,代码行数:10,代码来源:AuthenticationFactory.cs
示例7: 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);
}
}
开发者ID:mvermef,项目名称:Caliburn.Micro,代码行数:10,代码来源:MainPageViewModel.cs
示例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);
}
开发者ID:Azure,项目名称:azure-powershell,代码行数:10,代码来源:MockCertificateAuthenticationFactory.cs
示例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();
}
开发者ID:T045T,项目名称:Echo-App,代码行数:10,代码来源:EchoClientLogic.cs
示例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);
}
开发者ID:Indhukrishna,项目名称:azure-powershell,代码行数:10,代码来源:MockTokenAuthenticationFactory.cs
示例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));
}
}
开发者ID:jserna-arl,项目名称:LIMSv2,代码行数:12,代码来源:ReportsViewModel.cs
示例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");
}
}
开发者ID:rohmano,项目名称:azure-powershell,代码行数:13,代码来源:AdalTokenProvider.cs
示例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;
}
开发者ID:khoatle,项目名称:azure-powershell,代码行数:16,代码来源:MockCertificateAuthenticationFactory.cs
示例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;
}
开发者ID:Indhukrishna,项目名称:azure-powershell,代码行数:17,代码来源:MockCertificateAuthenticationFactory.cs
示例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);
}
}
开发者ID:toolsche,项目名称:BusCon,代码行数:29,代码来源:GlobalExceptionHandler.cs
示例16: GetAccessToken
public IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBehavior, string userId, SecureString password)
{
throw new InvalidOperationException(string.Format(Resources.InvalidCredentialType, "ServicePrincipal"));
}
开发者ID:djrosanova,项目名称:azure-sdk-tools,代码行数:4,代码来源:ServicePrincipalTokenProvider.cs
示例17: GetAccessToken
public IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBehavior, string userId, SecureString password,
AzureAccount.AccountType credentialType)
{
return this.accessToken;
}
开发者ID:Azure,项目名称:azure-powershell,代码行数:5,代码来源:FakeAccessTokenProvider.cs
示例18: ListSubscriptionsForTenant
private IEnumerable<AzureSubscription> ListSubscriptionsForTenant(AzureAccount account, AzureEnvironment environment,
SecureString password, ShowDialog promptBehavior, string tenantId)
{
IAccessToken accessToken = null;
try
{
accessToken = AcquireAccessToken(account, environment, tenantId, password, promptBehavior);
}
catch
{
WriteWarningMessage(string.Format(Microsoft.Azure.Commands.Profile.Properties.Resources.UnableToAqcuireToken, tenantId));
return new List<AzureSubscription>();
}
using (var subscriptionClient = AzureSession.ClientFactory.CreateCustomClient<SubscriptionClient>(
new TokenCloudCredentials(accessToken.AccessToken),
environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ResourceManager)))
{
var subscriptions = subscriptionClient.Subscriptions.List();
if (subscriptions != null && subscriptions.Subscriptions != null)
{
return
subscriptions.Subscriptions.Select(
(s) =>
s.ToAzureSubscription(new AzureContext(_profile.Context.Subscription, account,
environment, CreateTenantFromString(tenantId, accessToken.TenantId))));
}
return new List<AzureSubscription>();
}
}
开发者ID:injyzarif,项目名称:azure-powershell,代码行数:33,代码来源:RMProfileClient.cs
示例19: GetAccessToken
public IAccessToken GetAccessToken(AdalConfiguration config, ShowDialog promptBehavior, string userId,
SecureString password)
{
return this.accessToken;
}
开发者ID:djrosanova,项目名称:azure-sdk-tools,代码行数:5,代码来源:FakeAccessTokenProvider.cs
示例20: AcquireAccessToken
private IAccessToken AcquireAccessToken(AzureAccount account,
AzureEnvironment environment,
string tenantId,
SecureString password,
ShowDialog promptBehavior)
{
if (account.Type == AzureAccount.AccountType.AccessToken)
{
tenantId = tenantId ?? "Common";
return new SimpleAccessToken(account, tenantId);
}
return AzureSession.AuthenticationFactory.Authenticate(
account,
environment,
tenantId,
password,
promptBehavior,
TokenCache.DefaultShared);
}
开发者ID:injyzarif,项目名称:azure-powershell,代码行数:20,代码来源:RMProfileClient.cs
注:本文中的ShowDialog类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论