예제 #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;
        }