//TocViewController
        public async Task OpenPublicationContentAtTOCNode(int bookID, TOCNode tocNode)
        {
            string htmlString = await PublicationContentUtil.Instance.GetContentFromTOC(bookID, tocNode, true);

            //string title = PublicationsDataManager.SharedInstance.CurrentPublication.Name;
            //await PdfUtil.SaveAsPdf (htmlString, title);
            NavigationMode nm;

            if (this.IsHighlighting)
            {
                nm = NavigationMode.NM_Search;
                this.IsHighlighting = false;
            }
            else
            {
                nm = NavigationMode.NM_Contents;
                TOCDataManager.ClearSearchResult();
            }

            PageViewController.AddLoadView();
            PageViewController.CurrentSearchHeader = TOCDataManager.CurrentSearchHeader;
            PageViewController.SearchPageNumber    = this.searchPageNumber;

            TOCDataManager.StartTocID = tocNode.ID;
            TOCDataManager.EndTocID   = tocNode.ID;

            PageViewController.ShowPageContent(htmlString, true, bookID, tocNode.ID.ToString(), tocNode.Title);

            GetFirstPageNumberAtTocID(tocNode.ID);

            AddNavigationPathAtBookIDandTocID(bookID, tocNode.ID, nm);
        }
        async partial void ContentButtonClick(NSObject sender)
        {
            currentViewMode        = ContentMode.CM_Contents;
            ContentButton.State    = NSCellStateValue.On;
            IndexButton.State      = NSCellStateValue.Off;
            AnnotationButton.State = NSCellStateValue.Off;

            await HidePreNextButton(false);

            PageViewController.SetPageContentEmpty(true);
            PageViewController.SetIndexBannerLetter(null, false);
            BookContentView.Hidden = false;

            if (TOCDataManager.CurrentLeafNode != null)
            {
                PageViewController.AddLoadView();
                if (!this.IsInitialize)
                {
                    this.IsEnableAddNavigation = true;
                }
                await OpenPublicationContentAtTOCNode(BookID, TOCDataManager.CurrentLeafNode);
            }

            SetSideBarViewShowByMode();

            SetButtonAttributedTitle(ContentButton, LNRConstants.TITLE_CONTENT, true);
            SetButtonAttributedTitle(IndexButton, LNRConstants.TITLE_INDEX, false);
            SetButtonAttributedTitle(AnnotationButton, LNRConstants.TITLE_ANNOTATIONS, false);
        }
 public void RefreshTOCViewData()
 {
     PageViewController.AddLoadView();
     TOCViewController.RefreshTableViewData();
 }