protected async override void OnNavigatedTo(NavigationEventArgs e) { Windows.UI.Core.SystemNavigationManager.GetForCurrentView().BackRequested += _BackRequested; var userAccessToken = (UserAccessToken)e.Parameter; column = new TweetColumn(userAccessToken.accessToken, userAccessToken.screenName); mainGrid.DataContext = column; await column.Run(); var tokens = TmpUserData.Accounts; RetweetUserListBox.DataContext = tokens; }
private async void SearchButtonClicked(object sender, RoutedEventArgs e) { var word = SearchWordBox.Text; if (!string.IsNullOrEmpty(word)) { StoreSettings setting = new StoreSettings(); var count = setting.TryGetValueWithDefault("TweetCount", 50); column = new TweetColumn(users[SearchUserSelect.SelectedIndex].accessToken, TweetColumn.ColumnRoles.Search); TweetListItemsControl.DataContext = column.tweetList; try { await column.GetSearchResultTimeline(word, count, null); } catch (Exception ex) { var message = new MessageDialog(ex.Message, "おや?何かがおかしいようです。"); await message.ShowAsync(); } } else { } }