Inheritance: Livet.NotificationObject
        //ニコレポリストを開く
        public void OpenNicoRepoList()
        {
            DispatcherHelper.UIDispatcher.BeginInvoke(new Action(() => Result.IsActive = true));

            NicoRepoVM.Status = "ニコレポ取得中(" + Name + ")";

            Task.Run(() => {

                Result.OwnerViewModel = this;
                Result.NicoRepo.Clear();

                NicoRepo = new NicoNicoNicoRepo(Id);

                IList<NicoNicoNicoRepoDataEntry> data = NicoRepo.GetNicoRepo();

                foreach(NicoNicoNicoRepoDataEntry entry in data) {

                    Result.NicoRepo.Add(new NicoRepoResultEntryViewModel(entry, this));
                }

                NicoRepoVM.Status = "ニコレポ取得完了(" + Name + ")";

                Result.IsActive = false;
            });
        }
Ejemplo n.º 2
0
        //ニコレポリストを開く UIスレッドで呼んではいけない
        public void OpenNicoRepoList()
        {
            Result.IsActive = true;

            NicoRepoVM.Status = "ニコレポ取得中(" + Name + ")";

            Result.OwnerViewModel = this;
            Result.NicoRepo.Clear();

            NicoRepo = new NicoNicoNicoRepo(Id);

            RawData = NicoRepo.GetNicoRepo();

            if(RawData == null) {

                NicoRepoVM.Status = "ニコレポ(" + Name + ") の取得に失敗しました";
                Result.IsActive = false;
                return;
            }

            foreach(var entry in RawData) {

                Result.NicoRepo.Add(new NicoRepoResultEntryViewModel(entry, this));
            }

            Result.IsActive = false;
        }