Beispiel #1
0
        private void UpScrollWheel(object sender, RoutedEventArgs e)
        {
            MouseWheelEventArgs m = (MouseWheelEventArgs)e;
            double offset         = m.Delta * 2 / 3;
            double value          = UpScroll.VerticalOffset;

            if (UPNoteCount > 0)
            {
                --UPNoteCount;
                return;
            }
            UPNoteCount = 8;
            if ((UpScroll.VerticalOffset <= UpScroll.ScrollableHeight * 0.1) && (offset > 0))
            {
                NoteList.Reserve(ref CurrentTrack.GetNoteListRef(Direction.UP));
                return;
            }
            UpScroll.ScrollToVerticalOffset(value - offset);
        }
Beispiel #2
0
        private void DownScrollWheel(object sender, RoutedEventArgs e)
        {
            MouseWheelEventArgs m = (MouseWheelEventArgs)e;
            double offset         = m.Delta * 2 / 3;
            double value          = DownScroll.VerticalOffset;

            if (DownNoteCount > 0)
            {
                --DownNoteCount;
                return;
            }
            DownNoteCount = 8;
            if ((DownScroll.VerticalOffset >= DownScroll.ScrollableHeight * 0.9) && (offset < 0))
            {
                NoteList.Reserve(ref CurrentTrack.GetNoteListRef(Direction.DOWN));
                //increse notelist
                return;
            }

            DownScroll.ScrollToVerticalOffset(value - offset);
        }