Beispiel #1
0
 bool DoShortcutEntriesConflict(ShortcutEntry shortcutEntry1, ShortcutEntry shortcutEntry2, IContextManager contextManager)
 {
     return(contextManager.DoContextsConflict(shortcutEntry1.context, shortcutEntry2.context) &&
            string.Equals(shortcutEntry1.tag, shortcutEntry2.tag) &&
            (shortcutEntry1.StartsWith(shortcutEntry2.combinations) ||
             shortcutEntry2.StartsWith(shortcutEntry1.combinations)));
 }
Beispiel #2
0
        bool BelongsToSearch(ShortcutEntry entry)
        {
            if (!IsSearching())
            {
                return(true);
            }

            switch (searchMode)
            {
            case SearchOption.Name:
                return(entry.displayName.IndexOf(m_SerializedState.search, StringComparison.InvariantCultureIgnoreCase) >= 0);

            case SearchOption.Binding:
                return(entry.StartsWith(m_SerializedState.bindingsSearch));
            }

            return(false);
        }
Beispiel #3
0
 static bool ShortcutStartsWithCombinationSequenceAndSatisfiesPredicate(ShortcutEntry entry)
 {
     return(entry.StartsWith(m_CombinationSequence) && (m_Predicate == null || m_Predicate(entry)));
 }