예제 #1
0
 public void Start(musicItem track)
 {
     selectTrack(track);
     Start();
 }
예제 #2
0
        public void skip(bool isNext)
        {
            if (selectedTrack != null) {
                int currentIndex;

                currentIndex = playlist.IndexOf(selectedTrack);

                // Skip next
                if (isNext && currentIndex < playlist.Count - 1 )
                {
                    selectedTrack = playlist[currentIndex + 1];
                    Start();
                }
                else if (isNext && playlist[0] != null)
                {
                    selectedTrack = playlist[0];
                    Start();
                }

                //Skip prev
                else if (!isNext && currentIndex > 0)
                {
                    selectedTrack = playlist[currentIndex - 1];
                    Start();
                }
                else if (!isNext && playlist[playlist.Count-1] != null)
                {
                    selectedTrack = playlist[playlist.Count-1];
                    Start();
                }
                else
                {
                    Start();
                }
            }
        }
예제 #3
0
        public void delTracks(System.Collections.IList list)
        {
            List<musicItem> tempList = new List<musicItem>();
            foreach (musicItem item in list)
            {
                tempList.Add(item);
            }

            foreach (musicItem item in tempList)
            {
                playlist.Remove(item);
                if (selectedTrack != null && selectedTrack == item)
                {
                    selectedTrack = null;
                }
            }
        }
예제 #4
0
 public void selectTrack(musicItem targetItem)
 {
     selectedTrack = targetItem;
 }
예제 #5
0
 public void delSelectedTrack()
 {
     if (selectedTrack != null && playlist.Count > 0)
     {
         playlist.Remove(selectedTrack);
         selectedTrack = null;
     }
 }