Exemplo n.º 1
0
            public ChannelListViewItem(string name, IPEndPoint endpoint, ChannelType channelType, ChannelListView listView)
                : base(name, "static channel", listView.Groups["static"])
            {
                this.name           = name;
                this.dynamicChannel = false;

                this.endpoint = endpoint;
                this.listener = new ChannelListener(endpoint, channelType);

                this.SubItems.Add(endpoint == null ? "unknown" : endpoint.ToString());
                this.SubItems.Add("");
                this.SubItems.Add("");
            }
Exemplo n.º 2
0
            public ChannelListViewItem(IChannel channel, ChannelListView listView) : base(channel.Name, "dynamic channel", listView.Groups["dynamic"])
            {
                this.name           = channel.Name;
                this.dynamicChannel = true;

                endpoint = null;
                if (channel is UDPChannel)
                {
                    UDPChannel udpChannel = (UDPChannel)channel;
                    endpoint = new IPEndPoint(udpChannel.IP, udpChannel.Port);

                    listener = new ChannelListener(endpoint, ChannelType.UDPChannel);
                }

                this.SubItems.Add(endpoint == null ? channel.GetType().Name : endpoint.ToString());
                this.SubItems.Add("");
                this.SubItems.Add("");
            }
            public ChannelListViewItem(string name, IPEndPoint endpoint, ChannelType channelType, ChannelListView listView)
                : base(name, "static channel", listView.Groups["static"])
            {
                this.name = name;
                this.dynamicChannel = false;

                this.endpoint = endpoint;
                this.listener = new ChannelListener(endpoint, channelType);

                this.SubItems.Add(endpoint == null ? "unknown" : endpoint.ToString());
                this.SubItems.Add("");
                this.SubItems.Add("");
            }
            public ChannelListViewItem(IChannel channel, ChannelListView listView)
                : base(channel.Name, "dynamic channel", listView.Groups["dynamic"])
            {
                this.name = channel.Name;
                this.dynamicChannel = true;

                endpoint = null;
                if (channel is UDPChannel) {
                    UDPChannel udpChannel = (UDPChannel)channel;
                    endpoint = new IPEndPoint(udpChannel.IP, udpChannel.Port);

                    listener = new ChannelListener(endpoint, ChannelType.UDPChannel);
                }

                this.SubItems.Add(endpoint == null ? channel.GetType().Name : endpoint.ToString());
                this.SubItems.Add("");
                this.SubItems.Add("");
            }