Ejemplo n.º 1
0
 public BookLibrary(string filename)
 {
     books = new ArrayList();
     StreamReader file = new StreamReader(filename);
     string line = "";
     using (file)
     {
         while (true)
         {
             line = file.ReadLine();
             if (line == null)
             {
                 break;
             }
             Book newBook = new Book(line);
             books.Add(newBook);
         }
     }
 }
Ejemplo n.º 2
0
 public void SelectBook(Book sBook)
 {
     if (books.Contains(sBook) == true)
     {
         selectedBook = sBook;
         SelectedBookChanged(selectedBook);
     }
 }
Ejemplo n.º 3
0
 void library_SelectedBookChanged(Book selectedBook)
 {
     // code to change the selected book
     throw new NotImplementedException();
 }