示例#1
0
        /// <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);
        }
示例#2
0
        /// <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);
        }
示例#3
0
 public UIAlertButton(UIAlertButtonType type, ButtonClickDelegate handler, string text)
 {
     Type = type; Handler = handler; Text = text;
 }
示例#4
0
 public UIAlertButton(UIAlertButtonType type, ButtonClickDelegate handler)
 {
     Type = type; Handler = handler;
 }
示例#5
0
 public UIAlertButton(UIAlertButtonType type)
 {
     Type = type;
 }
示例#6
0
文件: UIAlert.cs 项目: Daribon/FreeSO
 public UIAlertButton(UIAlertButtonType type, ButtonClickDelegate handler, string text)
 {
     Type = type; Handler = handler; Text = text;
 }
示例#7
0
文件: UIAlert.cs 项目: Daribon/FreeSO
 public UIAlertButton(UIAlertButtonType type, ButtonClickDelegate handler)
 {
     Type = type; Handler = handler;
 }
示例#8
0
文件: UIAlert.cs 项目: Daribon/FreeSO
 public UIAlertButton(UIAlertButtonType type)
 {
     Type = type;
 }
示例#9
0
文件: UIAlert.cs 项目: Daribon/FreeSO
        /// <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;
        }