Inheritance: TabItemViewModel
        //削除ボタンを利用するならこっち
        public NicoRepoResultEntryViewModel(NicoNicoNicoRepoDataEntry entry, NicoRepoListViewModel owner)
        {
            Owner = owner;
            Entry = entry;
            if(entry.IsMyNicoRepo) {

                ShowDeleteButton = true;
            }
        }
 //削除ボタンを利用するならこっち
 public NicoRepoResultEntryViewModel(NicoNicoNicoRepoDataEntry entry, NicoRepoListViewModel owner)
 {
     Owner = owner;
     Entry = entry;
     if (entry.IsMyNicoRepo)
     {
         ShowDeleteButton = true;
     }
 }
Exemplo n.º 3
0
        public void Reflesh()
        {
            Status   = "ニコレポ取得中";
            IsActive = true;
            DispatcherHelper.UIDispatcher.BeginInvoke(new Action(() => NicoRepoListCollection.Clear()));

            Task.Run(() => {
                IList <NicoNicoNicoRepoListEntry> result = NicoRepoList.GetNicoRepoList();

                foreach (NicoNicoNicoRepoListEntry entry in result)
                {
                    NicoRepoListViewModel vm = new NicoRepoListViewModel(this, entry.Title, entry.Id);
                    Status = "ニコレポ取得中(" + vm.Name + ")";
                    vm.OpenNicoRepoList();
                    DispatcherHelper.UIDispatcher.BeginInvoke(new Action(() => NicoRepoListCollection.Add(vm)));
                }


                IsActive = false;

                Status = "";
            });
        }
Exemplo n.º 4
0
        public void Reflesh()
        {
            Status = "ニコレポ取得中";
            IsActive = true;
            DispatcherHelper.UIDispatcher.BeginInvoke(new Action(() => NicoRepoListCollection.Clear()));

            Task.Run(() => {

                IList<NicoNicoNicoRepoListEntry> result = NicoRepoList.GetNicoRepoList();

                foreach(NicoNicoNicoRepoListEntry entry in result) {

                    NicoRepoListViewModel vm = new NicoRepoListViewModel(this, entry.Title, entry.Id);
                    Status = "ニコレポ取得中(" + vm.Name + ")";
                    vm.OpenNicoRepoList();
                    DispatcherHelper.UIDispatcher.BeginInvoke(new Action(() => NicoRepoListCollection.Add(vm)));
                }

                IsActive = false;

                Status = "ニコレポ取得完了";

            });
        }