示例#1
0
        /// <summary>
        /// 获取初始兆赫
        /// </summary>
        /// <returns>返回初始兆赫</returns>
        public ChannelEntity GetInitChannel()
        {
            string           getData   = WebConnection.GetCommand("http://douban.fm/j/explore/hot_channels?start=0&limit=1");
            GetChannelResult getResult = GetChannelResult.Json2Object(getData);

            return(getResult.Data.Channels[0]);
        }
示例#2
0
        /// <summary>
        /// 获取兆赫列表
        /// </summary>
        /// <param name="url">Url</param>
        private void GetChannels(string url)
        {
            channelInfo = null;
            string           getData   = WebConnection.GetCommand(url);
            GetChannelResult getResult = GetChannelResult.Json2Object(getData);

            if (getResult == null || getResult.Status == false)
            {
                isChanneLoadFailed = true;
            }
            else
            {
                channelInfo      = getResult.Data;
                isChannelChanged = true;
            }
        }