コード例 #1
0
ファイル: DialogService.cs プロジェクト: hmrg-grmh/meganz-uwp
        /// <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());
        }
コード例 #2
0
ファイル: DialogService.cs プロジェクト: hmrg-grmh/meganz-uwp
        /// <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());
        }