private void ButtonAddDocumentsFromLibrary_Click(object sender, RoutedEventArgs e) { using (AugmentedPopupAutoCloser apac = new AugmentedPopupAutoCloser(ButtonAddPDFPopup)) { // First choose the source library string message = String.Format("You are about to import a lot of PDFs into the library named '{0}'. Please choose the library FROM WHICH you wish to import the PDFs.", web_library_detail.Title); WebLibraryDetail picked_web_library_detail = WebLibraryPicker.PickWebLibrary(message); if (null != picked_web_library_detail) { if (picked_web_library_detail == web_library_detail) { MessageBoxes.Error("You can not copy documents into the same library."); return; } // Then check that they still want to do this string message2 = String.Format("You are about to copy ALL of the PDFs from the library named '{0}' into the library named '{1}'. Are you sure you want to do this?", picked_web_library_detail.Title, web_library_detail.Title); if (!MessageBoxes.AskQuestion(message2)) { return; } // They are sure! ImportingIntoLibrary.ClonePDFDocumentsFromOtherLibrary_ASYNCHRONOUS(picked_web_library_detail.Xlibrary.PDFDocuments, web_library_detail); } } }
private void ButtonAddDocumentsFromFolder_Click(object sender, RoutedEventArgs e) { using (AugmentedPopupAutoCloser apac = new AugmentedPopupAutoCloser(ButtonAddPDFPopup)) { new ImportFromFolder(web_library_detail).ShowDialog(); } }
private void ButtonWatchFolder_Click(object sender, RoutedEventArgs e) { using (AugmentedPopupAutoCloser apac = new AugmentedPopupAutoCloser(ButtonAddPDFPopup)) { new FolderWatcherChooser(web_library_detail).ShowDialog(); } }
private void ButtonExploreInBrainstorm_Click(object sender, RoutedEventArgs e) { using (AugmentedPopupAutoCloser apac = new AugmentedPopupAutoCloser(ButtonExplorePopup)) { FeatureTrackingManager.Instance.UseFeature(Features.Document_ExploreDocumentInBrainstorm); MainWindowServiceDispatcher.Instance.ExploreDocumentInBrainstorm(pdf_renderer_control_stats.pdf_document); } }
private void ButtonSyncDetails_Click(object sender, RoutedEventArgs e) { using (AugmentedPopupAutoCloser apac = new AugmentedPopupAutoCloser(ButtonSyncPopup)) { FeatureTrackingManager.Instance.UseFeature(Features.Sync_SyncDetails); LibrarySyncManager.Instance.RequestSync(new LibrarySyncManager.SyncRequest(wants_user_intervention: true, web_library_detail, suppress_already_in_progress_notification: false)); } }
void ButtonSyncDetails_Click(object sender, RoutedEventArgs e) { using (AugmentedPopupAutoCloser apac = new AugmentedPopupAutoCloser(ButtonSyncPopup)) { FeatureTrackingManager.Instance.UseFeature(Features.Sync_SyncDetails); LibrarySyncManager.Instance.RequestSync(new LibrarySyncManager.SyncRequest(true, library, true, true, false)); } }
private void ButtonAddVanillaReference_Click(object sender, RoutedEventArgs e) { using (AugmentedPopupAutoCloser apac = new AugmentedPopupAutoCloser(ButtonAddPDFPopup)) { PDFDocument pdf_document = web_library_detail.Xlibrary.AddVanillaReferenceDocumentToLibrary(null, web_library_detail, null, null, false); // Let's pop up the BibTeX editor window for the new document MetadataBibTeXEditorControl editor = new MetadataBibTeXEditorControl(); editor.Show(pdf_document.Bindable); } }
private void ButtonAddMissingDocumentsFromSelf_Click(object sender, RoutedEventArgs e) { using (AugmentedPopupAutoCloser apac = new AugmentedPopupAutoCloser(ButtonAddPDFPopup)) { var root_folder = web_library_detail.LIBRARY_DOCUMENTS_BASE_PATH; if (Directory.Exists(root_folder)) { // do the import ImportingIntoLibrary.AddNewPDFDocumentsToLibraryFromFolder_ASYNCHRONOUS(web_library_detail, root_folder, true, false, false); } } }
private void ButtonExploreInBrainstorm_Click(object sender, RoutedEventArgs e) { using (AugmentedPopupAutoCloser apac = new AugmentedPopupAutoCloser(ButtonExplorePopup)) { FeatureTrackingManager.Instance.UseFeature(Features.Document_ExploreDocumentInBrainstorm); PDFDocument pdf_document = GetPDFDocument(); ASSERT.Test(pdf_document != null); if (pdf_document != null) { MainWindowServiceDispatcher.Instance.ExploreDocumentInBrainstorm(pdf_document); } } }
private void ButtonAddDocuments_Click(object sender, RoutedEventArgs e) { using (AugmentedPopupAutoCloser apac = new AugmentedPopupAutoCloser(ButtonAddPDFPopup)) { OpenFileDialog dlg = new OpenFileDialog(); dlg.CheckFileExists = true; dlg.CheckPathExists = true; dlg.Filter = "PDF Files|*.pdf"; dlg.Multiselect = true; dlg.Title = "Select the PDF documents you wish to add to your document library"; if (dlg.ShowDialog() == true) { ImportingIntoLibrary.AddNewPDFDocumentsToLibrary_ASYNCHRONOUS(library, false, false, dlg.FileNames); } } }