Exemplo n.º 1
0
        private void btnAddPoint_Click(object sender, RoutedEventArgs e)
        {
            if (currentQuestion < 5)
            {
                ShowWords(currentQuestion);
            }

            bool isFalse = true;    //To make sure that the true SOUND will NOT be PLAYED when ALL FALSE

            for (int i = 0; i < checkbox.Count(); i++)
            {
                if (checkbox[i].IsChecked == true)
                {
                    isFalse = false;
                    studentList[i].Point += 10;
                    Main.txtBoxStudentPointList[i].Text = studentList[i].Point.ToString();
                    DAO.StudentDAO.Instance.UpdatePoint(studentList[i].StudentID, studentList[i].Point, studentList[i].MatchID.ToString());
                }
            }

            if (isFalse == false)
            {
                TrueRowSound.Stop();
                TrueRowSound.Play();
            }

            EraseContent();

            //replica update POINT
            server.SendTSInfo(currentRound, studentList);
        }
Exemplo n.º 2
0
 private void TrueRowSound_MediaEnded(object sender, RoutedEventArgs e)
 {
     TrueRowSound.Stop();
 }