Exemplo n.º 1
0
        /// <summary>Switches the mouse over control to a different control</summary>
        /// <param name="newMouseOverControl">New control the mouse is hovering over</param>
        private void switchMouseOverControl(Control newMouseOverControl)
        {
            if (this.mouseOverControl != newMouseOverControl)
            {
                // Tell the previous mouse-over control that the mouse is no longer
                // hovering over it
                if (this.mouseOverControl != null)
                {
                    this.mouseOverControl.ProcessMouseLeave();
                }

                this.mouseOverControl = newMouseOverControl;

                // Inform the new mouse-over control that the mouse is now over it
                newMouseOverControl.OnMouseEntered();
            }
        }
Exemplo n.º 2
0
        /// <summary>Switches the mouse over control to a different control</summary>
        /// <param name="newMouseOverControl">New control the mouse is hovering over</param>
        private void switchMouseOverControl(Control newMouseOverControl)
        {
            if (this.mouseOverControl != newMouseOverControl)
            {
                // Tell the previous mouse-over control that the mouse is no longer
                // hovering over it);
                if (this.mouseOverControl != null)
                {
                    this.mouseOverControl.ProcessMouseLeave();
                }

                this.mouseOverControl = newMouseOverControl;
                //Console.WriteLine(string.Format("{1} mouseOverControl ={0}", newMouseOverControl.GetType().Name, GetHashCode()));
                // Inform the new mouse-over control that the mouse is now over it
                newMouseOverControl.OnMouseEntered();
            }
        }
Exemplo n.º 3
0
    /// <summary>Switches the mouse over control to a different control</summary>
    /// <param name="newMouseOverControl">New control the mouse is hovering over</param>
    private void switchMouseOverControl(Control newMouseOverControl) {
      if(this.mouseOverControl != newMouseOverControl) {

        // Tell the previous mouse-over control that the mouse is no longer
        // hovering over it
        if(this.mouseOverControl != null) {
          this.mouseOverControl.ProcessMouseLeave();
        }

        this.mouseOverControl = newMouseOverControl;

        // Inform the new mouse-over control that the mouse is now over it
        newMouseOverControl.OnMouseEntered();

      }
    }