public CommandKeyBinding Find(EditorCustomInputEventArgs ea) { CommandKeyBinding keyInBindings = _CommandBindings.Find(ea); if (keyInBindings != null) { return(keyInBindings); } return(FindInFolders(ea)); }
private CommandKeyBinding FindInFolders(EditorCustomInputEventArgs ea) { if (_Folders == null) { return(null); } for (int i = 0; i < _Folders.Count; i++) { CommandKeyFolder folder = _Folders[i] as CommandKeyFolder; CommandKeyBinding lBinding = folder.Find(ea); if (lBinding != null) { return(lBinding); } } return(null); }
public CommandKeyBinding Find(EditorCustomInputEventArgs ea) { MatchQuality matchQuality; foreach (CommandKeyBinding commandKeyBinding in this) { if (!commandKeyBinding.Enabled) { continue; } matchQuality = commandKeyBinding.Matches(ea.CustomData); if (matchQuality == MatchQuality.FullMatch) // Found it { // TODO: Check to see if the command itself is enabled here. If not, continue to look. return(commandKeyBinding); } } return(null); // Not found }