예제 #1
0
        public static void Alert(string title, string message, bool modal)
        {
            UIAlert alert = null;

            alert = UIScreen.GlobalShowAlert(new UIAlertOptions()
            {
                Title   = title,
                Message = message,
                Buttons = UIAlertButton.Ok((btn) => { UIScreen.RemoveDialog(alert); })
            }, modal);
        }
예제 #2
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);
        }
예제 #3
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);
        }
예제 #4
0
        public static void Prompt(string title, string message, bool modal, Callback <string> callback)
        {
            UIAlert alert = null;

            alert = UIScreen.GlobalShowAlert(new UIAlertOptions()
            {
                Title     = title,
                Message   = message,
                TextEntry = true,
                Buttons   = UIAlertButton.OkCancel(
                    (btn) => { callback(alert.ResponseText); UIScreen.RemoveDialog(alert); },
                    (btn) => { callback(null); UIScreen.RemoveDialog(alert); }
                    )
            }, modal);
        }