本文整理汇总了C#中Playlist.addItems方法的典型用法代码示例。如果您正苦于以下问题:C# Playlist.addItems方法的具体用法?C# Playlist.addItems怎么用?C# Playlist.addItems使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Playlist
的用法示例。
在下文中一共展示了Playlist.addItems方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Execute
//.........这里部分代码省略.........
}
else
{
((IWMPPlaylistCollection)Player.playlistCollection).remove(mod_playlist);
opResult.ContentText = "Playlist " + mod_playlist + " deleted.";
}
opResult.StatusCode = OpStatusCode.Success;
}
else
{
opResult.StatusCode = OpStatusCode.BadRequest;
opResult.StatusText = "Playlist does not exist!";
}
}
else
{
opResult.StatusCode = OpStatusCode.BadRequest;
opResult.StatusText = "Must specify the exact playlist!";
}
return opResult;
case LIST_DETAILS:
// Get query as a playlist
if (playlist_query != null)
{
//Return a specific playlist when music-list-details with exact-playlist is queried
playlists = getUserPlaylistsByName(playlist_query, playlistCollection);
if (playlists.count > 0)
{
Playlist aPlaylist = new Playlist(playlist_query);
mediaPlaylist = playlists.Item(0);
//Or return a playlist query
if (mediaPlaylist != null)
{
aPlaylist.addItems(mediaPlaylist);
}
metadata.playlists.Add(aPlaylist);
}
}
else if (has_exact_query)
{
mediaPlaylist = getPlaylistFromExactQuery(query_text, query_type, collection);
}
else if (has_query)
{
string type = getSortAttributeFromQueryType(query_type);
mediaPlaylist = collection.getPlaylistByQuery(query, "Audio", type, true);
}
if (mediaPlaylist != null)
{
//Create playlist from query if supplied with playlist name
if (create_playlist_name != null)
{
add_to_playlist(opResult, has_query, mediaPlaylist, create_playlist_name);
return opResult;
}
else if (query_indexes.Count > 0)
{
for (int j = 0; j < query_indexes.Count; j++)
{
media_item = mediaPlaylist.get_Item((Int16)query_indexes[j]);
if (media_item != null)
{
metadata.addSong(media_item);
}
}