partial void ContentButtonClick(NSObject sender) { ContentButton.State = NSCellStateValue.On; IndexButton.State = NSCellStateValue.Off; AnnotationButton.State = NSCellStateValue.Off; if (TOCDataManager == null) { TOCDataManager = new PublicationTOCDataManager(BookID, BookTitle, this); TOCViewController.BookID = BookID; TOCViewController.IsExpired = IsExpired; TOCViewController.CurrencyDate = CurrencyDate; TOCViewController.TOCDataManager = TOCDataManager; TOCViewController.InitializeTableView(); } PageViewController.SetIndexBannerLetter(null, false); if (TOCDataManager.CurrentLeafNode == null) { PageViewController.ShowPageContent(null, true); } else { OpenPublicationContentAtTOCNode(BookID, TOCDataManager.CurrentLeafNode); } SetSideBarViewShowByMode(); SetButtonAttributedTitle(ContentButton, LNRConstants.TITLE_CONTENT, true); SetButtonAttributedTitle(IndexButton, LNRConstants.TITLE_INDEX, false); SetButtonAttributedTitle(AnnotationButton, LNRConstants.TITLE_ANNOTATIONS, false); }
protected override void Dispose(bool disposing) { BookTitle = null; CurrencyDate = null; TOCDataManager = null; IdxDataManager = null; PageController = null; }
public async Task InitializeContentPage(int tocID) { this.IsInitialize = true; Publication BookInfo = PublicationsDataManager.SharedInstance.CurrentPublication; BookTitle = BookInfo.Name; bool isSameBook = BookID == BookInfo.BookId ? true : false; BookID = BookInfo.BookId; IsExpired = BookInfo.DaysRemaining < 0 ? true : false; if (BookInfo.CurrencyDate == null) { return; } this.isFullContentPage = false; this.IsHighlighting = false; this.searchPageNumber = null; PageNumber.StringValue = ""; //initalize content view PageViewController.InitalizeStatus(); if (tocID == -1) { if (TocListForBackForward != null) { TocListForBackForward.Clear(); } this.CurrentHistoryIndex = 0; this.IsEnableAddNavigation = false; NavigationManager.Instance.Clear(); EnablePreNextButton(); } string currencyDate = "Currency Date " + BookInfo.CurrencyDate.Value.ToString("dd MMM yyyy"); CurrencyDate = currencyDate; //initialize toc view TOCViewController.BookID = BookID; TOCViewController.IsExpired = IsExpired; TOCViewController.CurrencyDate = CurrencyDate; TOCViewController.InitializeTableView(isSameBook); if (TOCDataManager == null) { TOCDataManager = new PublicationTOCDataManager(BookID, BookTitle, this); } TOCDataManager.InitializeTOCDataByBookID(BookID, tocID); TOCViewController.TOCDataManager = TOCDataManager; await TOCDataManager.GetPublicationTocFromDB(); ContentButtonClick(ContentButton); //initialize index view if (IdxDataManager == null) { IdxDataManager = new IndexDataManager(BookID, BookTitle, this); IndexViewController.IndexDataManager = IdxDataManager; } IndexViewController.BookID = BookID; IdxDataManager.BookID = BookID; IdxDataManager.CurrentRow = 0; IdxDataManager.CurrentIndex = null; await IndexViewController.IndexDataManager.GetIndexDataFromDB(); IndexViewController.InitializeOutlineView(); this.IsInitialize = false; AnnotationsVC.ReloadAnnotationDataWithBookID(BookID); }