Пример #1
0
        private async void GetVideosRequest()
        {
            try
            {
                List <Video> videoList = new List <Video>();
                VideoModel   model     = await App.Client.GetVideos();

                if (model.status == "true")
                {
                    for (int i = 0; i < model.feeds.Count; i++)
                    {
                        var video = new Models.Video()
                        {
                            id       = model.feeds[i].id,
                            priority = model.feeds[i].priority,
                            video    = model.feeds[i].video,
                            splash   = model.filebase + model.feeds[i].splash,
                            link     = model.feeds[i].link,
                            active   = model.feeds[i].active
                        };

                        videoList.Add(video);
                    }

                    videoListView.ItemsSource = videoList;
                }
            }

            catch (Exception)
            {
            }
        }
Пример #2
0
        private void videoListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            page = "Video";

            Models.Video item = videoListView.SelectedItem as Models.Video;
            if (item == null)
            {
                return;
            }
            Frame.Navigate(typeof(VideoDetailsView), item.link);
        }