//削除ボタンを利用するならこっち 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; } }
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 = ""; }); }
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 = "ニコレポ取得完了"; }); }