private void RelayoutContentPageView(bool isFull) { if (!isFull) { CGSize newSize = BackgroudView.Frame.Size; newSize.Width -= sidebarViewWidth; newSize.Height -= FunctionButtonView.Frame.Size.Height; nfloat xstart = sidebarViewWidth; // if (newSize.Width > CONTENTPAGE_WIDTH) { // xstart += (newSize.Width - CONTENTPAGE_WIDTH) / 2; // newSize.Width = CONTENTPAGE_WIDTH; // } BookContentView.SetFrameSize(newSize); BookContentView.SetFrameOrigin(new CGPoint(xstart, 0)); } else { CGSize newSize = BackgroudView.Frame.Size; newSize.Height -= FunctionButtonView.Frame.Size.Height; nfloat xstart = 0; // if (newSize.Width > CONTENTPAGE_WIDTH) { // xstart = (newSize.Width-CONTENTPAGE_WIDTH)/2; // newSize.Width = CONTENTPAGE_WIDTH; // } BookContentView.SetFrameSize(newSize); BookContentView.SetFrameOrigin(new CGPoint(xstart, 0)); } }
public static BookContentModel Map(this BookContentView source) => new BookContentModel { Id = source.Id, BookId = source.BookId, Language = source.Language, MimeType = source.MimeType };
void RelayoutAnnotaionView(bool isShow) { if (isShow) { CGSize viewSize = AnnotationView.Frame.Size; CGSize newSize = BookContentView.Frame.Size; newSize.Width -= viewSize.Width; BookContentView.SetFrameSize(newSize); BookContentView.SetFrameOrigin(new CGPoint(viewSize.Width, 0)); } else { CGSize newSize = BackgroudView.Frame.Size; newSize.Height -= FunctionButtonView.Frame.Size.Height; BookContentView.SetFrameSize(newSize); BookContentView.SetFrameOrigin(new CGPoint(0, 0)); } }
void RelayoutIndexCustomView(bool isShow) { if (isShow) { CGSize indexViewSize = IndexCustomView.Frame.Size; CGSize newSize = BackgroudView.Frame.Size; newSize.Width -= indexViewSize.Width; newSize.Height -= FunctionButtonView.Frame.Size.Height; nfloat xstart = indexViewSize.Width; if (newSize.Width > CONTENTPAGE_WIDTH) { xstart += (newSize.Width - CONTENTPAGE_WIDTH) / 2; newSize.Width = CONTENTPAGE_WIDTH; } BookContentView.SetFrameSize(newSize); BookContentView.SetFrameOrigin(new CGPoint(xstart, 0)); } else { CGSize newSize = BackgroudView.Frame.Size; newSize.Height -= FunctionButtonView.Frame.Size.Height; nfloat xstart = 0; if (newSize.Width > CONTENTPAGE_WIDTH) { xstart = (newSize.Width - CONTENTPAGE_WIDTH) / 2; newSize.Width = CONTENTPAGE_WIDTH; } BookContentView.SetFrameSize(newSize); BookContentView.SetFrameOrigin(new CGPoint(xstart, 0)); } }
void ReleaseDesignerOutlets() { if (AnnotationButton != null) { AnnotationButton.Dispose(); AnnotationButton = null; } if (AnnotationView != null) { AnnotationView.Dispose(); AnnotationView = null; } if (BackgroudView != null) { BackgroudView.Dispose(); BackgroudView = null; } if (BookContentView != null) { BookContentView.Dispose(); BookContentView = null; } if (ContentButton != null) { ContentButton.Dispose(); ContentButton = null; } if (FunctionButtonView != null) { FunctionButtonView.Dispose(); FunctionButtonView = null; } if (GotoButton != null) { GotoButton.Dispose(); GotoButton = null; } if (IndexButton != null) { IndexButton.Dispose(); IndexButton = null; } if (IndexCustomView != null) { IndexCustomView.Dispose(); IndexCustomView = null; } if (IndexViewController != null) { IndexViewController.Dispose(); IndexViewController = null; } if (LeftButton != null) { LeftButton.Dispose(); LeftButton = null; } if (PageNumber != null) { PageNumber.Dispose(); PageNumber = null; } if (PageViewController != null) { PageViewController.Dispose(); PageViewController = null; } if (RightButton != null) { RightButton.Dispose(); RightButton = null; } if (TocCustomView != null) { TocCustomView.Dispose(); TocCustomView = null; } if (TOCViewController != null) { TOCViewController.Dispose(); TOCViewController = null; } if (AnnotationsVC != null) { AnnotationsVC.Dispose(); AnnotationsVC = null; } }
public BookContentAssert(HttpResponseMessage response, int libraryId) { _response = response; _libraryId = libraryId; _bookContent = response.GetContent <BookContentView>().Result; }
void ReleaseDesignerOutlets() { if (AnnotationButton != null) { AnnotationButton.Dispose(); AnnotationButton = null; } if (AnnotationView != null) { AnnotationView.Dispose(); AnnotationView = null; } if (BackgroudView != null) { BackgroudView.Dispose(); BackgroudView = null; } if (BookContentView != null) { BookContentView.Dispose(); BookContentView = null; } if (ContentButton != null) { ContentButton.Dispose(); ContentButton = null; } if (FunctionButtonView != null) { FunctionButtonView.Dispose(); FunctionButtonView = null; } if (HistoryButton != null) { HistoryButton.Dispose(); HistoryButton = null; } if (IndexButton != null) { IndexButton.Dispose(); IndexButton = null; } if (IndexCustomView != null) { IndexCustomView.Dispose(); IndexCustomView = null; } if (IndexViewController != null) { IndexViewController.Dispose(); IndexViewController = null; } if (InfoButton != null) { InfoButton.Dispose(); InfoButton = null; } if (LeftButton != null) { LeftButton.Dispose(); LeftButton = null; } if (PageNumber != null) { PageNumber.Dispose(); PageNumber = null; } if (PageViewController != null) { PageViewController.Dispose(); PageViewController = null; } if (RightButton != null) { RightButton.Dispose(); RightButton = null; } if (SearchField != null) { SearchField.Dispose(); SearchField = null; } if (SegmentContol != null) { SegmentContol.Dispose(); SegmentContol = null; } if (ShareButton != null) { ShareButton.Dispose(); ShareButton = null; } if (SplitSwithButton != null) { SplitSwithButton.Dispose(); SplitSwithButton = null; } if (TitleTField != null) { TitleTField.Dispose(); TitleTField = null; } if (TocCustomView != null) { TocCustomView.Dispose(); TocCustomView = null; } if (TOCViewController != null) { TOCViewController.Dispose(); TOCViewController = null; } if (GotoButton != null) { GotoButton.Dispose(); GotoButton = null; } }