private void button1_Click(object sender, EventArgs e)
 {
     var book = Library.booksList.Find(x => x.Title == listBox1.Text);
     client.rentedBooks.Add(book);
     RentedBookPublisher rentedBook = new RentedBookPublisher();
     RentedBookSubscriber mySubscriber = new RentedBookSubscriber(rentedBook);
     rentedBook.RaiseEvent();
 }
Exemple #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            var book = Library.booksList.Find(x => x.Title == listBox1.Text);

            client.rentedBooks.Add(book);
            RentedBookPublisher  rentedBook   = new RentedBookPublisher();
            RentedBookSubscriber mySubscriber = new RentedBookSubscriber(rentedBook);

            rentedBook.RaiseEvent();
        }