private void TrendsTab_OnSelected(object sender, RoutedEventArgs e) { QueryStartUp(); MessageQueue.Enqueue(AkaI18N.SearchingTrends); PixivHelper.Enumerate(new TrendsAsyncEnumerable(), NewItemsSource <Trends>(TrendsListView), 20); }
private void UpdateIllustTab_OnSelected(object sender, RoutedEventArgs e) { QueryStartUp(); MessageQueue.Enqueue(AkaI18N.SearchingUserUpdates); PixivHelper.Enumerate(new UserUpdateAsyncEnumerable(), NewItemsSource <Illustration>(ImageListView)); }
private void RecommendTab_OnSelected(object sender, RoutedEventArgs e) { QueryStartUp(); MessageQueue.Enqueue(AkaI18N.SearchingRecommend); PixivHelper.Enumerate(Settings.Global.SortOnInserting ? (AbstractRecommendAsyncEnumerable) new PopularityRecommendAsyncEnumerable() : new PublishDateRecommendAsyncEnumerable(), NewItemsSource <Illustration>(ImageListView), 10); }
private void SpotlightTab_OnSelected(object sender, RoutedEventArgs e) { QueryStartUp(); var iterator = new SpotlightQueryAsyncEnumerable(Settings.Global.SpotlightQueryStart); PixivHelper.Enumerate(iterator, NewItemsSource <SpotlightArticle>(SpotlightListView), 10); }
private void QueryWorks(string keyword) { QueryStartUp(); SearchingHistoryManager.EnqueueSearchHistory(keyword); PixivHelper.Enumerate(Settings.Global.SortOnInserting ? (AbstractQueryAsyncEnumerable) new PopularityQueryAsyncEnumerable(keyword, Settings.Global.TagMatchOption, Session.Current.IsPremium, Settings.Global.QueryStart) : new PublishDateQueryAsyncEnumerable(keyword, Settings.Global.TagMatchOption, Session.Current.IsPremium, Settings.Global.QueryStart), NewItemsSource <Illustration>(ImageListView), Settings.Global.QueryPages); }
private void PublicRestrictPolicy_OnChecked(object sender, RoutedEventArgs e) { if (!IsLoaded) { return; } if (Navigating(GalleryTab)) { MessageQueue.Enqueue(AkaI18N.SearchingGallery); PixivHelper.Enumerate(AbstractGalleryAsyncEnumerable.Of(Session.Current.Id, RestrictPolicy.Public), NewItemsSource <Illustration>(ImageListView)); } else if (Navigating(FollowingTab)) { MessageQueue.Enqueue(AkaI18N.SearchingFollower); PixivHelper.Enumerate(AbstractUserFollowingAsyncEnumerable.Of(Session.Current.Id, RestrictPolicy.Public), NewItemsSource <User>(UserPreviewListView)); } }
private void GetRanking() { var option = RankOptionPicker.SelectedItem.GetDataContext <RankOptionModel[]>().First(p => p.IsSelected); var dateTime = RankDatePicker.SelectedDate; if (option.Corresponding.AttributeAttached <ForR18Only>() && Settings.Global.ExcludeTag.Any(t => t.ToUpper() == "R-18" || t.ToUpper() == "R-18G")) { MessageQueue.Enqueue(AkaI18N.RankNeedR18On); NewItemsSource <Illustration>(ImageListView); return; } if (dateTime is { } time) { PixivHelper.Enumerate(new RankingAsyncEnumerable(option.Corresponding, time), NewItemsSource <Illustration>(ImageListView)); return; } MessageQueue.Enqueue(AkaI18N.RankDateCannotBeNull); }
private void SetupUserGallery(string id) { PixivHelper.Enumerate(AbstractGalleryAsyncEnumerable.Of(id, RestrictPolicy.Public), NewItemsSource <Illustration>(UserIllustsImageListView)); }
private void SetupUserUploads(string id) { PixivHelper.Enumerate(new UploadAsyncEnumerable(id), NewItemsSource <Illustration>(UserIllustsImageListView)); }
private void TryQueryUser(string keyword) { QueryStartUp(); SearchingHistoryManager.EnqueueSearchHistory(keyword); PixivHelper.Enumerate(new UserPreviewAsyncEnumerable(keyword), NewItemsSource <User>(UserPreviewListView)); }