示例#1
0
        public static UIAlert YesNo(string title, string message, bool modal, Callback <bool> callback)
        {
            UIAlert alert = null;

            alert = UIScreen.GlobalShowAlert(new UIAlertOptions()
            {
                Title   = title,
                Message = message,
                Buttons = UIAlertButton.YesNo(
                    (btn) => { callback(true); UIScreen.RemoveDialog(alert); },
                    (btn) => { callback(false); UIScreen.RemoveDialog(alert); }
                    )
            }, modal);
            return(alert);
        }
示例#2
0
        public static void Prompt(UIAlertOptions options, Action <bool, UIAlert> resultBox)
        {
            UIAlert alert = null;

            options.Buttons = UIAlertButton.YesNo((btn) =>
            {
                resultBox(true, alert);
                UIScreen.RemoveDialog(alert);
            }, (btn) =>
            {
                resultBox(false, alert);
                UIScreen.RemoveDialog(alert);
            });
            alert = UIScreen.GlobalShowAlert(options, true);
        }