public static void TestHarness() { Library library = Library.GuestInstance; Thread.Sleep(1000); GoogleBibTexSnifferControl c = new GoogleBibTexSnifferControl(); PDFDocument pdf_document = library.PDFDocuments[0]; //c.Show(pdf_document.Library, pdf_document, "test search term"); //c.Show(pdf_document.Library, pdf_document); c.Show(pdf_document.Library.PDFDocuments); }
private void ButtonSniffer_Click(object sender, RoutedEventArgs e) { AugmentedBindable <PDFDocument> pdf_document_bindable = DataContext as AugmentedBindable <PDFDocument>; if (null == pdf_document_bindable) { return; } GoogleBibTexSnifferControl sniffer = new GoogleBibTexSnifferControl(); sniffer.Show(pdf_document_bindable.Underlying); }
private void ButtonBibTexAutoFind_Click(object sender, RoutedEventArgs e) { AugmentedBindable <PDFDocument> pdf_document_bindable = DataContext as AugmentedBindable <PDFDocument>; if (null == pdf_document_bindable) { return; } bool found_bibtex = PDFMetadataInferenceFromBibTeXSearch.InferBibTeX(pdf_document_bindable.Underlying, true); if (!found_bibtex) { if (MessageBoxes.AskQuestion("Qiqqa was unable to automatically find BibTeX for this document. Do you want to try using the BibTeX Sniffer?")) { GoogleBibTexSnifferControl sniffer = new GoogleBibTexSnifferControl(); sniffer.Show(pdf_document_bindable.Underlying); } } }