当前位置: 首页>>代码示例>>C#>>正文


C# Playlist.addItems方法代码示例

本文整理汇总了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);
                                    }
                                }
开发者ID:RuneHL,项目名称:MceController,代码行数:67,代码来源:musicCmd.cs


注:本文中的Playlist.addItems方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。