Пример #1
0
 //Pre: The autcomplete collection to be modified, and whether the collection is to be added to or removed from.
 //Post: The fields are added/removed from the collection
 //Description: Based on whether the autocomplete is added to or removed from, modifies the collection with the expense categorizations.
 public void autoCompleteItems(AutoCompleteStringCollection col, bool add)
 {
     //Executes if the fields are to be added to the collection.
     if (add)
     {
         foreach (string category in expenseCategories)
         {
             col.Add(category);
         }
     }
     else
     {
         foreach (string category in expenseCategories)
         {
             col.Remove(category);
         }
     }
 }