コード例 #1
0
        /// <summary>
        /// Save updates into the file.
        /// </summary>
        private void NextFile()
        {
            int currentIndex = Musics.IndexOf(SelectedMusic) + 1;

            if (currentIndex >= Musics.Count)
            {
                currentIndex = 0;
            }

            SelectedMusic = Musics[currentIndex];
        }
コード例 #2
0
        /// <summary>
        /// Save updates into the file.
        /// </summary>
        private void PreviousFile()
        {
            int currentIndex = Musics.IndexOf(SelectedMusic) - 1;

            if (currentIndex < 0)
            {
                currentIndex = Musics.Count - 1;
            }

            SelectedMusic = Musics[currentIndex];
        }