Esempio n. 1
0
        protected virtual AutoCompleteEntryCollection FilterList(AutoCompleteEntryCollection list)
        {
            AutoCompleteEntryCollection newList = new AutoCompleteEntryCollection();

            try
            {
                foreach (IAutoCompleteEntry entry in list)
                {
                    foreach (string match in entry.MatchStrings)
                    {
                        //TODO consider using a hash value rather than a string comparison to compare matches
                        if (match.ToUpper().Contains(Text.ToUpper()))
                        {
                            newList.Add(entry);
                            break;
                        }
                    }
                }
            }
            catch (Exception e)
            {
                MessageBox.Show(e.ToString());
            }
            return(newList);
        }
Esempio n. 2
0
        protected virtual AutoCompleteEntryCollection FilterList(AutoCompleteEntryCollection list)
        {
            AutoCompleteEntryCollection newList = new AutoCompleteEntryCollection();

            foreach (IAutoCompleteEntry entry in list)
            {
                foreach (string match in entry.MatchStrings)
                {
                    if (match.ToUpper().Contains(Text.ToUpper()))
                    {
                        newList.Add(entry);
                        break;
                    }
                }
            }
            return(newList);
        }
Esempio n. 3
0
 protected virtual AutoCompleteEntryCollection FilterList(AutoCompleteEntryCollection list)
 {
     AutoCompleteEntryCollection newList = new AutoCompleteEntryCollection();
     foreach (IAutoCompleteEntry entry in list) {
         foreach (string match in entry.MatchStrings) {
             if (match.ToUpper().Contains(Text.ToUpper())) {
                 newList.Add(entry);
                 break;
             }
         }
     }
     return newList;
 }
Esempio n. 4
0
 protected virtual AutoCompleteEntryCollection FilterList(AutoCompleteEntryCollection list)
 {
     AutoCompleteEntryCollection newList = new AutoCompleteEntryCollection();
     try
     {
         foreach (IAutoCompleteEntry entry in list)
         {
             foreach (string match in entry.MatchStrings)
             {
                 //TODO consider using a hash value rather than a string comparison to compare matches
                 if (match.ToUpper().Contains(Text.ToUpper()))
                 {
                     newList.Add(entry);
                     break;
                 }
             }
         }
     }
     catch (Exception e)
     {
         MessageBox.Show(e.ToString());
     }
     return newList;
 }