Posts
[Visual Studio][C#]Visual Studio Achievements API
namespace AchievementsAPIDemo { public partial class Form1 : Form { public Form1() { InitializeComponent(); }
private string GetHTMLSourceCode(string url) { HttpWebRequest request = (WebRequest.Create(url)) as HttpWebRequest; HttpWebResponse response = request.GetResponse() as HttpWebResponse; using (StreamReader sr = new StreamReader(response.GetResponseStream())) { return sr.ReadToEnd(); } } private void Form1_Load(object sender, EventArgs e) { var obj = new VSAchievements.Achievement(GetHTMLSourceCode("http://channel9.msdn.com/achievements/visualstudio?json=true")); foreach (var achievement in obj.Achievements) { flowLayoutPanel1.Controls.Add(new PictureBox() { ImageLocation = achievement.IconSmall }); flowLayoutPanel1.Controls.Add(new Label() { Text = achievement.
read more