예제 #1
0
        private void SaveChannelsForCurrentGroup()
        {
            if (_savingNeeded)
            {
                _savingNeeded = false;

                Guid[] channelIds;
                if (_channelsInGroupList != null && _channelsInGroupList.Count > 0)
                {
                    channelIds = new Guid[_channelsInGroupList.Count];
                    for (int i = 0; i < _channelsInGroupList.Count; i++)
                    {
                        Channel channel = _channelsInGroupList[i].TVTag as Channel;
                        channelIds[i] = channel.ChannelId;
                    }
                }
                else
                {
                    channelIds = new Guid[0];
                }

                if (_currentGroup != null)
                {
                    SchedulerAgent.SetChannelGroupMembers(_currentGroup.ChannelGroupId, channelIds);
                }
            }
        }