コード例 #1
0
        public override bool MouseWheelMove(MouseInputEventArgs e)
        {
            var modArgs = new MouseInputEventArgs
                              (e.Buttons,
                              e.ShiftButtons,
                              new Vector2D(e.Position.X - Position.X + scrollbarH.Value, e.Position.Y - Position.Y + scrollbarV.Value),
                              e.WheelPosition,
                              e.RelativePosition,
                              e.WheelDelta,
                              e.ClickCount);

            if (inner_focus != null)
            {
                if (inner_focus.MouseWheelMove(modArgs))
                {
                    return(true);
                }
                else if (scrollbarV.IsVisible() && ClientArea.Contains(new Point((int)e.Position.X, (int)e.Position.Y)))
                {
                    scrollbarV.MouseWheelMove(e);
                    return(true);
                }
            }
            else if (scrollbarV.IsVisible() && ClientArea.Contains(new Point((int)e.Position.X, (int)e.Position.Y)))
            {
                scrollbarV.MouseWheelMove(e);
                return(true);
            }
            return(false);
        }
コード例 #2
0
 public override bool MouseWheelMove(MouseWheelEventArgs e)
 {
     if (inner_focus != null)
     {
         if (inner_focus.MouseWheelMove(e))
         {
             return(true);
         }
         else if (scrollbarV.IsVisible() && ClientArea.Contains(e.X, e.Y))
         {
             scrollbarV.MouseWheelMove(e);
             return(true);
         }
     }
     else if (scrollbarV.IsVisible() && ClientArea.Contains(e.X, e.Y))
     {
         scrollbarV.MouseWheelMove(e);
         return(true);
     }
     return(false);
 }