Exemplo n.º 1
0
 private int SortByArtist(SongListItem first, SongListItem second)
 {
     if (StartsWithSymbol(first.Song.Artist) && !StartsWithSymbol(second.Song.Artist))
     {
         return(-1);
     }
     if (StartsWithSymbol(second.Song.Artist) && !StartsWithSymbol(first.Song.Artist))
     {
         return(1);
     }
     if (StartsWithSymbol(first.Song.Artist) && StartsWithSymbol(second.Song.Artist))
     {
         return(0);
     }
     return(String.CompareOrdinal(first.Song.Artist, second.Song.Artist));
 }
Exemplo n.º 2
0
 private int SortByLength(SongListItem first, SongListItem second)
 {
     return(first.Song.PlayableLength.CompareTo(second.Song.PlayableLength));
 }
Exemplo n.º 3
0
 private int SortByBpm(SongListItem first, SongListItem second)
 {
     return(first.Song.StartBPM.CompareTo(second.Song.StartBPM));
 }