示例#1
0
 public virtual void OnSwitchUp()
 {
     if (UpCommand != null)
     {
         UpCommand.Execute();
     }
 }
示例#2
0
        public override bool OnMouseClick(Vector2 Position, MouseButton Button)
        {
            // prevent from clicking two overlapping items at a time
            if (GetTopMostItem() != this)
            {
                return(false);
            }

            Window[] group = Parent.Windows.GetGroup(Group);
            int      index = 0;

            for (; index < group.Length; index++)
            {
                if (group[index] == this)
                {
                    break;
                }
            }

            if (Button == MouseButton.Left && leftClickEvent != null)
            {
                leftClickEvent.Execute(index);
            }
            else if (Button == MouseButton.Right && rightClickEvent != null)
            {
                rightClickEvent.Execute(index);
            }
            return(base.OnMouseClick(Position, Button));
        }
示例#3
0
 public virtual void OnSwitchDown()
 {
     if (DownCommand != null)
     {
         DownCommand.Execute();
     }
 }
示例#4
0
        public virtual bool OnButtonClick()
        {
            if (Command != null)
            {
                Command.Execute();
                return(false);
            }

            return(false);
        }