ICSharpCode.Core.MenuCommand.ParseShortcut C# (CSharp) Method

ParseShortcut() public static method

public static ParseShortcut ( string shortcutString ) : Keys
shortcutString string
return Keys
        public static Keys ParseShortcut(string shortcutString)
        {
            Keys shortCut = Keys.None;
            if (shortcutString.Length > 0) {
                try {
                    foreach (string key in shortcutString.Split('|')) {
                        shortCut  |= (System.Windows.Forms.Keys)Enum.Parse(typeof(System.Windows.Forms.Keys), key);
                    }
                } catch (Exception ex) {
                    MessageService.ShowError(ex);
                    return System.Windows.Forms.Keys.None;
                }
            }
            return shortCut;
        }