Пример #1
0
 public void Prev()
 {
     if (SongsIndexHistory.Count > 0)
     {
         this.index = SongsIndexHistory.Pop();
     }
 }
Пример #2
0
        public void Next()
        {
            if (Songs.Count > 1)
            {
                int tmpIndex = -1;
                while (true)
                {
                    tmpIndex = random.Next(0, Songs.Count);
                    if (tmpIndex != index)
                    {
                        break;
                    }
                }

                if (tmpIndex > 0 && tmpIndex < Songs.Count)
                {
                    SongsIndexHistory.Push(index);
                    index = tmpIndex;
                }
            }
            else
            {
                First();
            }
        }
Пример #3
0
 public void First()
 {
     index = 0;
     SongsIndexHistory.Push(index);
 }