コード例 #1
0
        private void addChannel(YoutubeChannelItem channelItem)
        {
            YoutubeChannelNodeState state = new YoutubeChannelNodeState(channelItem);
            YoutubeChannelNode      node  = new YoutubeChannelNode(state);

            lock (channelLock)
            {
                Children.Add(node);
                Properties.Settings.Default.YoutubeChannels.Add(state);
            }
        }
コード例 #2
0
        private void addChannel(YoutubeChannelItem channelItem)
        {
            YoutubeChannelNodeState state = new YoutubeChannelNodeState(channelItem);
            YoutubeChannelNode node = new YoutubeChannelNode(state);

            lock (channelLock)
            {
                Children.Add(node);                
                Properties.Settings.Default.YoutubeChannels.Add(state);
            }  
           
        }
コード例 #3
0
        public YoutubeChannelNode(YoutubeChannelNodeState state) :
            base("pack://application:,,,/YoutubePlugin;component/Resources/Icons/channel.ico")
        {
            State = state;

            Name      = State.Info.Snippet.Title;
            ChannelId = State.Info.Snippet.ChannelId;

            toolTip  = State.Info.Snippet.Description;
            NrVideos = 0;

            Children.Add(new YoutubeChannelVideosNode(ChannelId));
            Children.Add(new YoutubeChannelPlaylistsNode(ChannelId));

            if (State.Statistics != null)
            {
                (Children[0] as YoutubeChannelVideosNode).NrVideos = State.Statistics.VideoCount;
            }
        }
コード例 #4
0
        public YoutubeChannelNode(YoutubeChannelNodeState state) :
            base("pack://application:,,,/YoutubePlugin;component/Resources/Icons/channel.ico")
        {
            State = state;

            Name = State.Info.Snippet.Title;
            ChannelId = State.Info.Snippet.ChannelId;          

            toolTip = State.Info.Snippet.Description;
            NrVideos = 0;

            Children.Add(new YoutubeChannelVideosNode(ChannelId));
            Children.Add(new YoutubeChannelPlaylistsNode(ChannelId));

            if (State.Statistics != null)
            {
                (Children[0] as YoutubeChannelVideosNode).NrVideos = State.Statistics.VideoCount;
            }
        }