コード例 #1
0
        public Questions(int complexity)
        {
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            InitializeComponent();

            _controller        = new QuestionnaireController(complexity);
            _numberOfQuestions = _controller.GetNumberOfItems();

            SetNextFields();
        }
コード例 #2
0
        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();
            }
        }