Esempio n. 1
0
        /// <summary>
        /// Handles the OK button click event.
        /// </summary>
        /// <returns>A task that represents the asynchronous operation.</returns>
        protected Task OnOkClicked()
        {
            return(InvokeAsync(async() =>
            {
                await Okayed.InvokeAsync();

                await ModalRef.Hide();
            }));
        }
Esempio n. 2
0
        /// <summary>
        /// Handles the Cancel button click event.
        /// </summary>
        /// <returns>A task that represents the asynchronous operation.</returns>
        protected Task OnCancelClicked()
        {
            return(InvokeAsync(async() =>
            {
                await ModalRef.Hide();

                if (IsConfirmation && Callback != null)
                {
                    await InvokeAsync(() => Callback.SetResult(false));
                }

                await Canceled.InvokeAsync();
            }));
        }
        /// <summary>
        /// Handles the Confirm button click event.
        /// </summary>
        /// <returns>A task that represents the asynchronous operation.</returns>
        protected Task OnConfirmClicked()
        {
            return(InvokeAsync(async() =>
            {
                ModalRef.Hide();

                if (IsConfirmation && Callback != null)
                {
                    await InvokeAsync(() => Callback.SetResult(true));
                }

                await Confirmed.InvokeAsync(null);
            }));
        }