Ejemplo n.º 1
0
        /// <summary>
        ///     Handles the Click event of the btnPlay control.
        /// </summary>
        private void btnPlay_Click(object sender, EventArgs e)
        {
            BeginInvoke(BassPlayer.PlayState == PlayState.Playing
                ? delegate { BassPlayer.Pause(); }
                : new MethodInvoker(delegate { BassPlayer.Play(); }));

            btnPause.Visible = BassPlayer.PlayState == PlayState.Playing;
            btnPlay.Visible  = BassPlayer.PlayState != PlayState.Playing;
        }
Ejemplo n.º 2
0
 private void Pause_Click(object sender, RoutedEventArgs e)
 {
     MediaPlayer.Pause();
 }