private void StartFastScroll(int dir) { // Can be needed if we press both buttons at same time. CancelFastScroll(); fastScrollDir = dir; timerTask = new FastScrollTask(this); timer = new Timer(); timer.ScheduleAtFixedRate(timerTask, 500, 50); }
private void CancelFastScroll() { fastScrollDir = 0; if (timer != null) { timer.Cancel(); timer = null; } if (timerTask != null) { timerTask = null; } }