Ejemplo n.º 1
0
        public static void AddPodcastToSubscriptionView(ISubscriptionView subscriptionView, Podcast podcast)
        {
            var podcastNode = new TreeNode(podcast.Title)
            {
                Tag = podcast, Name = podcast.Id.ToString()
            };

            foreach (var episode in podcast.Episodes)
            {
                podcastNode.Nodes.Add(new TreeNode(episode.Title)
                {
                    Tag = episode, Name = episode.Guid
                });
            }
            subscriptionView.AddNode(podcastNode);
        }
        private void AddPodcastToTreeView(Podcast pod)
        {
            var podNode = new TreeNode(pod.Title)
            {
                Tag = pod
            };

            _subscriptionView.AddNode(podNode);
            foreach (var episode in pod.Episodes)
            {
                podNode.Nodes.Add(new TreeNode(episode.Title)
                {
                    Tag = episode
                });
            }
        }
Ejemplo n.º 3
0
        private void AddPodcastToTreeView(Podcast podcast)
        {
            var podNode = new TreeNode(podcast.Title)
            {
                Tag = podcast, Name = podcast.Id.ToString()
            };

            foreach (var episode in podcast.Episodes)
            {
                podNode.Nodes.Add(new TreeNode(episode.Title)
                {
                    Tag = episode, Name = episode.Guid
                });
            }

            subscriptionView.AddNode(podNode);
        }
        public void AddPodcastToTreeView(Podcast podcast)
        {
            var podNode = new TreeNode(podcast.Title)
            {
                Tag = podcast, Name = podcast.Id.ToString()
            };

            foreach (var episode in podcast.Episodes)
            {
                podNode.Nodes.Add(new TreeNode(episode.Title)
                {
                    Tag = episode, Name = episode.Guid
                });
            }

            subscriptionView.AddNode(podNode);
            if (subscriptionView.SelectedNode == null)
            {
                subscriptionView.SelectNode(podNode.FirstNode.Name);
            }
        }