예제 #1
0
 private void PlayPauseButton_Click(object sender, RoutedEventArgs e)
 {
     if (isPlaying)
     {
         isPlaying = false;
         MainMediaPlayer.Pause();
     }
     else if (!isPlaying)
     {
         isPlaying = true;
         MainMediaPlayer.Play();
     }
 }
예제 #2
0
        private void UserStationsList_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            try
            {
                UserCurrentStation.Text = (UserStationsList.SelectedItem as StationParse).UserStationName.ToString();
            }
            catch { UserCurrentStation.Text = ""; }

            MainMediaPlayer.Source = new Uri((UserStationsList.SelectedItem as StationParse).Ip.ToString(), UriKind.RelativeOrAbsolute);
            MainMediaPlayer.Play();
            PlayPauseButton.IsChecked = true;
            isPlaying = true;
        }