Пример #1
0
 private void refreshListWithNewestPosts(ListView view, Subreddit sub,  ref List<Post> posts)
 {
     view.Items.Clear();
     posts.Clear();
     Debug.WriteLine(sub);
     foreach (var post in sub.Hot.Take(15))
     {
         posts.Add(post);
         if (sub.ToString() == "/r/Front Page")
         {
             view.Items.Add(new ListViewItem(new[] { post.Title, post.SubredditName, post.Score.ToString() }));
         }
         else
         {
             view.Items.Add(new ListViewItem(new[] { post.Title, post.Score.ToString() }));
         }
     }
     updateStatusBarLabels();
 }