示例#1
0
        public Form2(long userId, int postsValue)
        {
            InitializeComponent();

            UserList userList = MyParseJSON.ParseUser(VkChaterer.GetUser(userId));

            textBox1.Text = userList.UserResponse[0].first_name;
            textBox2.Text = userList.UserResponse[0].last_name;
            textBox3.Text = postsValue.ToString();
        }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            FriendList friendList = MyParseJSON.ParseFriendList(VkChaterer.GetFriends(_userId));

            //находим самого активного друга по постам
            foreach (FriendResponse response in friendList.response)
            {
                FriendWall friendWall = MyParseJSON.ParseFriendWall(VkChaterer.GetPosts(response.user_id));
                friendWall.user_id = response.user_id;
                if (_max < friendWall.count)
                {
                    _max = friendWall.count;
                    _mostActiveFriendId = friendWall.user_id;
                }
            }
            _answer = new Form2(_mostActiveFriendId, _max);
            _answer.Show();
        }