private void myPlayer_MediaOpened(object sender, RoutedEventArgs e)
 {
     Grid_Loading.Visibility = System.Windows.Visibility.Collapsed;
     SB_Loading.Stop();
     ImageButton = @"Assets\ButtonImages\pause.png";
     DTimerGame.Start();
 }
        private async void NextQuestion()
        {
            Grid_Loading.Visibility = System.Windows.Visibility.Visible;
            SB_Loading.Begin();
            CurrentIndex++;
            if (CurrentIndex < 10)
            {
                CurrentQuestion = Global.ListQuestion[CurrentIndex];
                string streamUrl = await SoundCloudMusicService.LaunchTrack(CurrentQuestion.Source);

                if (streamUrl != null)
                {
                    myPlayer.Source = new Uri(streamUrl, UriKind.Absolute);
                }
            }
            return;
        }
        public GamePage()
        {
            InitializeComponent();

            this.DataContext = this;
            for (int i = 0; i < 5; i++)
            {
                ListImages.Add("\\Assets\\BG_Images\\BG_Game" + i + ".jpg");
            }
            myPlayer.Volume     = Global.GameVolume;
            Global.GameScore    = Global.GameTime = 0;
            ImageBackground     = ListImages[CurrentImages];
            DTimerShow          = new DispatcherTimer();
            DTimerShow.Interval = new TimeSpan(0, 0, 5);
            DTimerShow.Tick    += DTimerShow_Tick;
            DTimerShow.Start();

            DTimerGame          = new DispatcherTimer();
            DTimerGame.Interval = new TimeSpan(0, 0, 1);
            DTimerGame.Tick    += DTimerGame_Tick;
            SB_Loading.Begin();
            LoadGame();
        }
 private void SB_Loading_Completed(object sender, EventArgs e)
 {
     SB_Loading.Begin();
 }