private void ProcessKey(KeyEventArgs e)
{
if (e.KeyCode == Keys.Up || e.KeyCode == Keys.Down)
{
if (e.KeyCode == Keys.Up)
{
_currentIndex--;
}
else if (e.KeyCode == Keys.Down)
{
_currentIndex++;
}
_currentIndex = _currentIndex < 0 ? 0 : _currentIndex;
_currentIndex = _currentIndex >= _values.Count ? _values.Count - 1 : _currentIndex;
edtValue.Text = _values[_currentIndex];
}
else if (e.KeyCode == Keys.Delete)
{
_currentIndex = -1;
edtValue.Text = "";
}
btnDrop.Invalidate();
Update();
}