Example #1
0
        /// <summary>
        ///     Sets the SortStrings of the songpointers to the actual category names
        /// </summary>
        private static void _AdjustCategoryNames()
        {
            ESongSorting sorting = CSongs.Sorter.SongSorting;

            switch (sorting)
            {
            case ESongSorting.TR_CONFIG_DECADE:
                foreach (CSongPointer songPointer in CSongs.Sorter.SortedSongs)
                {
                    string year = songPointer.SortString;
                    if (year != "")
                    {
                        year = year.Substring(0, 3);
                        songPointer.SortString = year + "0 - " + year + "9";
                    }
                }
                break;

            case ESongSorting.TR_CONFIG_TITLE_LETTER:
            case ESongSorting.TR_CONFIG_ARTIST_LETTER:
                foreach (CSongPointer songPointer in CSongs.Sorter.SortedSongs)
                {
                    songPointer.SortString = (songPointer.SortString.Length == 0 || !Char.IsLetter(songPointer.SortString, 0)) ? "#" : songPointer.SortString[0].ToString();
                }
                break;

            case ESongSorting.TR_CONFIG_DATEADDED:
                foreach (CSongPointer songPointer in CSongs.Sorter.SortedSongs)
                {
                    songPointer.SortString = CSongs.GetSong(songPointer.SongID).DateAdded.ToString("dd/MM/yyyy");
                }
                break;
            }
        }
Example #2
0
 public static void StopPreview()
 {
     if (!IsPlayingPreview)
     {
         return;
     }
     Stop();
     _CurPlayer = _BGPlayer;
     if (_MusicSource != EBackgroundMusicSource.TR_CONFIG_NO_OWN_MUSIC)
     {
         _CurPlayer.Load(CSongs.GetSong(_PreviewPlayer.SongID));
         _CurPlayer.Position = _PreviewPlayer.Position;
     }
     CSound.SetGlobalVolume(CConfig.BackgroundMusicVolume);
 }
Example #3
0
 public static void SetNormalGameMode()
 {
     CSongs.ResetPartySongSung();
     CurrentPartyModeID = -1;
 }
Example #4
0
 public void PrevCategory()
 {
     CSongs.PrevCategory();
 }
Example #5
0
 public void NextCategory()
 {
     CSongs.NextCategory();
 }
Example #6
0
 public void SortSongs(ESongSorting sorting, EOffOn tabs, EOffOn ignoreArticles, String searchString, EDuetOptions duetOptions, int playlistID)
 {
     CSongs.Sort(sorting, tabs, ignoreArticles, searchString, duetOptions, playlistID);
 }
Example #7
0
 public void ResetSongSung(int catIndex)
 {
     CSongs.ResetPartySongSung(catIndex);
 }
Example #8
0
 public void ResetSongSung()
 {
     CSongs.ResetPartySongSung();
 }
Example #9
0
 public void AddPartySongSung(int songID)
 {
     CSongs.AddPartySongSung(songID);
 }
Example #10
0
 public CCategory GetCategory(int index)
 {
     return(CSongs.GetCategoryByIndex(index));
 }
Example #11
0
 public CSong GetSongByID(int songID)
 {
     return(CSongs.GetSong(songID));
 }
Example #12
0
 public CSong GetVisibleSong(int visibleIndex)
 {
     return(CSongs.GetVisibleSongByIndex(visibleIndex));
 }
Example #13
0
 public void UpdateRandomSongList()
 {
     CSongs.UpdateRandomSongList();
 }
Example #14
0
 public int GetNumSongsNotSungInCategory(int categoryIndex)
 {
     return(CSongs.GetNumSongsNotSungInCategory(categoryIndex));
 }