示例#1
0
        private void Table_SelectionChanged(object sender, EventArgs e)
        {
            PlaylistItemModel playlistItemModel = (PlaylistItemModel)(((UI.Table)sender).GetSelection());

            if (player != null)
            {
                player.Stop();
            }

            if (playlistItemModel.Path.EndsWith(".mp3"))
            {
                player = this.fmodPlayer;
            }
            else
            {
                player = this.vlcPlayer;
                ShowVideoForm();
            }


            player.LoadTrack(playlistItemModel.Path);
            player.SetVolume(volumeSlider.Value);
            player.Play();

            //pm.GetSelection().Duration = (player.GetLength() > 359999) ? 0 : player.GetLength();

            //pm.GetSelection().Name = player.GetName();
        }
示例#2
0
 private void BtnStopClickHandler(object sender, EventArgs e)
 {
     player.Stop();
 }