} //END GetDefaultBookDetails public List <Object> QueryBookLibrary(Library.whichLibrary libraryToSearch, string bookKey) { Book foundBook = currLibrary.GetBookFromLib(libraryToSearch, bookKey); currBook = currLibrary.FetchBookAsList(foundBook); return(currBook); }//END List
}//END GetLibItemCount // Creates the display list based on the current view by collecting items from the appropriate library private static void CompileListForDisplay(Library.whichLibrary libraryToUse) { if (libraryToUse == Library.whichLibrary.Owned) { listForDisplay = currLibrary.GetLibrarySubset(Library.whichLibrary.Owned); } else if (libraryToUse == Library.whichLibrary.Wishlist) { listForDisplay = currLibrary.GetLibrarySubset(Library.whichLibrary.Wishlist); } else { Console.WriteLine("There was an error retrieving a specific library. An improper or empty library name was specified!"); } }//END CompileListForDisplay
}//END List // Gets the total number of books currently in a given library public int GetLibItemCount(Library.whichLibrary libToCount) { int bookTotal = 0; if (libToCount == Library.whichLibrary.Owned) { bookTotal = currLibrary.OwnedTotal(); } else if (libToCount == Library.whichLibrary.Wishlist) { bookTotal = currLibrary.WishlistTotal(); } else { Console.WriteLine("There was an error getting the total. An invalid library was specified!"); } return(bookTotal); }//END GetLibItemCount