| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 756 人关注过本帖
标题:自己c#写的程序:豆瓣电台桌面 可歌曲下载,歌词同步,历史记录,红心列表管 ...
只看楼主 加入收藏
bei612
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2012-11-29
收藏
 问题点数:0 回复次数:3 
自己c#写的程序:豆瓣电台桌面 可歌曲下载,歌词同步,历史记录,红心列表管理
http://vdisk.
悲剧。。。没法上图???
看这个哇。。。
http://ww4.
http://
比官方的多了歌词同步显示,歌曲下载,红心频道,历史记录等

第一次写一个比较完整的程序。。。
如果大家有兴趣我
程序代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using using System.Web;
using System.Collections;
using System.Web.Script.Serialization;
using System.Diagnostics;
using System.Threading;
using using System.Text;

namespace Post数据流到HTTP地址
{
  
    static class Program
    {
     
        public static string ck;
        public static Cookie co;
        public static CookieContainer cc = new CookieContainer();
        
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            var LoginForm = new Form1();
            if (LoginForm.ShowDialog() == DialogResult.OK) //在FORM1的78行定义了 this.DialogResult = System.Windows.Forms.DialogResult.OK;
            {
                Application.Run(new Form2(LoginForm.认证信息实例));
            }
          
          
        }
       

//生成数字随机数
        public static string random_10(int length)
   {
      string result = "";
      System.Random random = new Random();
        for (int i = 0; i < length; i++)
       {
            result += random.Next(10).ToString();
       }
       return result;
    }
       

        public static string HttpGet(string 请求url)
        {
            string 序列;
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(请求url);
            request.UserAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)";
              request.CookieContainer = cc;
             //request.Timeout = 5000;
             HttpWebResponse response = (HttpWebResponse)request.GetResponse();
             StreamReader sr = new StreamReader(response.GetResponseStream(), Encoding.UTF8);
             序列 = sr.ReadToEnd();
             sr.Close();
             return 序列;
       
        }
public class play_record
    {
        public string liked { get; set; }
        public string banned { get; set; }
        public string played { get; set; }
    }
    public class user_info
    {
        public string ck { get; set; }
        public string name { get; set; }
        public string url { get; set; }
        public string third_party_info { get; set; }
        public play_record play_record { get; set; }
        public string is_dj { get; set; }
        public string id { get; set; }
    }
    public class 验证信息
    {
        public string err_msg { get;set; }
         public  user_info user_info{ get; set; }
         public string r { get; set; }
  
    }
    public class songs
    {
        public string channel { get; set; }
        public string picture { get; set; }
        public string albumtitle { get; set; }
        public string album { get; set; }
        public string company { get; set; }
        public string rating_avg { get; set; }
        public string public_time { get; set; }
        public string ssid { get; set; }
        public string like { get; set; }
        public string artist { get; set; }
        public string url { get; set; }
        public string subtype { get; set; }
        public string title { get; set; }
        public string length { get; set; }
        public string sid { get; set; }
        public string aid { get; set; }
    }
    public class 豆瓣电台类
    {
        public string r { get; set; }
        public List<songs> song
        {
            get;
            set;
        }
    }
    public class channel
    {
        public string name { get; set; }
        public string seq_id { get; set; }
        public string abbr_en { get; set; }
        public string channel_id { get; set; }
        public string name_en { get; set; }
    }
    public class 豆瓣频道类
    {
        public List<channel> channels { get; set; } //和JSON一致
    }
就把源码也放出来

搜索更多相关主题的帖子: 歌曲下载 历史记录 桌面 
2012-11-29 13:50
zhaoxili
Rank: 6Rank: 6
等 级:侠之大者
威 望:1
帖 子:327
专家分:479
注 册:2009-1-3
收藏
得分:0 
看起来不错的啊 呵呵 支持了
2012-11-29 21:04
qiang___
Rank: 2
等 级:论坛游民
帖 子:9
专家分:44
注 册:2012-10-4
收藏
得分:0 
有兴趣的说
2012-11-29 22:05
蝉鸣后又初雪
Rank: 1
来 自:湖北省荆门市
等 级:新手上路
帖 子:1
专家分:0
注 册:2012-11-30
收藏
得分:0 
   真赞!我才刚开始学C#,自己能写几个简单的小程序就好高兴,看来我要加油,嘿嘿,,
2012-11-30 19:27
快速回复:自己c#写的程序:豆瓣电台桌面 可歌曲下载,歌词同步,历史记录,红心 ...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.022859 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved