Ejemplo 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);
        }
Ejemplo 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);
        }
Ejemplo 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;
 }
Ejemplo 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;
 }