public KeypressTimer(TransitionTimeBuilder times) { this.times = times; Interval = 10; Enabled = true; }
static TransitionTimeBuilder GetTransitionTimeBuilderFromBlockTable(double[,] table) { var keyboard = Keyboard.StandardKeyboard; var result = new TransitionTimeBuilder(keyboard); for (var fromChar = 0; fromChar < keyboard.PositionCount; fromChar++) { for (var toChar = 0; toChar < keyboard.PositionCount; toChar++) { var iMod = fromChar % 5; var jMod = toChar % 5; result.data[fromChar, toChar] = new TransitionInfo(); var fromBlock = fromChar / 5; var toBlock = toChar / 5; var addDifference = iMod * 5 + jMod; result.data[fromChar, toChar].Mean = table[fromBlock, toBlock] + addDifference; result.data[fromChar, toChar].Count = 1; } } return result; }
public void AddNamedTransitions(string name, TransitionTimeBuilder times) { transitionTimess.Add(Tuple.Create(times,name)); }