Exemple #1
0
        public IosAlertDialog(IViewLocator viewLocator, AlertDialogConfig config)
            : base(viewLocator)
        {
            _config = config;

            Title   = config.Title;
            Message = config.Message;
        }
        public void Ctor_NonNullTitle_NonNullMessage_NonNullCloseButtonText_FillsProperties(
            [CombinatorialValues(EmptyString, NonEmptyTitle)] string title,
            [CombinatorialValues(EmptyString, NonEmptyMessage)] string message,
            [CombinatorialValues(EmptyString, NonEmptyCloseButtonText)] string closeButtonText)
        {
            var alertDialogConfig =
                new AlertDialogConfig(title, message, closeButtonText);

            Assert.Equal(title, alertDialogConfig.Title);
            Assert.Equal(message, alertDialogConfig.Message);
            Assert.Equal(closeButtonText, alertDialogConfig.CloseButtonText);
        }
        public Task ShowDialogAsync(AlertDialogConfig config)
        {
            var page = GetLastPageInModalStack();

            return(page.DisplayAlert(config.Title, config.Message, config.CloseButtonText));
        }
Exemple #4
0
 public DroidAlertDialog(AlertDialogConfig config)
 {
     _config = config;
 }
 public virtual Task ShowDialogAsync(AlertDialogConfig config)
 {
     return(new IosAlertDialog(_viewLocator, config).ShowAsync());
 }
 public Task ShowDialogAsync(AlertDialogConfig config)
 {
     return(new DroidAlertDialog(config).ShowAsync());
 }
Exemple #7
0
        public async Task <DialogResult> ShowAlertDialog(AlertDialogConfig config)
        {
            var builder = new AlertDialogBuilder(this);

            return(await builder.ShowAlertDialog(config));
        }