public void ScrollPanel(ScrollEventType type, ScrollOrientation orientation, int sign) { ScrollActions [ ((type.Hasflag(ScrollEventType.SmallDecrement)) ? 4 : 0) + ((orientation == ScrollOrientation.HorizontalScroll) ? 2 : 0) + ((sign == +1) ? 1 : 0)] (); }
/// <summary>TODO</summary> private void ScrollPanelCommon(ScrollEventType type, int sign, ScrollProperties scroll) { if (sign == 0) { return; } Func <Point, int, Point> func = (p, step) => new Point(-p.X, -p.Y + step * sign); AutoScrollPosition = func(AutoScrollPosition, type.Hasflag(ScrollEventType.LargeDecrement) ? scroll.LargeChange : scroll.SmallChange); }