public void AddButton(Button button) { buttons.Add (button); button.Dialog = this; dialog_add_button (handle, button.label, button.enabled, button.id, button.visible); if (Visible) { dialog_update (handle); } }
public static void Alert(string title, string message, params Button[] buttons) { using (var a = new Dialog (title, message)) { foreach (var b in buttons) { a.AddButton (b); } a.Show (); HandleEvent (PlatformServices.NextDomainEvent (eventDomain)); } }