Esempio n. 1
0
        private void btnSearch_Click(object sender, RoutedEventArgs e)
        {
            YouTubeSearcher searcher = new YouTubeSearcher();

            SearchResult = searcher.Search(this.txtKeyword.Text);
            this.VideoList.ItemsSource = SearchResult;
        }
Esempio n. 2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            var tvSearch  = FindViewById <TextView> (Resource.Id.editText1);
            var btnSearch = FindViewById <Button> (Resource.Id.button1);

            listview = FindViewById <ListView>(Resource.Id.listViewMain);

            btnSearch.Click += (sender, e) => {
                var searcher = new YouTubeSearcher();
                entrys = searcher.Search(tvSearch.Text);
                foreach (Entry en in entrys)
                {
                    en.pic = GetImageBitmapFromUrl(en.Thumbnail);
                }
                listview.Adapter    = new EntryAdapter(this, entrys);
                listview.ItemClick += (senderobj, e2) => {
                    var intent = new Intent(Intent.ActionView, Android.Net.Uri.Parse(entrys[e2.Position].Link));
                    StartActivity(intent);
                };
            };
        }
Esempio n. 3
0
 public override void ViewDidLoad()
 {
     base.ViewDidLoad();
     this.BtnSearch.SearchButtonClicked += (obj, e) =>
     {
         YouTubeSearcher searcher = new YouTubeSearcher();
         SearchResult          = searcher.Search(this.BtnSearch.Text);
         this.TblResult.Source = new DataSource(this, SearchResult);
         this.TblResult.ReloadData();
         this.BtnSearch.ResignFirstResponder();
     };
 }
Esempio n. 4
0
 public override void ViewDidLoad()
 {
     base.ViewDidLoad ();
     this.BtnSearch.SearchButtonClicked += (obj, e) =>
     {
         YouTubeSearcher searcher = new YouTubeSearcher();
         SearchResult = searcher.Search(this.BtnSearch.Text);
         this.TblResult.Source = new DataSource(this, SearchResult);
         this.TblResult.ReloadData();
         this.BtnSearch.ResignFirstResponder();
     };
 }
Esempio n. 5
0
 private void btnSearch_Click(object sender, RoutedEventArgs e)
 {
     YouTubeSearcher searcher = new YouTubeSearcher();
     SearchResult = searcher.Search(this.txtKeyword.Text);
     this.VideoList.ItemsSource = SearchResult;
 }