private void GetYT(YEUTHICH yt)
 {
     st.Children.Clear();
     videoplay.SetVideoYT(yt);
     st.Children.Add(videoplay);
     filminfo.SetInfoYT(yt);
     st.Children.Add(filminfo);
 }
Exemplo n.º 2
0
 public void SetInfoYT(YEUTHICH video)
 {
     //filminfo = video;
     //DataContext = filminfo;
     txtten.Text      = video.TenVideo;
     txtquocgia.Text  = video.QuocGia;
     txtdaodien.Text  = video.DaoDien;
     txttomtat.Text   = video.TomTat;
     txtluotxem.Text  = video.LuotXem.ToString();
     imgposter.Source = new BitmapImage(new Uri(video.LinkPoster));
 }
 public void SetVideoYT(YEUTHICH yt)
 {
     try
     {
         videoYT          = yt;
         Media.Source     = new Uri(yt.LinkVideo);
         sliderTime.Value = 0;
         GMedia.Height    = 40;
         Media.Play();
     }
     catch
     {
         ////new duong dan ko den được video nào thì xuất hình thông báo lỗi
         //Media.Source = new Uri(@"E:\HoangTrung\LTUDQL2\LTUDQL2---DACK\1660661\01.png");
         //GMedia.Height = 0;
     }
 }