private void SetState(State state, int index)
{
if (this.state != state)
{
if (state == State.None)
{
index = -1;
}
this.SetHotItem(index);
if (state == State.HotTracking)
{
this.trackEscapePressed = false;
this.trackHotItem = index;
}
}
this.lastState = this.state;
this.state = state;
}