private void buttonPost_Click(object sender, EventArgs e) { BusinessLayer2.ProcessPostData(13, (posts) => { foreach (var post in posts) { UpdateUI(post); Task.Delay(1000).Wait(); } }); }
private void buttonUser_Click(object sender, EventArgs e) { BusinessLayer2.ProcessUserData(13, (users) => { foreach (var user in users) { UpdateUI(user); Task.Delay(800).Wait(); } }); }