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