public AnswerDialogViewModel(ObservableCollection <SpellingViewModel> spellTests, ISpeachService speachService) { _spellTestService = new SpellTestService(spellTests, speachService); _speachService = speachService; CurrentSpelling = _spellTestService.NextQuestion(); RequestSpelling(CurrentSpelling); AnswerCommand = new RelayCommand <Window>(OnAnswer, CanAnswer); SkipCommand = new RelayCommand <Window>(OnSkip, CanSkip); QuitCommand = new RelayCommand <Window>(OnQuit); RepeatCommand = new RelayCommand(OnRepeat, CanRepeat); }
public AnswerViewModel(int spellTestId, ObservableCollection <SpellingViewModel> spellTests, ISpeachService speachService, ConnectedRepository repo) { _spellTestId = spellTestId; _spellTestService = new SpellTestService(spellTests, speachService); _speachService = speachService; _repo = repo; _spellTests = spellTests; CurrentSpelling = _spellTestService.NextQuestion(); RequestSpelling(CurrentSpelling); AnswerCommand = new RelayCommand <Window>(OnAnswer, CanAnswer); SkipCommand = new RelayCommand <Window>(OnSkip, CanSkip); QuitCommand = new RelayCommand <Window>(OnQuit); RepeatCommand = new RelayCommand(OnRepeat, CanRepeat); }