private void MusicItem_Click(object sender, EventArgs e) { var ctrl = sender as PlayListItem; if (ctrl == null) { return; } var musicIndex = ctrl.Index; YMPCore.PlayList.CurrentPlayList = CurrentPlayList; YMPCore.Browser.PlayMusic(CurrentPlayList.GetMusic(musicIndex)); }