Esempio n. 1
0
        private static InteractiveAlertView CreateAlertView(InteractiveAlertConfig alertConfig)
        {
            var appearance = new InteractiveAlertView.SCLAppearance();

            appearance.ShowCloseButton   = alertConfig.CancelButton != null;
            appearance.DisableTapGesture = !alertConfig.IsCancellable;
            appearance.HideWhenBackgroundViewIsTapped = alertConfig.IsCancellable;

            var alertView = new InteractiveAlertView(appearance);

            alertView.SetDismissBlock(alertConfig.CancelButton?.Action);
            if (alertConfig.OkButton != null)
            {
                alertView.AddButton(alertConfig.OkButton.Title, alertConfig.OkButton.Action);
            }

            alertView.ShowAlert(alertConfig.Style, alertConfig.Title, alertConfig.Message, alertConfig.CancelButton?.Title);

            return(alertView);
        }
Esempio n. 2
0
 // Initialisation and Title/Subtitle/Close functions
 public SclAlertViewResponder(InteractiveAlertView alertview)
 {
     Alertview = alertview;
 }