private async void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) { if (ResultView.SelectedItem == null) { args.Cancel = true; return; } var data = ResultView.SelectedItem as Episodes; ReturnDanmakus?.Invoke(null, await TanTanPlay.GetDanmakus(data.EpisodeId)); }
private async void SearchBox_QuerySubmitted(AutoSuggestBox sender, AutoSuggestBoxQuerySubmittedEventArgs args) { ErrorBlock.Visibility = Visibility.Collapsed; if (SearchBox.Text.Length == 0) { ShowError("请输入关键字"); return; } try { ResultView.ItemsSource = await TanTanPlay.Search(SearchBox.Text); } catch (Exception ex) { ShowError(ex.Message); } }
public TantanDialog() { this.InitializeComponent(); tantan = new TanTanPlay(); }