public Double this[KeyboardPosition fromPos, KeyboardPosition toPos] { get { return transitionTimes[keyboard.PositionToPositionIndex(fromPos), keyboard.PositionToPositionIndex(toPos)]; } set { transitionTimes[keyboard.PositionToPositionIndex(fromPos), keyboard.PositionToPositionIndex(toPos)] = value; } }
public List <Navigation> Do(string input) { input = input.ToUpper(); var list = new List <Navigation>(); foreach (var character in input) { if (character == ' ') { list.Add(Navigation.Space); continue; } var absolutePositionOfCharacter = KeyboardPosition.FromIndex(character.GetKeyboardIndex(), _config.CharactersPerLine); var vector = absolutePositionOfCharacter - _current; _current = absolutePositionOfCharacter; list.AddRange(vector.GetPath()); } return(list); }
public TransitionInfo this[KeyboardPosition pos1, KeyboardPosition pos2] { get { return data[keyboard.PositionToPositionIndex(pos1), keyboard.PositionToPositionIndex(pos2)]; } }
public int PositionToPositionIndex(KeyboardPosition pos) { return positionToIndex[pos]; }