예제 #1
0
 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=====");
 }
예제 #2
0
 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);
     }
 }
예제 #3
0
 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);
     }
 }