コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: artszys/Pixeval
        private void TrendsTab_OnSelected(object sender, RoutedEventArgs e)
        {
            QueryStartUp();
            MessageQueue.Enqueue(AkaI18N.SearchingTrends);

            PixivHelper.Enumerate(new TrendsAsyncEnumerable(), NewItemsSource <Trends>(TrendsListView), 20);
        }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: artszys/Pixeval
        private void UpdateIllustTab_OnSelected(object sender, RoutedEventArgs e)
        {
            QueryStartUp();
            MessageQueue.Enqueue(AkaI18N.SearchingUserUpdates);

            PixivHelper.Enumerate(new UserUpdateAsyncEnumerable(), NewItemsSource <Illustration>(ImageListView));
        }
コード例 #3
0
ファイル: MainWindow.xaml.cs プロジェクト: Mo3et/Pixeval
        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);
        }
コード例 #4
0
ファイル: MainWindow.xaml.cs プロジェクト: artszys/Pixeval
        private void SpotlightTab_OnSelected(object sender, RoutedEventArgs e)
        {
            QueryStartUp();

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

            PixivHelper.Enumerate(iterator, NewItemsSource <SpotlightArticle>(SpotlightListView), 10);
        }
コード例 #5
0
ファイル: MainWindow.xaml.cs プロジェクト: artszys/Pixeval
 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);
 }
コード例 #6
0
ファイル: MainWindow.xaml.cs プロジェクト: Mo3et/Pixeval
 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));
     }
 }
コード例 #7
0
ファイル: MainWindow.xaml.cs プロジェクト: Mo3et/Pixeval
        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);
        }
コード例 #8
0
ファイル: MainWindow.xaml.cs プロジェクト: artszys/Pixeval
 private void SetupUserGallery(string id)
 {
     PixivHelper.Enumerate(AbstractGalleryAsyncEnumerable.Of(id, RestrictPolicy.Public),
                           NewItemsSource <Illustration>(UserIllustsImageListView));
 }
コード例 #9
0
ファイル: MainWindow.xaml.cs プロジェクト: artszys/Pixeval
 private void SetupUserUploads(string id)
 {
     PixivHelper.Enumerate(new UploadAsyncEnumerable(id),
                           NewItemsSource <Illustration>(UserIllustsImageListView));
 }
コード例 #10
0
ファイル: MainWindow.xaml.cs プロジェクト: artszys/Pixeval
 private void TryQueryUser(string keyword)
 {
     QueryStartUp();
     SearchingHistoryManager.EnqueueSearchHistory(keyword);
     PixivHelper.Enumerate(new UserPreviewAsyncEnumerable(keyword), NewItemsSource <User>(UserPreviewListView));
 }