private void addBook_Click(object sender, EventArgs e) { if (genreBox.Text == "") { Book book = new Book(titleBox.Text, authorBox.Text); addNewBook(book); } else { Book book = new Book(titleBox.Text, authorBox.Text, genreBox.Text); addNewBook(book); } }
private void bookBuilder(string listTitle, string listAuthor, string listGenre) { Book book = new Book(listTitle, listAuthor, listGenre); addNewBook(book); }
private void addNewBook(Book book) { bookList.Add(book); clearBoxes(); titleBox.Focus(); }