private void FileManager_PeerChange(object sender, P2PNET.TransportLayer.EventArgs.PeerChangeEventArgs e) { peers = e.Peers; Console.WriteLine("----peer change----"); foreach (Peer peer in e.Peers) { Console.WriteLine(peer.IpAddress); } Console.WriteLine("====peer change====="); }
private void ObjMgr_PeerChange(object sender, P2PNET.TransportLayer.EventArgs.PeerChangeEventArgs e) { KnownPeers.Clear(); lvPeers.Items.Clear(); foreach (Peer peer in e.Peers) { KnownPeers.Add(peer.IpAddress); ListViewItem item = new ListViewItem(peer.IpAddress); lvPeers.Items.Add(item); } }
private void TransMgr_PeerChange(object sender, P2PNET.TransportLayer.EventArgs.PeerChangeEventArgs e) { peerListView.Items.Clear(); foreach (Peer peer in e.Peers) { string[] peerDtl = { peer.IpAddress }; ListViewItem item = new ListViewItem(peerDtl); peerListView.Items.Add(item); } }