Ejemplo n.º 1
0
        public static List <AnnotationItem> GetAnnotations(BookProfile profile)
        {
            string dbCardFileName;
            List <DbFileDescription> pretendents = new List <DbFileDescription>();

            WaitReaderConnection(profile, ref pretendents);

            dbCardFileName = pretendents.FirstOrDefault(p => p.Drive.VolumeLabel != profile.ReaderDriveLabel).FilePath;
            List <AnnotationItem> preAnnotationList = AnnotationReader.Read(dbCardFileName);

            return(preAnnotationList);
        }
Ejemplo n.º 2
0
        private static List <AnnotationItem> GetAnnotationsFromAllDb(string diretoryPath)
        {
            List <AnnotationItem> fullResult = new List <AnnotationItem>();

            DirectoryInfo dir      = new DirectoryInfo(diretoryPath);
            var           fileList = dir.GetFiles().Where(i => i.Name.Contains("book") && i.Name.Contains(".db"));

            foreach (var file in fileList)
            {
                fullResult.AddRange(AnnotationReader.Read(file.FullName));
            }

            fullResult = AnnotationItem.OnlyUnique(fullResult);


            return(fullResult);
        }