public void UpdateBookInfo() { if (bookInfoView != null) { String numNotes = BooksOnDeviceAccessor.GetNumNotesInBook(book.ID); String numBookmarks = BooksOnDeviceAccessor.GetNumBookmarksInBook(book.ID); String numAnnotations = BooksOnDeviceAccessor.GetNumAnnotationsInBook(book.ID); bookInfoView.NumNoteLabel.Text = numNotes; bookInfoView.NumBookmarkLabel.Text = numBookmarks; bookInfoView.NumAnnLabel.Text = numAnnotations; if (InfoUpdatedEvent != null) { InfoUpdatedEvent(); } } }
private void UpdateBookInfo() { String numNotes = "0"; String numBookmarks = "0"; String numAnnotations = "0"; bookInfoView = new BookInfoView(numNotes, numBookmarks, numAnnotations, BookshelfBook.PageCount.ToString(), false, false, this.Frame.Width - 30); bookInfoView.Frame = new CGRect(10, this.Frame.Bottom - 44, bookInfoView.Frame.Width, bookInfoView.Frame.Height); bookInfoView.Alpha = 0f; this.AddSubview(bookInfoView); numNotes = BooksOnDeviceAccessor.GetNumNotesInBook(BookshelfBook.ID); numBookmarks = BooksOnDeviceAccessor.GetNumBookmarksInBook(BookshelfBook.ID); numAnnotations = BooksOnDeviceAccessor.GetNumAnnotationsInBook(BookshelfBook.ID); bookInfoView.NumNoteLabel.Text = numNotes; bookInfoView.NumBookmarkLabel.Text = numBookmarks; bookInfoView.NumAnnLabel.Text = numAnnotations; }