Пример #1
0
        private List <AntwortViewModel> RandomizeAntworten(List <AntwortViewModel> tempAntworten)
        {
            Random rnd = new Random();

            for (int i = 0; i < tempAntworten.Count; i++)
            {
                AntwortViewModel temp = tempAntworten[i];
                int randomIndex       = rnd.Next(i, tempAntworten.Count);
                tempAntworten[i]           = tempAntworten[randomIndex];
                tempAntworten[randomIndex] = temp;
            }

            return(tempAntworten);
        }
Пример #2
0
        private void SelectAnswer(AntwortViewModel antwort)
        {
            if (Aufloesung)
            {
                if (antwort != null)
                {
                    if (antwort.Status == AntwortStatus.NotSelected)
                    {
                        antwort.Status = AntwortStatus.Selected;
                    }
                    else
                    {
                        antwort.Status = AntwortStatus.NotSelected;
                    }

                    SetIsSolveabel();
                    SetSelectCounter();
                }
            }
            else
            {
                NextQuestion();
            }
        }