Ejemplo n.º 1
0
        private void Window_Presentation_Answer_Click(AnswerButton sender, MouseButtonEventArgs e)
        {
            sender.SetSelected(true);

            answersClickedList.Add(PlayCanvas.Children.IndexOf(sender));

            bool showgood = false;

            if (!sender.Good)
            {
                showgood = sender.ShowGood;

                if (data.SaveOutput)
                {
                    TWrong++;
                }


                if (!NoCount)
                {
                    Good_Teacher.MainWindow.WrongAnswersCount++;
                }
            }
            else
            {
                if (data.SaveOutput)
                {
                    TGood++;
                }

                if (!NoCount)
                {
                    Good_Teacher.MainWindow.GoodAnswersCount++;
                }
            }

            foreach (AnswerButton ans in answersList)
            {
                if (ans.ID == sender.ID)
                {
                    if (showgood)
                    {
                        if (ans.Good)
                        {
                            ans.SetSelected(true);
                        }
                    }

                    ans.IsEnabled = false;
                }
            }
        }