public HistoryThreadsFlipModel(FlipView MainFlip) { this.MainFlip = MainFlip; threadList = new ObservableCollection <Thread>(); Role = ItaListPageViewModel.FlipRole.ThreadList; var store = new StoreToFiles(); store.LoadThreads(threadList); }
public async Task Refresh() { var store = new StoreToFiles(); var client = new My2chClient(); foreach (var thread in threadList) { try { var posts = await client.GetFullPostList(thread); await store.AddPostsWithMidokuCount(posts, thread); } catch (Exception ex) { var dialog = new MessageDialog(thread.Name + ": " + ex.Message, "スレッドの更新に失敗しました。"); await dialog.ShowAsync(); } } store.LoadThreads(threadList); }