コード例 #1
0
        //1. The top part
        private void btnIntroVideo_Click(object sender, RoutedEventArgs e)
        {
            eWindow.Content = eWObstacles;
            InitControl();
            foreach (Question question in questionList)
            {
                if (question.QuestionTypeID == "02")
                {
                    eWObstacles.MainObstacle = question.QuestionImageName;
                }
            }
            eWObstacles.InitEWControl();
            eWObstacles.HideAll();
            IntroMusic.Stop();
            eWObstacles.VideoIntro.Visibility = Visibility.Visible;
            eWObstacles.VideoIntro.Stop();
            eWObstacles.VideoIntro.Play();
            eWObstacles.VideoIntro.MediaEnded += VideoIntro_MediaEnded;
            for (int i = 0; i < server.ClientList.Count; i++)
            {
                server.Send(server.ClientList[i], "2_3");
            }

            System.IO.StreamWriter streamWriter = new System.IO.StreamWriter("Round.txt");
            streamWriter.Flush();
            streamWriter.Write("2");
            streamWriter.Close();

            server.SendTSInfo(currentRound, studentList);
        }
コード例 #2
0
 private void btnIntroMusic_Click(object sender, RoutedEventArgs e)
 {
     IntroMusic.Stop();
     IntroMusic.Play();
 }
コード例 #3
0
 private void IntroMusic_MediaEnded(object sender, RoutedEventArgs e)
 {
     IntroMusic.Stop();
 }