/// <summary> /// <see cref="DynamicDocumentPaginator.GetPagePosition"/> /// </summary> internal ContentPosition GetPagePosition(DocumentPage page) { FixedDocumentSequenceDocumentPage docPage = page as FixedDocumentSequenceDocumentPage; if (docPage == null) { return(ContentPosition.Missing); } return(docPage.ContentPosition); }
// Callback from inner IDP.GetPageAsync private void _OnGetPageCompleted(object sender, GetPageCompletedEventArgs args) { DocumentsTrace.FixedDocumentSequence.IDF.Trace(string.Format("_OnGetPageCompleted")); // this job is complete GetPageAsyncRequest completedRequest = (GetPageAsyncRequest)args.UserState; _pendingPages.Remove(completedRequest.Page); // wrap the returned result into FixedDocumentSequenceDocumentPage DocumentPage sdp = DocumentPage.Missing; int pageNumber = completedRequest.Page.PageNumber; if (!args.Cancelled && (args.Error == null) && (args.DocumentPage != DocumentPage.Missing)) { sdp = new FixedDocumentSequenceDocumentPage(this, (DynamicDocumentPaginator)sender, args.DocumentPage); _SynthesizeGlobalPageNumber((DynamicDocumentPaginator)sender, args.PageNumber, out pageNumber); } if (!args.Cancelled) { // Notify all outstanding request for this particular page ArrayList notificationList = new ArrayList(); IEnumerator <KeyValuePair <Object, GetPageAsyncRequest> > ienum = _asyncOps.GetEnumerator(); try { while (ienum.MoveNext()) { GetPageAsyncRequest asyncRequest = ienum.Current.Value; // Process any outstanding request for this PageContent if (completedRequest.Page.Equals(asyncRequest.Page)) { notificationList.Add(ienum.Current.Key); // this could throw depending on event handlers that are added _NotifyGetPageAsyncCompleted(sdp, pageNumber, args.Error, asyncRequest.Cancelled, asyncRequest.UserState); } } } finally { // Remove completed requests from current async ops list foreach (Object userState in notificationList) { _asyncOps.Remove(userState); } } } }
private FixedDocumentPage GetFixedPanelDocumentPage(Point pt) { DocumentGrid mpScope = _scope as DocumentGrid; if (mpScope != null) { DocumentPage dp = mpScope.GetDocumentPageFromPoint(pt); FixedDocumentPage fdp = dp as FixedDocumentPage; if (fdp == null) { FixedDocumentSequenceDocumentPage fdsdp = dp as FixedDocumentSequenceDocumentPage; if (fdsdp != null) { fdp = fdsdp.ChildDocumentPage as FixedDocumentPage; } } return(fdp); } return(null); }
// Token: 0x06003516 RID: 13590 RVA: 0x000F0AD0 File Offset: 0x000EECD0 private FixedDocumentPage GetFixedPanelDocumentPage(Point pt) { DocumentGrid documentGrid = this._scope as DocumentGrid; if (documentGrid != null) { DocumentPage documentPageFromPoint = documentGrid.GetDocumentPageFromPoint(pt); FixedDocumentPage fixedDocumentPage = documentPageFromPoint as FixedDocumentPage; if (fixedDocumentPage == null) { FixedDocumentSequenceDocumentPage fixedDocumentSequenceDocumentPage = documentPageFromPoint as FixedDocumentSequenceDocumentPage; if (fixedDocumentSequenceDocumentPage != null) { fixedDocumentPage = (fixedDocumentSequenceDocumentPage.ChildDocumentPage as FixedDocumentPage); } } return(fixedDocumentPage); } return(null); }
// Token: 0x06002B93 RID: 11155 RVA: 0x000C6EF0 File Offset: 0x000C50F0 private void _OnGetPageCompleted(object sender, GetPageCompletedEventArgs args) { FixedDocumentSequence.GetPageAsyncRequest getPageAsyncRequest = (FixedDocumentSequence.GetPageAsyncRequest)args.UserState; this._pendingPages.Remove(getPageAsyncRequest.Page); DocumentPage page = DocumentPage.Missing; int pageNumber = getPageAsyncRequest.Page.PageNumber; if (!args.Cancelled && args.Error == null && args.DocumentPage != DocumentPage.Missing) { page = new FixedDocumentSequenceDocumentPage(this, (DynamicDocumentPaginator)sender, args.DocumentPage); this._SynthesizeGlobalPageNumber((DynamicDocumentPaginator)sender, args.PageNumber, out pageNumber); } if (!args.Cancelled) { ArrayList arrayList = new ArrayList(); IEnumerator <KeyValuePair <object, FixedDocumentSequence.GetPageAsyncRequest> > enumerator = this._asyncOps.GetEnumerator(); try { while (enumerator.MoveNext()) { KeyValuePair <object, FixedDocumentSequence.GetPageAsyncRequest> keyValuePair = enumerator.Current; FixedDocumentSequence.GetPageAsyncRequest value = keyValuePair.Value; if (getPageAsyncRequest.Page.Equals(value.Page)) { ArrayList arrayList2 = arrayList; keyValuePair = enumerator.Current; arrayList2.Add(keyValuePair.Key); this._NotifyGetPageAsyncCompleted(page, pageNumber, args.Error, value.Cancelled, value.UserState); } } } finally { foreach (object key in arrayList) { this._asyncOps.Remove(key); } } } }
// Callback from inner IDP.GetPageAsync private void _OnGetPageCompleted(object sender, GetPageCompletedEventArgs args) { DocumentsTrace.FixedDocumentSequence.IDF.Trace(string.Format("_OnGetPageCompleted")); // this job is complete GetPageAsyncRequest completedRequest = (GetPageAsyncRequest)args.UserState; _pendingPages.Remove(completedRequest.Page); // wrap the returned result into FixedDocumentSequenceDocumentPage DocumentPage sdp = DocumentPage.Missing; int pageNumber = completedRequest.Page.PageNumber; if (!args.Cancelled && (args.Error == null) && (args.DocumentPage != DocumentPage.Missing)) { sdp = new FixedDocumentSequenceDocumentPage(this, (DynamicDocumentPaginator)sender, args.DocumentPage); _SynthesizeGlobalPageNumber((DynamicDocumentPaginator)sender, args.PageNumber, out pageNumber); } if (!args.Cancelled) { // Notify all outstanding request for this particular page ArrayList notificationList = new ArrayList(); IEnumerator<KeyValuePair<Object, GetPageAsyncRequest>> ienum = _asyncOps.GetEnumerator(); try { while (ienum.MoveNext()) { GetPageAsyncRequest asyncRequest = ienum.Current.Value; // Process any outstanding request for this PageContent if (completedRequest.Page.Equals(asyncRequest.Page)) { notificationList.Add(ienum.Current.Key); // this could throw depending on event handlers that are added _NotifyGetPageAsyncCompleted(sdp, pageNumber, args.Error, asyncRequest.Cancelled, asyncRequest.UserState); } } } finally { // Remove completed requests from current async ops list foreach (Object userState in notificationList) { _asyncOps.Remove(userState); } } } }
//------------------------------------------------------ // // Constructors // //------------------------------------------------------ #region Constructors /// <summary> /// Constructor. /// </summary> internal DocumentSequenceTextView(FixedDocumentSequenceDocumentPage docPage) { _docPage = docPage; }
// Token: 0x06002C20 RID: 11296 RVA: 0x000C86DE File Offset: 0x000C68DE internal DocumentSequenceTextView(FixedDocumentSequenceDocumentPage docPage) { this._docPage = docPage; }