SRNicoNico.ViewModels.PlayListViewModel.Next C# (CSharp) Method

Next() public method

public Next ( ) : void
return void
        public void Next()
        {
            if(PlayList.Count == 1) {

                return;
            }

            var index = PlayList.IndexOf(SelectedPlayList);

            if(index + 1 >= PlayList.Count) {

                if(IsRepeat) {

                    SelectedPlayList = PlayList.First();
                }
            } else {

                SelectedPlayList = PlayList[index + 1];
            }
        }