Example #1
0
        private void TrendsTab_OnSelected(object sender, RoutedEventArgs e)
        {
            QueryStartUp();
            MessageQueue.Enqueue(AkaI18N.SearchingTrends);

            PixivHelper.Enumerate(new TrendsAsyncEnumerable(), NewItemsSource <Trends>(TrendsListView), 20);
        }
Example #2
0
        private void UpdateIllustTab_OnSelected(object sender, RoutedEventArgs e)
        {
            QueryStartUp();
            MessageQueue.Enqueue(AkaI18N.SearchingUserUpdates);

            PixivHelper.Enumerate(new UserUpdateAsyncEnumerable(), NewItemsSource <Illustration>(ImageListView));
        }
Example #3
0
        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);
        }
Example #4
0
        private void SpotlightTab_OnSelected(object sender, RoutedEventArgs e)
        {
            QueryStartUp();

            var iterator = new SpotlightQueryAsyncEnumerable(Settings.Global.SpotlightQueryStart);

            PixivHelper.Enumerate(iterator, NewItemsSource <SpotlightArticle>(SpotlightListView), 10);
        }
Example #5
0
 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);
 }
Example #6
0
 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));
     }
 }
Example #7
0
        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);
        }
Example #8
0
 private void SetupUserGallery(string id)
 {
     PixivHelper.Enumerate(AbstractGalleryAsyncEnumerable.Of(id, RestrictPolicy.Public),
                           NewItemsSource <Illustration>(UserIllustsImageListView));
 }
Example #9
0
 private void SetupUserUploads(string id)
 {
     PixivHelper.Enumerate(new UploadAsyncEnumerable(id),
                           NewItemsSource <Illustration>(UserIllustsImageListView));
 }
Example #10
0
 private void TryQueryUser(string keyword)
 {
     QueryStartUp();
     SearchingHistoryManager.EnqueueSearchHistory(keyword);
     PixivHelper.Enumerate(new UserPreviewAsyncEnumerable(keyword), NewItemsSource <User>(UserPreviewListView));
 }