コード例 #1
0
        public CommandKeyBinding Find(EditorCustomInputEventArgs ea)
        {
            CommandKeyBinding keyInBindings = _CommandBindings.Find(ea);

            if (keyInBindings != null)
            {
                return(keyInBindings);
            }
            return(FindInFolders(ea));
        }
コード例 #2
0
 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);
 }
コード例 #3
0
        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
        }