예제 #1
0
 private IWMPPlaylist getPlaylistFromExactQuery(string query_text, string query_type, IWMPMediaCollection2 collection)
 {
     if (query_type.Equals("Album"))
     {
         return collection.getByAlbum(query_text);
     }
     else if (query_type.Equals("Album Artist"))
     {
         return collection.getByAttribute("WM/AlbumArtist", query_text);
     }
     else if (query_type.Equals("Artist"))
     {
         return collection.getByAuthor(query_text);
     }
     else if (query_type.Equals("Genre"))
     {
         return collection.getByGenre(query_text);
     }
     else if (query_type.Equals("Song"))
     {
         return collection.getByName(query_text);
         //mediaPlaylist = collection.getByAttribute("Title", query_text);
     }
     return null;
 }