Example #1
0
        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));
        }
Example #2
0
 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);
     }
 }
Example #3
0
 public TantanDialog()
 {
     this.InitializeComponent();
     tantan = new TanTanPlay();
 }