Exemplo n.º 1
0
        internal void UploadFiles(IWord word)
        {
            Console.WriteLine("Generate flashcard for " + word.OriginalWord);
            var imageResult = _flashCardGenerator.Generate(word, ELearnMode.FullView);
            var fileId      = _repository.AddFile(imageResult.ImageBody);

            word.CardAll = imageResult.ToWordFile(fileId);

            imageResult           = _flashCardGenerator.Generate(word, ELearnMode.OriginalWord);
            fileId                = _repository.AddFile(imageResult.ImageBody);
            word.CardOriginalWord = imageResult.ToWordFile(fileId);

            imageResult            = _flashCardGenerator.Generate(word, ELearnMode.Pronunciation);
            fileId                 = _repository.AddFile(imageResult.ImageBody);
            word.CardPronunciation = imageResult.ToWordFile(fileId);

            imageResult          = _flashCardGenerator.Generate(word, ELearnMode.Translation);
            fileId               = _repository.AddFile(imageResult.ImageBody);
            word.CardTranslation = imageResult.ToWordFile(fileId);
        }