Ejemplo n.º 1
0
    void ReleaseDesignerOutlets()
    {
        if (ActionSheetBottomButton != null)
        {
            ActionSheetBottomButton.Dispose();
            ActionSheetBottomButton = null;
        }

        if (ActionSheetButton != null)
        {
            ActionSheetButton.Dispose();
            ActionSheetButton = null;
        }

        if (AlertButton != null)
        {
            AlertButton.Dispose();
            AlertButton = null;
        }

        if (ConfirmButton != null)
        {
            ConfirmButton.Dispose();
            ConfirmButton = null;
        }

        if (DeleteButton != null)
        {
            DeleteButton.Dispose();
            DeleteButton = null;
        }

        if (LoadingButton != null)
        {
            LoadingButton.Dispose();
            LoadingButton = null;
        }

        if (PromptButton != null)
        {
            PromptButton.Dispose();
            PromptButton = null;
        }

        if (SnackbarButton != null)
        {
            SnackbarButton.Dispose();
            SnackbarButton = null;
        }

        if (ToastButton != null)
        {
            ToastButton.Dispose();
            ToastButton = null;
        }
    }
Ejemplo n.º 2
0
        private async void DoShowEulaDialog()
        {
            var promtViewModel = new PromptWindowViewModel();

            var acceptButton  = new PromptButton("Accept");
            var declineButton = new PromptButton("Decline");

            promtViewModel.Buttons.Add(acceptButton);
            promtViewModel.Buttons.Add(declineButton);

            IsEnabled = false;
            var clickedButton = await promtViewModel.Show(this);

            IsEnabled = true;

            Messenger.Default.Send(new ShowEulaDialogResult(clickedButton == acceptButton));
        }
 private void PromptButtonClicked(PromptButton button)
 {
     _completionSource?.TrySetResult(button);
     Close();
 }