Exemple #1
0
        public async Task <ContentDialogResult> ShowAsync(ContentDialog dialog, TimeSpan?timeout = null, CancellationToken?token = null)
        {
            if (_tokenSource is null)
            {
                _tokenSource = new CancellationTokenSource();
            }
            var tk = token ?? _tokenSource.Token;

            return(await DialogManager.OneAtATimeAsync(async() => await dialog.ShowAsync(tk), timeout, tk));
        }
        public async Task <IUICommand> ShowAsync(MessageDialog dialog, TimeSpan?timeout = null, CancellationToken?token = null)
        {
            if (_tokenSource is null)
            {
                _tokenSource = new CancellationTokenSource();
            }
            var tk = token ?? _tokenSource.Token;

            return(await DialogManager.OneAtATimeAsync(async() => await dialog.ShowAsync().AsTask(tk), timeout, tk));
        }
Exemple #3
0
        public async Task <MessageBoxResult> ShowAsync(TimeSpan?timeout = null, CancellationToken?token = null)
        {
            var dialog = new ContentDialog
            {
                Content        = Text,
                RequestedTheme = RequestedTheme,
            };

            SetupButtons(dialog);
            var result = await DialogManager.OneAtATimeAsync(async() => await dialog.ShowAsync(), timeout, token);

            return(DetermineResult(result));
        }
Exemple #4
0
 public async Task <IUICommand> ShowAsync(MessageDialog dialog, TimeSpan?timeout = null, CancellationToken?token = null)
 {
     return(await DialogManager.OneAtATimeAsync(async() => await dialog.ShowAsync(), timeout, token));
 }
 public async Task <ContentDialogResult> ShowAsync(ContentDialog dialog, TimeSpan?timeout = null, CancellationToken?token = null)
 {
     return(await DialogManager.OneAtATimeAsync(async() => await dialog.ShowAsync(), timeout, token));
 }