protected override void HandleRotated(object sender, Sensors.Rotary.RotaryTurnedEventArgs e) { if (e.Direction == RotationDirection.Clockwise) { DoNext(); } else { DoPrevious(); } }
private void HandleRotated(object sender, Sensors.Rotary.RotaryTurnedEventArgs e) { if (e.Direction == RotationDirection.Clockwise) { _rotatedIndex++; } else { _rotatedIndex--; } _selectedIndex = _rotatedIndex % _choices.Length; if (_selectedIndex < 0) { _selectedIndex *= -1; } RewriteInputLine(OutputDisplay); }
protected abstract void HandleRotated(object sender, Sensors.Rotary.RotaryTurnedEventArgs e);