public UserResult(TestEvaluationService testEvaluationService, ApplicationUserStateService applicationUserStateService, TestService testService) { InitializeComponent(); _testEvaluationService = testEvaluationService; _testService = testService; _currentUser = applicationUserStateService.CurrentlyLoggedInUser(); TestId = applicationUserStateService.GetTestId(); this.Load += UserResult_Load; }
private void QuestionPage_Load(object sender, EventArgs e) { var test = _testService.GetTestDetails(_stateService.GetTestId()); if (test != null) { Welcome.Text = $@"Welcome to the {test?.Name} Examination!Press Start when Ready"; var questions = test.Questions.ToList(); QuestionsStack = _yates.ShuffleQuestions(questions); TestTime.Enabled = false; OK.Visible = false; Start.Visible = true; HideControls(); OptionState(); } else { MessageBox.Show("No Test found for the provided code"); } }