예제 #1
0
 public TranslationViewModel(TranslationMemoryViewModel translationMemoryViewModel)
 {
     _translationMemoryViewModel = translationMemoryViewModel;
     _tmsCollection = _translationMemoryViewModel.TmsCollection;
     _anonymizeTranslationMemories = new List <AnonymizeTranslationMemory>();
     _rules = Constants.GetDefaultRules();
     _sourceSearchResults                         = new ObservableCollection <SourceSearchResult>();
     _tmsCollection.CollectionChanged            += _tmsCollection_CollectionChanged;
     _translationMemoryViewModel.PropertyChanged += _translationMemoryViewModel_PropertyChanged;
 }
예제 #2
0
 public PreviewWindowViewModel(ObservableCollection <SourceSearchResult> searchResults,
                               List <AnonymizeTranslationMemory> anonymizeTranslationMemories, ObservableCollection <TmFile> tmsCollection,
                               TranslationMemoryViewModel tmViewModel)
 {
     _backupTms                            = new List <ServerTmBackUp>();
     _backgroundWorker                     = new BackgroundWorker();
     _backgroundWorker.DoWork             += _backgroundWorker_DoWork;
     _backgroundWorker.RunWorkerCompleted += _backgroundWorker_RunWorkerCompleted;
     _sourceSearchResults                  = searchResults;
     _tmViewModel                          = tmViewModel;
     _anonymizeTranslationMemories         = anonymizeTranslationMemories;
     _tmsCollection                        = tmsCollection;
 }
예제 #3
0
 public TranslationViewModel(TranslationMemoryViewModel translationMemoryViewModel)
 {
     _selectedItems = new List <Rule>();
     _translationMemoryViewModel   = translationMemoryViewModel;
     _anonymizeTranslationMemories = new List <AnonymizeTranslationMemory>();
     _rules = SettingsMethods.GetRules();
     foreach (var rule in _rules)
     {
         rule.PropertyChanged += Rule_PropertyChanged;
     }
     _sourceSearchResults                  = new ObservableCollection <SourceSearchResult>();
     _backgroundWorker                     = new BackgroundWorker();
     _backgroundWorker.DoWork             += _backgroundWorker_DoWork;
     _backgroundWorker.RunWorkerCompleted += _backgroundWorker_RunWorkerCompleted;
     _tmsCollection = _translationMemoryViewModel.TmsCollection;
     _tmsCollection.CollectionChanged            += _tmsCollection_CollectionChanged;
     _translationMemoryViewModel.PropertyChanged += _translationMemoryViewModel_PropertyChanged;
     RulesCollection.CollectionChanged           += RulesCollection_CollectionChanged;
 }