private void displayQueryResult(string species) { // Trim 's' from the string string key = species.TrimEnd(TRIM_CHAR); // Populate list of selected animals List <Animal> animalsQuery = db.Search(key); // Determines how many animals in selection if (animalsQuery.Count > ANIMAL_LIMIT) { // Display listbox displayAnimals = new DisplayText(lbPets); } else { // Display pictureboxes displayAnimals = new DisplayPicture(pbPets); } // Display displayAnimals.display(animalsQuery); }
private void displayQueryResult(string species) { // Trim 's' from the string string key = species.TrimEnd(TRIM_CHAR); // Populate list of selected animals List<Animal> animalsQuery = db.Search(key); // Determines how many animals in selection if (animalsQuery.Count > ANIMAL_LIMIT) { // Display listbox displayAnimals = new DisplayText(lbPets); } else { // Display pictureboxes displayAnimals = new DisplayPicture(pbPets); } // Display displayAnimals.display(animalsQuery); }