public void AddDocument(string pdfDocument) { PreviewablePdfDocument doc = new PreviewablePdfDocument(pdfDocument); SortedList <int, ImportPage> pages = new SortedList <int, ImportPage>(); ImportCandidate newCandidate = new ImportCandidate(pdfDocument); for (int i = 0; i < doc.PageCount(); i++) { ImportPage page = new ImportPage(newCandidate, i + 1, doc.Pages[i].Thumbnail); newCandidate.Pages.Add(page); } ImportCandidates.Add(newCandidate); }
/// <summary> /// Imports the given importCandidate and removes it from the ImportBatch. /// </summary> /// <param name="importCandidate">ImportCandidate to be imported.</param> /// <returns></returns> public async Task ImportCandidateAsync(ImportCandidate importCandidate) { await Importer.ImportImportCandidate(importCandidate); ImportCandidates.Remove(importCandidate); }