Esempio n. 1
0
 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);
     }
 }
Esempio n. 2
0
 private void bookBuilder(string listTitle, string listAuthor, string listGenre)
 {
     Book book = new Book(listTitle, listAuthor, listGenre);
     addNewBook(book);
 }
Esempio n. 3
0
 private void addNewBook(Book book)
 {
     bookList.Add(book);
     clearBoxes();
     titleBox.Focus();
 }