public async void PlayMv(MVData mVData) { mvt.Interval = 1000; mvt.Tick += Mvt_Tick; MVplaying = true; Title = mVData.name; MvPlay_Tb.Text = mVData.name; MvPlay_Tb.Uid = mVData.id; MvPlay_Desc.Text = await MusicLib.GetMVDesc(mVData.id); MvPlay_ME.Source = new Uri(await MusicLib.GetMVUrl(mVData.id)); MvPlay_ME.Play(); mvpath.Data = Geometry.Parse(mvpause); mvt.Start(); //加载评论 List <MusicPL> data = await MusicLib.GetMVPL(MvPlay_Tb.Uid); MVPlList.Children.Clear(); foreach (var dt in data) { MVPlList.Children.Add(new PlControl(dt) { Margin = new Thickness(10, 0, 0, 20) }); } Activate(); Topmost = false; double ps = ActualWidth / MvPlay_ME.NaturalVideoWidth; MV.Height = MvPlay_ME.NaturalVideoHeight * ps; }
private void Mvplay_plps_MouseDown(object sender, MouseButtonEventArgs e) { if (MVplaying) { MVplaying = false; MvPlay_ME.Pause(); mvpath.Data = Geometry.Parse(mvplay); } else { MVplaying = true; MvPlay_ME.Play(); mvpath.Data = Geometry.Parse(mvpause); } }