public MultipleChoice(MultipleChoice Object) { question = Object.question; ansA = Object.ansA; ansB = Object.ansB; ansC = Object.ansC; correct = Object.correct; card = Object.card; }
private void init() { CrossTextToSpeech.Dispose(); //iterate question count count++; //set colors buttonNext.IsVisible = false; scoreLbl.Text = "Test Score: " + Math.Round(grade, 2); buttonA.BackgroundColor = Color.Orange; buttonB.BackgroundColor = Color.CornflowerBlue; buttonC.BackgroundColor = Color.Salmon; buttonD.BackgroundColor = Color.MediumPurple; MultipleChoice current = questions.First(); List <String> options = new List <String>(); options.Add(current.getA()); options.Add(current.getB()); options.Add(current.getC()); options.Add(current.getCorrect()); Shuffle <String> opt = new Shuffle <String>(options); questionLbl.Text = count + ") " + current.getQuestion(); if (audioOn == true) { var text = questionLbl.Text; CrossTextToSpeech.Current.Speak(text); } buttonA.Text = opt.getList()[0]; buttonB.Text = opt.getList()[1]; buttonC.Text = opt.getList()[2]; buttonD.Text = opt.getList()[3]; while (options.Count > 0) { options.Remove(options.First()); } }
public bool equals(MultipleChoice Object) { return((Object.question.Equals(question)) && (Object.correct.Equals(correct)) && (Object.ansA.Equals(ansA)) && (Object.ansB.Equals(ansB)) && (Object.ansC.Equals(ansC))); }