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

Prev() public method

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

                return;
            }

            var index = PlayList.IndexOf(SelectedPlayList);
            if(index <= 0) {

                SelectedPlayList = PlayList.Last();
            } else {

                SelectedPlayList = PlayList[index - 1];
            }
        }