Пример #1
0
        private void LoadLocalVideoList()
        {
            fullScreen_Click(null, null);
            Binding videos = new Binding();

            videos.Path = new PropertyPath("DownedVideo");
            AllDramas.SetBinding(ListBox.ItemsSourceProperty, videos);
            App.PlayerModel.VideoStyleType        = "2";
            App.PlayerModel.CurrentDefinitionName = "本地";
            int index = -1;

            for (int i = 0; i < AllDramas.Items.Count; i++)
            {
                DownVideoInfoViewMoel info = AllDramas.Items[i] as DownVideoInfoViewMoel;
                if (info != null && info.VideoId == App.PlayerModel.VideoId)
                {
                    index = i;
                    break;
                }
            }
            if (AllDramas.Items.Count > 0)
            {
                AllDramas.SelectedIndex = index;
            }
        }
Пример #2
0
 private void DramaItem_Loaded(object sender, RoutedEventArgs e)
 {
     if (App.PlayerModel.currentType == PlayerViewModel.PlayType.LoaclType)
     {
         LoadLocalVideoList();
     }
     else
     {
         Binding videos = new Binding();
         videos.Path = new PropertyPath("AllDramas");
         AllDramas.SetBinding(ListBox.ItemsSourceProperty, videos);
         App.PlayerModel.LoadedDramaItem();
     }
     //UrlList.
 }