/// <summary> /// Adds a button to this message box. /// </summary> /// <param name="label">Label of the button.</param> /// <param name="type">Type of the button to be added.</param> /// <param name="InternalHandler">Should the button's click be handled internally?</param> /// <returns></returns> private UIButton AddButton(string label, UIAlertButtonType type, bool InternalHandler) { var btn = new UIButton(); btn.Caption = label; btn.Width = 100; if (InternalHandler) { btn.OnButtonClick += new ButtonClickDelegate(btn_OnButtonClick); } ButtonMap.Add(type, btn); this.Add(btn); return(btn); }
/// <summary> /// Adds a button to this message box. /// </summary> /// <param name="label">Label of the button.</param> /// <param name="type">Type of the button to be added.</param> /// <param name="InternalHandler">Should the button's click be handled internally?</param> /// <returns></returns> private UIButton AddButton(string label, UIAlertButtonType type, bool InternalHandler) { var btn = new UIBigButton(type == UIAlertButtonType.OK || type == UIAlertButtonType.Yes); btn.Visible = false; btn.Caption = label; if (btn.Width < 275) { btn.Width = 275; } if (InternalHandler) { btn.OnButtonClick += new ButtonClickDelegate(x => { HandleClose(); }); } ButtonMap.Add(type, btn); this.Add(btn); return(btn); }
public UIAlertButton(UIAlertButtonType type, ButtonClickDelegate handler, string text) { Type = type; Handler = handler; Text = text; }
public UIAlertButton(UIAlertButtonType type, ButtonClickDelegate handler) { Type = type; Handler = handler; }
public UIAlertButton(UIAlertButtonType type) { Type = type; }
/// <summary> /// Adds a button to this message box. /// </summary> /// <param name="label">Label of the button.</param> /// <param name="type">Type of the button to be added.</param> /// <param name="InternalHandler">Should the button's click be handled internally?</param> /// <returns></returns> private UIButton AddButton(string label, UIAlertButtonType type, bool InternalHandler) { var btn = new UIButton(); btn.Caption = label; btn.Width = 100; if(InternalHandler) btn.OnButtonClick += new ButtonClickDelegate(btn_OnButtonClick); ButtonMap.Add(type, btn); this.Add(btn); return btn; }