/// <summary> /// Returns a char for a given ASCII code /// </summary> /// <param name="pKeyStroke">The KeyStroke object to convert</param> /// <returns>char The character representation of the ASCII code</returns> public char GetCharForKeyStroke(KeyStroke pKeyStroke) { char character; if (_keyStrokeToChar.TryGetValue(pKeyStroke, out character)) return character; throw new ApplicationException(String.Format("{0}/{1} : does not have an associated char", pKeyStroke.KeyCode, pKeyStroke.Modifier)); }
/// <summary> /// Returns a char for a given ASCII code /// </summary> /// <param name="pKeyStroke">The KeyStroke object to convert</param> /// <returns>char The character representation of the ASCII code</returns> public char GetCharForKeyStroke(KeyStroke pKeyStroke) { char character; if (_keyStrokeToChar.TryGetValue(pKeyStroke, out character)) { return(character); } throw new ApplicationException(String.Format("{0}/{1} : does not have an associated char", pKeyStroke.KeyCode, pKeyStroke.Modifier)); }
/// <summary> /// Returns a KeyStrokeMapping object for a given ASCII code /// </summary> /// <param name="pKeyStroke">The KeyStroke object.</param> /// <returns>KeyStrokeMapping The KeyStrokeMapping object associated with the ASCII code.</returns> public KeyStrokeMapping GetMappingForKeyStroke(KeyStroke pKeyStroke) { KeyStrokeMapping map; if (_keyStrokeToMapping.TryGetValue(pKeyStroke, out map)) { return(map); } throw new ApplicationException(String.Format("{0}/{1} : does not have an associted KeyStrokeMapping object.", pKeyStroke.KeyCode, pKeyStroke.Modifier)); }
/// <summary> /// Returns a KeyStrokeMapping object for a given ASCII code /// </summary> /// <param name="pKeyStroke">The KeyStroke object.</param> /// <returns>KeyStrokeMapping The KeyStrokeMapping object associated with the ASCII code.</returns> public KeyStrokeMapping GetMappingForKeyStroke(KeyStroke pKeyStroke) { KeyStrokeMapping map; if (_keyStrokeToMapping.TryGetValue(pKeyStroke, out map)) return map; throw new ApplicationException(String.Format("{0}/{1} : does not have an associted KeyStrokeMapping object.", pKeyStroke.KeyCode, pKeyStroke.Modifier)); }