/// <summary>
        /// Show a dialog with a message, a warning and two buttons.
        /// </summary>
        /// <param name="title">Title of the dialog</param>
        /// <param name="message">Message of the dialog</param>
        /// <param name="warning">Warning of the dialog</param>
        /// <param name="dialogType">A <see cref="TwoButtonsDialogType"/> value that indicates the buttons to display.</param>
        /// <param name="primaryButton">Label for the primary button.</param>
        /// <param name="secondaryButton">Label for the secondary button.</param>
        /// <returns>True if the primary button is pressed, else False.</returns>
        public static async Task <bool> ShowOkCancelAsync(string title, string message, string warning,
                                                          TwoButtonsDialogType dialogType, string primaryButton = null, string secondaryButton = null)
        {
            var dialog = new TwoButtonsDialog(title, message, warning,
                                              dialogType, primaryButton, secondaryButton);

            return(await dialog.ShowAsyncQueueBool());
        }
        /// <summary>
        /// Display an alert dialog indicating that the MEGA SSL key
        /// can't be verified (API_ESSL Error) and giving the user several options.
        /// </summary>
        public static async Task <ContentDialogResult> ShowSSLCertificateAlert()
        {
            var dialog = new TwoButtonsDialog(
                ResourceService.AppMessages.GetString("AM_SSLKeyError_Title"),
                ResourceService.AppMessages.GetString("AM_SSLKeyError"), null,
                TwoButtonsDialogType.Custom,
                ResourceService.UiResources.GetString("UI_Retry"),
                ResourceService.UiResources.GetString("UI_OpenBrowser"),
                true, ResourceService.UiResources.GetString("UI_Ignore"),
                MegaDialogStyle.AlertDialog);

            return(await dialog.ShowAsyncQueue());
        }
    public static TwoButtonsDialog DisplayAlertDialog(TwoButtonsDialog.Options _options)
    {
        TwoButtonsDialog result = null;

        if (_options != null)
        {
            _options.showCloseButton = false;
            _options.showLeftButton  = true;
            _options.showRightButton = false;

            result = DisplayDialog <TwoButtonsDialog>(_options);
        }
        else
        {
            LogHelper.LogWarning("Cannot display "
                                 + typeof(TwoButtonsDialog).Name
                                 + "; "
                                 + nameof(_options)
                                 + " is not set"
                                 );
        }

        return(result);
    }
        /// <summary>
        /// Show a dialog with a message, a warning and "Ok"/"Cancel" buttons.
        /// </summary>
        /// <param name="title">Title of the dialog.</param>
        /// <param name="message">Message of the dialog.</param>
        /// <param name="warning">Warning of the dialog.</param>
        /// <returns>True if the "Ok" button is pressed, else False.</returns>
        public static async Task <bool> ShowOkCancelAsync(string title, string message, string warning)
        {
            var dialog = new TwoButtonsDialog(title, message, warning);

            return(await dialog.ShowAsyncQueueBool());
        }