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); }
protected virtual void _Scrolling(Event.ScrollEventArgs e) { EventHandler <Event.ScrollEventArgs> handler = OnScrolling; if (handler != null) { handler(this, e); } }