示例#1
0
        public void RemoveChannel(Channel channel)
        {
            if (!channelMap.ContainsKey(channel))
            {
                return;
            }

            ChannelListItem     item = channelMap[channel];
            ChannelListItemFlow flow = getFlowForChannel(channel);

            channelMap.Remove(channel);
            flow.Remove(item);
        }
示例#2
0
文件: ChannelList.cs 项目: Wieku/osu
        public void RemoveChannel(Channel channel)
        {
            if (!channelMap.ContainsKey(channel))
            {
                return;
            }

            ChannelListItem item = channelMap[channel];
            FillFlowContainer <ChannelListItem> flow = getFlowForChannel(channel);

            channelMap.Remove(channel);
            flow.Remove(item);

            updateVisibility();
        }
示例#3
0
        public void AddChannel(Channel channel)
        {
            if (channelMap.ContainsKey(channel))
            {
                return;
            }

            ChannelListItem item = new ChannelListItem(channel);

            item.OnRequestSelect          += chan => OnRequestSelect?.Invoke(chan);
            item.OnRequestLeave           += chan => OnRequestLeave?.Invoke(chan);
            item.SelectorActive.BindTarget = SelectorActive;

            ChannelListItemFlow flow = getFlowForChannel(channel);

            channelMap.Add(channel, item);
            flow.Add(item);
        }
示例#4
0
文件: ChannelList.cs 项目: Wieku/osu
        public void AddChannel(Channel channel)
        {
            if (channelMap.ContainsKey(channel))
            {
                return;
            }

            ChannelListItem item = new ChannelListItem(channel);

            item.OnRequestSelect += chan => OnRequestSelect?.Invoke(chan);
            item.OnRequestLeave  += chan => OnRequestLeave?.Invoke(chan);

            FillFlowContainer <ChannelListItem> flow = getFlowForChannel(channel);

            channelMap.Add(channel, item);
            flow.Add(item);

            updateVisibility();
        }