示例#1
0
        private void CiteDocument(bool separate_author_and_date, bool as_snippet)
        {
            TextBlock text_block = ObjPDFDocuments.SelectedItem as TextBlock;

            if (null != text_block)
            {
                ListFormattingTools.DocumentTextBlockTag tag = (ListFormattingTools.DocumentTextBlockTag)text_block.Tag;
                ASSERT.Test(tag != null);
                ASSERT.Test(tag.pdf_document != null);

                if (as_snippet)
                {
                    PDFDocumentCitingTools.CiteSnippetPDFDocument(false, tag.pdf_document);
                }
                else
                {
                    PDFDocumentCitingTools.CitePDFDocument(tag.pdf_document, separate_author_and_date);
                }
                chw.Close();
            }
            else
            {
                MessageBoxes.Info("Please select a citation to cite.");
            }
        }
        private void TopicDocumentPressed_MouseButtonEventHandler(object sender, MouseButtonEventArgs e)
        {
            TextBlock text_block = (TextBlock)sender;

            ListFormattingTools.DocumentTextBlockTag tag = (ListFormattingTools.DocumentTextBlockTag)text_block.Tag;
            PDFDocumentSelected?.Invoke(tag.pdf_document);
            e.Handled = true;
        }
        private void OnDocumentClicked(object sender, MouseButtonEventArgs e)
        {
            TextBlock text_doc = (TextBlock)sender;

            ListFormattingTools.DocumentTextBlockTag tag = (ListFormattingTools.DocumentTextBlockTag)text_doc.Tag;

            Logging.Info("{0} was clicked", tag.pdf_document);
        }
        private void RecommendedCitationsMouseDown(object sender, MouseButtonEventArgs e)
        {
            FeatureTrackingManager.Instance.UseFeature(Features.InCite_ClickRecommended);

            TextBlock text_block = (TextBlock)sender;

            ListFormattingTools.DocumentTextBlockTag tag = (ListFormattingTools.DocumentTextBlockTag)text_block.Tag;
            library_control.ObjLibraryCatalogControl.FocusOnDocument(tag.pdf_document);
            e.Handled = true;
        }
        void DocumentDocumentPressed_MouseButtonEventHandler(object sender, MouseButtonEventArgs e)
        {
            TextBlock text_block = (TextBlock)sender;

            ListFormattingTools.DocumentTextBlockTag tag = (ListFormattingTools.DocumentTextBlockTag)text_block.Tag;
            if (null != PDFDocumentSelected)
            {
                PDFDocumentSelected(tag.pdf_document);
            }
            e.Handled = true;
        }
        private void LinkSelectedDocument()
        {
            FeatureTrackingManager.Instance.UseFeature(Features.LinkedDocument_Create);

            TextBlock text_block = ObjPDFDocuments.SelectedItem as TextBlock;

            if (null != text_block)
            {
                ListFormattingTools.DocumentTextBlockTag tag = (ListFormattingTools.DocumentTextBlockTag)text_block.Tag;
                PDFDocument pdf_document_other = tag.pdf_document;
                pdf_document.PDFDocumentCitationManager.AddLinkedDocument(pdf_document_other.Fingerprint);
                pdf_document_other.PDFDocumentCitationManager.AddLinkedDocument(pdf_document.Fingerprint);
            }

            ObjSearchBox.Clear();
            RepopulatePanels();
        }