コード例 #1
0
        public Channel GetNextSiblingChannel()
        {
            ChannelFolder parentChannel = this.Parent;

            if (parentChannel != null)
            {
                int pos = parentChannel.ChannelList.IndexOf(this);
                if (pos >= 0 && pos < parentChannel.ChannelList.Count - 1)
                {
                    return(parentChannel.ChannelList[pos + 1]);
                }
            }
            return(null);
        }
コード例 #2
0
        public Channel GetPreviousSiblingChannel()
        {
            ChannelFolder parentChannel = this.Parent;

            if (parentChannel != null)
            {
                int pos = parentChannel.ChannelList.IndexOf(this);
                if (pos > 0)
                {
                    return(parentChannel.ChannelList[pos - 1]);
                }
            }
            return(null);
        }