/// <summary> /// Adds a new channel and sets this new one to the current /// </summary> /// <param name="channelName">the name of the new channel</param> public void AddChannel(string channelName) { if (channels[channelName] == null) { OutputChannel channel = new OutputChannel(channelName); channels.Add(channel); comboBox.Items.Add(channelName); currentChannel = channels[channelName]; current = channelName; comboBox.SelectedIndex = comboBox.Items.Count - 1; //the last added channel.OnNewOutput += new ChannelNotification(channel_OnNewOutput); channel.OnClear += new StringNotification(channel_OnClear); if (OnChannelAdded != null) { OnChannelAdded(channelName); } } }
public int Add(OutputChannel channel) { return(this.InnerList.Add(channel)); }