Exemple #1
0
 public void Initialize()
 {
     IsActive     = true;
     IsEmpty      = false;
     NextPageTime = null;
     UnFilteredNicoRepoList.Clear();
     NicoRepoList.Clear();
     GetMore();
 }
Exemple #2
0
        public async void Initialize()
        {
            IsActive = true;
            Status   = "ニコレポリストを取得中";
            NicoRepoList.Clear();
            NicoRepoList.Add(new NicoRepoResultViewModel("すべて", "all", NicoRepoInstance));
            NicoRepoList.Add(new NicoRepoResultViewModel("自分", "myself", NicoRepoInstance));
            NicoRepoList.Add(new NicoRepoResultViewModel("フォロー中のユーザー", "user", NicoRepoInstance));
            NicoRepoList.Add(new NicoRepoResultViewModel("チャンネル&コミュニティ", "chcom", NicoRepoInstance));
            NicoRepoList.Add(new NicoRepoResultViewModel("マイリスト", "mylist", NicoRepoInstance));

            Status   = "";
            IsActive = false;
        }
Exemple #3
0
        public void FilterNicoRepo()
        {
            switch (Filter)
            {
            case "すべて":
                NicoRepoList.Clear();
                foreach (var raw in UnFilteredNicoRepoList)
                {
                    NicoRepoList.Add(raw);
                }
                break;

            case "動画投稿のみ":

                NicoRepoList.Clear();
                var video = UnFilteredNicoRepoList.Where((e) => ((NicoRepoResultEntryViewModel)e).Item.Title.Contains("動画を投稿しました。"));

                foreach (var raw in video)
                {
                    NicoRepoList.Add(raw);
                }
                break;

            case "生放送開始のみ":

                NicoRepoList.Clear();
                var live = UnFilteredNicoRepoList.Where(e => ((NicoRepoResultEntryViewModel)e).Item.Title.Contains("生放送を開始しました。"));
                foreach (var raw in live)
                {
                    NicoRepoList.Add(raw);
                }
                break;

            case "マイリスト登録のみ":

                NicoRepoList.Clear();
                var mylist = UnFilteredNicoRepoList.Where(e => ((NicoRepoResultEntryViewModel)e).Item.Title.Contains("マイリスト登録しました。"));

                foreach (var raw in mylist)
                {
                    NicoRepoList.Add(raw);
                }
                break;
            }
            if (!IsEnd)
            {
                NicoRepoList.Add(new NicoRepoNextButtonEntryViewModel(this));
            }
        }