예제 #1
0
 protected virtual void OnButtonEvent(UIObject currentObject, UIObjectButtonEventArgs args)
 {
     if (this._ButtonEvent != null)
     {
         this._ButtonEvent(this, new UIButtonCollectionEventArgs(currentObject as UIButton, args.EventType, args.HoldTime, this.IndexOf(currentObject as UIButton)));
     }
 }
예제 #2
0
        protected virtual void OnButtonEvent(UIObject currentObject, UIObjectButtonEventArgs args)
        {
            UIButton button = currentObject as UIButton;

            if (args.EventType == UIButtonEventType.Released)
            {
                if (button == this.EnterButton)
                {
                    this.HasFocus = false;
                    OnTextFieldEvent(UITextFieldEventType.Entered);
                }
                else if (button == this.EscButton)
                {
                    this.HasFocus = false;
                    this.Text     = InitialText;
                    OnTextFieldEvent(UITextFieldEventType.Escaped);
                }
                else if (button == this.ClearButton)
                {
                    this.Text = "";
                    OnTextFieldEvent(UITextFieldEventType.ClearedByUser);
                }
            }
        }