public StartWindowViewModel(ISessionService sessionService, IQuizDataService quizDataService, IWindowService windowService) { _sessionService = sessionService; _quizDataService = quizDataService; _windowService = windowService; _difficulties = new CollectionView(_quizDataService.GetDifficulties()); }
public QuizView(ISessionService sessionService, IQuizDataService quizDataService, IWindowService windowService) { InitializeComponent(); var vm = new QuizWindowViewModel(sessionService, quizDataService, windowService); DataContext = vm; if (vm.CloseWindowAction == null) { vm.CloseWindowAction = new System.Action(() => Close()); } }
public QuizWindowViewModel(ISessionService sessionService, IQuizDataService quizDataService, IWindowService windowService) { _sessionService = sessionService; _quizDataService = quizDataService; _windowService = windowService; var difficulty = _sessionService.GetDifficulty(); _questions = quizDataService.GetQuestionsOfDifficulty(5, difficulty); CurrentQuestion = _questions[_currentQuestionIndex]; CurrentQuestionType = AnswerTemplateSelector.SelectTemplate(CurrentQuestion); }
public QuizApiController(IQuizDataService quizDataService, IShuffleQuizService shuffleQuizService) { _quizDataService = quizDataService; _shuffleQuizService = shuffleQuizService; }
public WindowService(ISessionService sessionService, IQuizDataService quizDataService) { _sessionService = sessionService; _quizDataService = quizDataService; }