• WPF Get jiayuan outbox list(send mail box)


     
    1. Request URL:
      http://www.jiayuan.com/msg/outbox/list.php
    2. Request Method:
      POST

       form data:

    3. type=all&page=1
    4. --------------------------------------------------------------
    pasting

    using System;

    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Data;
    using System.Windows.Documents;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Imaging;
    using System.Windows.Shapes;
    using Newtonsoft.Json;
    namespace wgscd
    {
        /// <summary>
        /// Interaction logic for TestWindow1.xaml
        /// </summary>
        public partial class TestWindow1 : Window
        {
            public TestWindow1()
            {
                InitializeComponent();
                listData = new List<string>();
                listData = GetData();
                list.ItemsSource = listData;
            }
            List<string> listData;
            public List<string> GetData()
            {
                List<string> listUser = new List<string>();
                InboxData d = JsonConvert.DeserializeObject<InboxData>(Properties.Resources.json);
                foreach (var u in d.data)
                {
                    listUser.Add(u.desc);
                    string uid = u.uid;
                    string age = u.desc.Substring(0, 2);
                    string from = u.desc.Split(",".ToCharArray())[2];
                }
                return listUser;
            }
        }
        public class InboxData
        {
            public string recode { get; set; }
            public string total { get; set; }
            public Data[] data { get; set; }
        }
        public class Data
        {
            public string uid { get; set; }
            public string nickname { get; set; }
            public string sex { get; set; }
            public string desc { get; set; }
        }
    }
  • 相关阅读:
    【水题递归】【HDU2044】我大沙茶了
    【小知识+小细节】不断更新ing...
    【数学三角恒等变幻】【HDU2552】三足鼎立
    【set&&sstream||floyed判环算法】【UVa 11549】Calculator Conundrum
    【CCTYPE函数系列】
    【输入输出挂】【Uva11462】Age Sort
    【树形贪心】【UVA1267】Network
    【贪心】【uva11520】 Fill the Square
    动态规划uva12563
    紫书ch9 uva12563
  • 原文地址:https://www.cnblogs.com/wgscd/p/8694834.html
Copyright © 2020-2023  润新知