public static string KeyboardHookModeToString(KeyboardHookMode mode) { switch (mode) { case KeyboardHookMode.Client: return("On the local computer"); case KeyboardHookMode.Remote: return("On the remote computer"); case KeyboardHookMode.FullScreenClient: return("In full screen mode only"); default: throw new Exception("Unexpected KeyboardHookMode:" + mode.ToString()); } }
/// <summary> /// Method to translate <see cref="KeyboardHookMode"/>. /// </summary> /// <param name="keyboardHookMode"><see cref="KeyboardHookMode"/>.</param> /// <returns>Translated <see cref="KeyboardHookMode"/>.</returns> public string Translate(KeyboardHookMode keyboardHookMode) { return(Translate(keyboardHookMode.ToString())); }