private void buttonContinue_Click(object sender, EventArgs e) { // Extract the answer given by the patient int result = 0; foreach (var radio in Radios) { if (radio.Checked) { break; } else { result++; } } Mate.Listen(result); // Update form if (Mate.Ended) { Mate.CalculateResults(); ShowResults(); } else { Mate.Continue(); SetQuestions(); } }
public void Save() { // Cleaning answers if (Mate.SurveyQuestions != null) { Mate.SurveyAnswers = SurveyAnswers.ToArray(); } // Storing answers on memory var results = Mate.CalculateResults(); Console.WriteLine(results); }