コード例 #1
0
 public void RemoveSubreddit(Subreddit subreddit)
 {
     Subreddits.Remove(subreddit);
     SaveSubreddits();
     if(subreddit.FriendlyName == GalleryTitle)
     {
         LoadGallery();
     }
 }
コード例 #2
0
 public async void LoadSubreddit(Subreddit subreddit)
 {
     ImageItems = new ObservableCollection<GalleryItem>();
     GalleryTitle = subreddit.FriendlyName;
     var subredditGallery = await Gallery.GetSubreddditGallery(subreddit.Name);
     foreach (var image in subredditGallery)
     {
         ImageItems.Add(new GalleryItem(image));
     }
 }
コード例 #3
0
 public void AddSubreddit(Subreddit subreddit)
 {
     Subreddits.Insert(0, subreddit);
     SaveSubreddits();
 }