Beispiel #1
0
        /// <inheritdoc/>
        public async Task <MessageBoxResult> ShowMessageAsync(string message, string title, MessageBoxButtons buttons, bool conservativeDefault)
        {
            ButtonArrangement arrangement = ButtonArrangement.Create(buttons, _languageService);
            bool dialogResult             = await AlertDialogHelper.ShowAsync(
                _rootActivity,
                message,
                title,
                arrangement.PositiveButtonText,
                arrangement.NegativeButtonText);

            return(arrangement.ToMessageBoxResult(dialogResult));
        }
Beispiel #2
0
        /// <inheritdoc/>
        public async Task <MessageBoxResult> ShowMessageAsync(string message, string title, MessageBoxButtons buttons, bool conservativeDefault)
        {
            ButtonArrangement arrangement = ButtonArrangement.Create(buttons, _languageService);
            ContentDialog     dialog      = new ContentDialog()
            {
                Title             = title,
                Content           = message,
                CloseButtonText   = arrangement.CloseButtonText,
                PrimaryButtonText = arrangement.PrimaryButtonText,
                DefaultButton     = conservativeDefault ? ContentDialogButton.Close : ContentDialogButton.Primary,
            };

            ContentDialogResult result = await dialog.ShowAsync();

            return(arrangement.ToMessageBoxResult(result));
        }