Exemplo n.º 1
0
        private string MixSortOrderToSongProperty(MixSortOrder mixSortOrder)
        {
            switch (mixSortOrder & MixSortOrder.PROPERTY_MASK)
            {
            case MixSortOrder.ALBUMARTISTNAMESORT:
                return(SongViewModel.Properties.AlbumArtistSortName);

            case MixSortOrder.ALBUMNAMESORT:
                return(SongViewModel.Properties.AlbumSortName);

            case MixSortOrder.ARTISTNAMESORT:
                return(SongViewModel.Properties.ArtistSortName);

            case MixSortOrder.DURATIONSORT:
                return(SongViewModel.Properties.Duration);

            case MixSortOrder.LASTPLAYEDSORT:
                return(SongViewModel.Properties.LastPlayed);

            case MixSortOrder.PLAYCOUNTSORT:
                return(SongViewModel.Properties.PlayCount);

            case MixSortOrder.RATINGSORT:
                return(SongViewModel.Properties.Rating);

            case MixSortOrder.TRACKNAMESORT:
                return(SongViewModel.Properties.SortName);

            default:
                DebugHelper.Assert(new CallerInfo(), mixSortOrder == MixSortOrder.None, "Unexpected mix sort order");
                return(SongViewModel.Properties.SongId);
            }
        }
Exemplo n.º 2
0
 public MixTable(string name, bool isHidden, uint limit, MixSortOrder sortType, bool hasLimit)
 {
     Name     = name;
     IsHidden = isHidden;
     Limit    = limit;
     SortType = sortType;
     HasLimit = hasLimit;
 }
Exemplo n.º 3
0
 private bool MixSortOrderToIsAscending(MixSortOrder mixSortOrder)
 {
     return((mixSortOrder & MixSortOrder.ORDER_MASK) == MixSortOrder.SORTORDER_ASC);
 }