Exemplo n.º 1
0
        private void Table_MouseWheel(object sender, MouseEventArgs e)
        {
            oldCurY = oldCurY + (e.Delta > 0 ? 3 : -3);

            if (oldCurY < -GetLinesCount())
            {
                oldCurY = -GetLinesCount();
            }

            if (oldCurY > 0)
            {
                oldCurY = 0;
            }


            Event.ScrollEventArgs evt = new Event.ScrollEventArgs(
                oldCurY,
                GetLinesCountHeight(),
                bag);

            curY = -evt.Position;
            grip = GetLinesCountHeight() / 4f;
            if (grip < 20)
            {
                grip = 20;
            }

            _Scrolling(evt);
        }
Exemplo n.º 2
0
        protected virtual void _Scrolling(Event.ScrollEventArgs e)
        {
            EventHandler <Event.ScrollEventArgs> handler = OnScrolling;

            if (handler != null)
            {
                handler(this, e);
            }
        }