public override void Alert(AlertConfig config) { Device.BeginInvokeOnMainThread(() => { if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0)) { var alert = UIAlertController.Create(config.Title ?? String.Empty, config.Message, UIAlertControllerStyle.Alert); alert.AddAction(UIAlertAction.Create("OK", UIAlertActionStyle.Default, x => { if (config.OnOk != null) { config.OnOk(); } })); Present(alert); } else { var dlg = new UIAlertView(config.Title ?? String.Empty, config.Message, null, null, config.OkText); if (config.OnOk != null) { dlg.Clicked += (s, e) => config.OnOk(); } dlg.Show(); } }); }
public async override void Alert(AlertConfig config) { if (uiCommand != null) { uiCommand.Cancel(); } CoreDispatcher dispatcher = CoreWindow.GetForCurrentThread().Dispatcher; await dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { try { var dialog = new MessageDialog(config.Message, config.Title); //OK Button UICommand okBtn = new UICommand(config.OkText); if (config.OnOk != null) { okBtn.Invoked = command => config.OnOk(); } dialog.Commands.Add(okBtn); uiCommand = dialog.ShowAsync(); } catch (Exception ex) { //throw ex; } }); }
public override void Alert(AlertConfig config) { var alert = UIAlertController.Create(config.Title ?? String.Empty, config.Message, UIAlertControllerStyle.Alert); alert.AddAction(UIAlertAction.Create("OK", UIAlertActionStyle.Default, x => { if (config.OnOk != null) config.OnOk(); })); this.Present(alert); }
public override void Alert(AlertConfig config) { Device.BeginInvokeOnMainThread(() => { var dlg = new UIAlertView(config.Title ?? String.Empty, config.Message, null, null, config.OkText); if (config.OnOk != null) dlg.Clicked += (s, e) => config.OnOk(); dlg.Show(); }); }
public override void Alert(AlertConfig config) { this.Dispatch(() => { var dlg = new UIAlertView(config.Title ?? String.Empty, config.Message, null, null, config.OkText); if (config.OnOk != null) dlg.Clicked += (s, e) => config.OnOk(); dlg.Show(); }); }
public override void Alert(AlertConfig config) { var alert = UIAlertController.Create(config.Title ?? String.Empty, config.Message, UIAlertControllerStyle.Alert); alert.AddAction(UIAlertAction.Create("OK", UIAlertActionStyle.Default, x => { if (config.OnOk != null) { config.OnOk(); } })); this.Present(alert); }
public override void Alert(AlertConfig config) { Device.BeginInvokeOnMainThread(() => { var dlg = new UIAlertView(config.Title ?? String.Empty, config.Message, null, null, config.OkText); if (config.OnOk != null) { dlg.Clicked += (s, e) => config.OnOk(); } dlg.Show(); }); }
public override void Alert(AlertConfig config) { this.Dispatch(() => { var dlg = new UIAlertView(config.Title ?? String.Empty, config.Message, null, null, config.OkText); if (config.OnOk != null) { dlg.Clicked += (s, e) => config.OnOk(); } dlg.Show(); }); }
public override void Alert(AlertConfig config) { Utils.RequestMainThread(() => new AlertDialog .Builder(Utils.GetActivityContext()) .SetMessage(config.Message) .SetTitle(config.Title) .SetPositiveButton(config.OkText, (o, e) => { if (config.OnOk != null) config.OnOk(); }) .Show() ); }
public override void Alert(AlertConfig config) { this.Dispatch(() => { var alert = new CustomMessageBox { Caption = config.Title, Message = config.Message, LeftButtonContent = config.OkText, IsRightButtonEnabled = false }; if (config.OnOk != null) alert.Dismissed += (sender, args) => config.OnOk(); alert.Show(); }); }
public override void Alert(AlertConfig config) { Utils.RequestMainThread(() => new AlertDialog .Builder(Utils.GetActivityContext()) .SetMessage(config.Message) .SetTitle(config.Title) .SetPositiveButton(config.OkText, (o, e) => { if (config.OnOk != null) { config.OnOk(); } }) .Show() ); }
public override void Alert(AlertConfig config) { this.Dispatch(() => { var alert = new CustomMessageBox { Caption = config.Title, Message = config.Message, LeftButtonContent = config.OkText, IsRightButtonEnabled = false }; if (config.OnOk != null) { alert.Dismissed += (sender, args) => config.OnOk(); } alert.Show(); }); }