public MainWindowViewModel(IOpenViewService openViewService) { this.openViewService = openViewService; ContinueNewWordsCommand = new RelayCommand(ContinueNewWords); OpenBooksWindowCommand = new RelayCommand(OpenBooksWindow); OpenWordsWindowCommand = new RelayCommand(OpenWordsWindow); OpenAuthorWindowCommand = new RelayCommand(OpenAuthorWindow); OpenLearnWordsWindowCommand = new RelayCommand(OpenLearnWords); OpenEnlistServersWindowCommand = new RelayCommand(EnlistServers); ServerNameChangedCommand = new RelayCommand(ServerNameChanged); }
public BookListViewModel(IDictionaryDataService dictionaryDataService, ILogService logService, IOpenViewService openViewService) { this.dictionaryDataService = dictionaryDataService; this.logService = logService; this.openViewService = openViewService; AddBookCommand = new RelayCommand(AddBookMethod); EditBookCommand = new RelayCommand(EditBookMethod); DeleteBookCommand = new RelayCommand(DeleteBookMethod); efContext = dictionaryDataService.GetEFLearnDictionaryContext(); efContext.Books.Load(); Books = efContext.Books.Local; }
public MainViewModel(IOpenViewService openViewService, ILogService logService) { //_openViewService = openViewService; //_logService = logService; CurrentTime = "00:00:00"; _queryInterval = 5; reqId = 1; StartTimerCommand = new RelayCommand(StartTimer, CanStartTimer); StopTimerCommand = new RelayCommand(StopTimer, CanStopTimer); ResetTimerCommand = new RelayCommand(ResetTimer, CanResetTimer); ClearLogCommand = new RelayCommand(ClearLog); }
public LearnWordsViewModel(IDictionaryDataService dictionaryDataService, IOpenViewService openViewService, ILogService logService) { this.dictionaryDataService = dictionaryDataService; this.openViewService = openViewService; this.logService = logService; efContext = dictionaryDataService.GetEFLearnDictionaryContext(); efContext.Books.Load(); efContext.Languages.Load(); Books = efContext.Books.Local; Languagies = efContext.Languages.Local; SelectedLanguage = Languagies[0]; FillCandidatesCommand = new RelayCommand(FillAllWords); //LearnCommand = new RelayCommand(LearnWords, CanLearnWords); StartLearningCommand = new RelayCommand(StartLearning, () => WordsToLearn != null && WordsToLearn.Count > 0); ShowMariamWebsterCommand = new RelayCommand(ShowMariamWebster); OpenWordCardCommand = new RelayCommand <Word>( w => { OpenWordCard(w); }); FillStrategies(); }
public AllWordsViewModel(IOpenViewService openViewService, IDictionaryDataService dictionaryDataService, ILogService logService) { this.openViewService = openViewService; this.dictionaryDataService = dictionaryDataService; this.logService = logService; efContext = dictionaryDataService.GetEFLearnDictionaryContext(); efContext.Languages.Load(); efContext.Books.Load(); //efContext.WordEntries.Load(); efContext.Words.Include("WordEntries").Load(); Languages = efContext.Languages.Local; Books = efContext.Books.Local; Words = efContext.Words.Local; //WordEntries = efContext.WordEntries.Local; SelectedSortingItem = SortingItems[0]; FilterWords(); SelectBookCommand = new RelayCommand(FilterWords); SelectLanguageCommand = new RelayCommand(FilterWords); SelectSortingCommand = new RelayCommand(FilterWords); AddNewWordCommand = new RelayCommand(AddNewWord); EditNewWordCommand = new RelayCommand(EditNewWord); DeleteWordCommand = new RelayCommand(DeleteWord); }