public TranslationAggregatorViewModel(TranslationManager translationManager)
        {
            _translations = new LinkedList <AggregatedTranslationViewModel>();

            Manager = translationManager;
            Height  = 100; // TODO: Get from config
            Width   = 400; // TODO: Get from config

            AllTranslators = translationManager.AllEndpoints
                             .Select(x => new TranslatorViewModel(x))
                             .ToList();

            AvailableTranslators = AllTranslators
                                   .Where(x => x.Endpoint.Error == null)
                                   .ToList();
        }
Exemple #2
0
        public TranslationAggregatorViewModel(TranslationManager translationManager)
        {
            _translations       = new LinkedList <AggregatedTranslationViewModel>();
            _saveHeightAndWidth = new DebounceFunction(1, SaveHeightAndWidth);

            Manager = translationManager;
            Height  = Settings.Height;
            Width   = Settings.Width;

            AllTranslators = translationManager.AllEndpoints
                             .Select(x => new TranslatorViewModel(x))
                             .ToList();

            AvailableTranslators = AllTranslators
                                   .Where(x => x.Endpoint.Error == null)
                                   .ToList();
        }