private static void PDFDocumentNodeContentControl_ToolTipClosing(object sender, ToolTipEventArgs e) { TextBlock text_block = (TextBlock)sender; DocumentTextBlockTag tag = (DocumentTextBlockTag)text_block.Tag; tag.library_index_hover_popup?.Dispose(); tag.library_index_hover_popup = null; text_block.ToolTip = ""; }
static void text_doc_MouseRightButtonUp(object sender, MouseButtonEventArgs e) { TextBlock text_block = (TextBlock)sender; DocumentTextBlockTag tag = (DocumentTextBlockTag)text_block.Tag; LibraryCatalogPopup popup = new LibraryCatalogPopup(new List <PDFDocument> { tag.pdf_document }); popup.Open(); e.Handled = true; }
static void text_doc_MouseDown(object sender, MouseButtonEventArgs e) { TextBlock text_block = (TextBlock)sender; DocumentTextBlockTag tag = (DocumentTextBlockTag)text_block.Tag; if (null != tag.feature) { FeatureTrackingManager.Instance.UseFeature(tag.feature); } MainWindowServiceDispatcher.Instance.OpenDocument(tag.pdf_document); e.Handled = true; }
static void PDFDocumentNodeContentControl_ToolTipOpening(object sender, ToolTipEventArgs e) { TextBlock text_block = (TextBlock)sender; DocumentTextBlockTag tag = (DocumentTextBlockTag)text_block.Tag; try { if (null == tag.library_index_hover_popup) { tag.library_index_hover_popup = new LibraryIndexHoverPopup(); tag.library_index_hover_popup.SetPopupContent(tag.pdf_document, 1); text_block.ToolTip = tag.library_index_hover_popup; } } catch (Exception ex) { Logging.Error(ex, "Exception while displaying document preview popup"); } }