コード例 #1
0
 public bool ISBNExist(string text)
 {
     foreach (IBook book in _libraryPresenter.GetBooks())
     {
         if (book.ISBN.Equals(text))
         {
             return(true);
         }
     }
     return(false);
 }
コード例 #2
0
 public void displayAllBooks(FlowLayoutPanel flowLayoutPanelAllBooks)
 {
     try
     {
         ClearLastResult(flowLayoutPanelAllBooks);
     }
     catch
     {
     }
     foreach (var item in _libraryPresenter.GetBooks())
     {
         BookUserControler bookcontroler = new BookUserControler(item, _libraryPresenter);
         flowLayoutPanelAllBooks.Controls.Add(bookcontroler);
     }
 }
コード例 #3
0
 public GeneralSearchHelper(ILibraryPresenter presenter)
 {
     this._libraryPresenter = presenter;
     allBooks = _libraryPresenter.GetBooks();
 }