public static void Show(string title, string message) { using(var alert = new UIAlertView(title, message, null, "OK", null)) { alert.InvokeOnMainThread(() => alert.Show()); } }
public static void Show(string title, string message) { using (var alert = new UIAlertView(title, message, null, "OK", null)) { alert.InvokeOnMainThread(() => alert.Show()); } }
public static void Show(string message, int timeout) { var timer = new System.Timers.Timer (timeout); var alert = new UIAlertView{ Message = message }; timer.Elapsed += delegate { timer.Stop (); alert.InvokeOnMainThread (delegate { alert.DismissWithClickedButtonIndex (0, animated:true); }); }; alert.Show (); timer.Start (); }
public void Show(string title, string message) { var alert = new UIAlertView(); alert.InvokeOnMainThread(() => { alert.Message = message; alert.Title = title; alert.AlertViewStyle = UIAlertViewStyle.Default; alert.AddButton("OK"); alert.CancelButtonIndex = 0; alert.Clicked += delegate(object sender, UIButtonEventArgs btnArgs) { if (btnArgs.ButtonIndex == 1) { } }; alert.Show(); }); }
public void ShowMessage(string title, string message, string button) { var view = new UIAlertView(title, message, null, button); view.InvokeOnMainThread(view.Show); }