public Questions(int complexity) { WindowStartupLocation = WindowStartupLocation.CenterScreen; InitializeComponent(); _controller = new QuestionnaireController(complexity); _numberOfQuestions = _controller.GetNumberOfItems(); SetNextFields(); }
private void Next_OnClick(object sender, RoutedEventArgs e) { if (_controller.GetNumberOfItems() > 1) { Item currentItem = _controller.GetCurrentItem(); _controller.Remove(currentItem); SetNextFields(); } else { Result result = new Result(_numberOfCorrectAnswers, _numberOfQuestions); result.Show(); Close(); } }