private void HyperlinkPreview_ToolTipClosing(object sender, ToolTipEventArgs e) { library_index_hover_popup?.Dispose(); library_index_hover_popup = null; ButtonOpen.ToolTip = ""; }
protected virtual void Dispose(bool disposing) { Logging.Debug("PDFAnnotationNodeContentControl::Dispose({0}) @{1}", disposing, dispose_count); WPFDoEvents.InvokeInUIThread(() => { WPFDoEvents.SafeExec(() => { if (dispose_count == 0) { library_index_hover_popup?.Dispose(); ToolTipClosing -= PDFDocumentNodeContentControl_ToolTipClosing; ToolTipOpening -= PDFDocumentNodeContentControl_ToolTipOpening; } }); WPFDoEvents.SafeExec(() => { // Clear the references for sanity's sake pdf_annotation_node_content = null; library_index_hover_popup = null; }); ++dispose_count; }); }
private void PDFDocumentNodeContentControl_ToolTipClosing(object sender, ToolTipEventArgs e) { ToolTip = ""; library_index_hover_popup?.Dispose(); library_index_hover_popup = null; }
protected virtual void Dispose(bool disposing) { Logging.Debug("PDFDocumentNodeContentControl::Dispose({0}) @{1}", disposing, dispose_count); WPFDoEvents.SafeExec(() => { if (dispose_count == 0) { library_index_hover_popup?.Dispose(); } library_index_hover_popup = null; }); WPFDoEvents.SafeExec(() => { ToolTip = ""; }); WPFDoEvents.SafeExec(() => { node_control = null; pdf_document_node_content = null; }); WPFDoEvents.SafeExec(() => { DataContextChanged -= PDFDocumentNodeContentControl_DataContextChanged; DataContext = null; }); ++dispose_count; }
protected virtual void Dispose(bool disposing) { Logging.Debug("PDFAnnotationNodeContentControl::Dispose({0}) @{1}", disposing, dispose_count); try { if (dispose_count == 0) { library_index_hover_popup?.Dispose(); ToolTipClosing -= PDFDocumentNodeContentControl_ToolTipClosing; ToolTipOpening -= PDFDocumentNodeContentControl_ToolTipOpening; } // Clear the references for sanity's sake pdf_annotation_node_content = null; library_index_hover_popup = null; } catch (Exception ex) { Logging.Error(ex); } ++dispose_count; }
protected virtual void Dispose(bool disposing) { Logging.Debug("PDFDocumentNodeContentControl::Dispose({0}) @{1}", disposing, dispose_count); try { // Get rid of managed resources if (dispose_count == 0) { library_index_hover_popup?.Dispose(); } library_index_hover_popup = null; ToolTip = ""; node_control = null; pdf_document_node_content = null; DataContextChanged -= PDFDocumentNodeContentControl_DataContextChanged; DataContext = null; } catch (Exception ex) { Logging.Error(ex); } ++dispose_count; }
protected virtual void Dispose(bool disposing) { Logging.Debug("LibraryCatalogOverviewControl::Dispose({0}) @{1}", disposing, dispose_count); WPFDoEvents.InvokeInUIThread(() => { WPFDoEvents.SafeExec(() => { if (dispose_count == 0) { // Get rid of managed resources / get rid of cyclic references: library_index_hover_popup?.Dispose(); } }); WPFDoEvents.SafeExec(() => { WPFDoEvents.AssertThisCodeIsRunningInTheUIThread(); if (dispose_count == 0) { WizardDPs.ClearPointOfInterest(PanelSearchScore); } }); WPFDoEvents.SafeExec(() => { if (dispose_count == 0) { WizardDPs.ClearPointOfInterest(ObjLookInsidePanel); } }); WPFDoEvents.SafeExec(() => { TextTitle.MouseLeftButtonUp -= TextTitle_MouseLeftButtonUp; ButtonOpen.ToolTipOpening -= HyperlinkPreview_ToolTipOpening; ButtonOpen.ToolTipClosing -= HyperlinkPreview_ToolTipClosing; ListSearchDetails.SearchClicked -= ListSearchDetails_SearchSelectionChanged; DataContextChanged -= LibraryCatalogOverviewControl_DataContextChanged; }); WPFDoEvents.SafeExec(() => { DataContext = null; }); WPFDoEvents.SafeExec(() => { // Clear the references for sanity's sake library_index_hover_popup = null; drag_drop_helper = null; }); ++dispose_count; }); }
void PDFDocumentNodeContentControl_ToolTipClosing(object sender, ToolTipEventArgs e) { if (null != library_index_hover_popup) { this.ToolTip = ""; library_index_hover_popup.Dispose(); library_index_hover_popup = null; } }
void HyperlinkPreview_ToolTipClosing(object sender, ToolTipEventArgs e) { if (null != library_index_hover_popup) { ButtonOpen.ToolTip = ""; library_index_hover_popup.Dispose(); library_index_hover_popup = null; } }
private void PDFDocumentNodeContentControl_ToolTipOpening(object sender, ToolTipEventArgs e) { try { if (null == library_index_hover_popup) { library_index_hover_popup = new LibraryIndexHoverPopup(); library_index_hover_popup.SetPopupContent(pdf_document_node_content.PDFDocument, 1); ToolTip = library_index_hover_popup; } } catch (Exception ex) { Logging.Error(ex, "Exception while displaying document preview popup"); } }
private void HyperlinkPreview_ToolTipOpening(object sender, ToolTipEventArgs e) { FeatureTrackingManager.Instance.UseFeature(Features.Library_PreviewPDF); try { if (null == library_index_hover_popup) { library_index_hover_popup = new LibraryIndexHoverPopup(); library_index_hover_popup.SetPopupContent(PDFDocumentBindable.Underlying, 1); ButtonOpen.ToolTip = library_index_hover_popup; } } catch (Exception ex) { Logging.Error(ex, "Exception while displaying document preview popup"); } }
private void PDFDocumentNodeContentControl_ToolTipOpening(object sender, ToolTipEventArgs e) { try { if (null == library_index_hover_popup) { library_index_hover_popup = new LibraryIndexHoverPopup(); PDFDocument out_pdf_document; PDFAnnotation out_pdf_annotation; if (WebLibraryDocumentLocator.LocateFirstPDFDocumentWithAnnotation(pdf_annotation_node_content.library_fingerprint, pdf_annotation_node_content.pdf_document_fingerprint, pdf_annotation_node_content.pdf_annotation_guid, out out_pdf_document, out out_pdf_annotation)) { library_index_hover_popup.SetPopupContent(out_pdf_document, out_pdf_annotation.Page, out_pdf_annotation); ToolTip = library_index_hover_popup; } } } catch (Exception ex) { Logging.Error(ex, "Exception while displaying document preview popup"); } }