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); }
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); }