Example #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            //infra
            var scraper = new WordReferenceScraper(new HtmlDocumentFactory(), new WordReferenceURLBuilder(), new CaretAnalyser(new UseLessStringCleaner()));

            translationsList.Clear();

            //infra
            var dataProvider = new DataProvider(dataAccesser.ConnectToDB());

            //domain
            var untranslatedWords = new UntranslatedWordsProvider(dataProvider).GetAll().ToList();

            //domain
            var translationProvider = new TranslationProvider(scraper);

            //app
            translationsList.Add(new TranslationUI(translationProvider.GetTranslations(untranslatedWords[0]) as Translation));

            translationsList.Add(new TranslationUI(translationProvider.GetTranslations(untranslatedWords[1]) as Translation));
        }
Example #2
0
 protected override void Setup()
 {
     base.Setup();
     translationCompleter = new UntranslatedWordsProvider(GetObject <IDataProvider>());
 }