Inheritance: System.Windows.Forms.Form
Esempio n. 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            int ipVersion = 0;

            if (listView1.SelectedItems.Count == 0)
            {
                new BalloonTip("No selection", "Select an IP session first", listView1, BalloonTip.ICON.INFO, 5000);
                return;
            }
            if (((IP.SocketID)listView1.SelectedItems[0].Tag).LocalEP.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
            {
                ipVersion = 4;
            }
            else if (((IP.SocketID)listView1.SelectedItems[0].Tag).LocalEP.AddressFamily == System.Net.Sockets.AddressFamily.InterNetworkV6)
            {
                ipVersion = 6;
            }
            IPEndPoint remoteEP;

            if (((IP.SocketID)listView1.SelectedItems[0].Tag).Protocol == IP.ProtocolFamily.UDP &&
                UdpDetector.Table.GetRemoteEP(((IP.SocketID)listView1.SelectedItems[0].Tag).LocalEP) != null)
            {
                remoteEP = UdpDetector.Table.GetRemoteEP(((IP.SocketID)listView1.SelectedItems[0].Tag).LocalEP);
            }
            else
            {
                remoteEP = ((IP.SocketID)listView1.SelectedItems[0].Tag).RemoteEP;
            }
            RouteIPForm form = new RouteIPForm(ipVersion, remoteEP.Address.ToString());

            form.ShowDialog();
        }
Esempio n. 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     int ipVersion = 0;
     if (listView1.SelectedItems.Count == 0)
     {
         new BalloonTip("No selection", "Select an IP session first", listView1, BalloonTip.ICON.INFO, 5000);
         return;
     }
     if (((IP.SocketID)listView1.SelectedItems[0].Tag).LocalEP.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
         ipVersion = 4;
     else if (((IP.SocketID)listView1.SelectedItems[0].Tag).LocalEP.AddressFamily == System.Net.Sockets.AddressFamily.InterNetworkV6)
         ipVersion = 6;
     IPEndPoint remoteEP;
     if (((IP.SocketID)listView1.SelectedItems[0].Tag).Protocol == IP.ProtocolFamily.UDP &&
         UdpDetector.Table.GetRemoteEP(((IP.SocketID)listView1.SelectedItems[0].Tag).LocalEP) != null)
         remoteEP = UdpDetector.Table.GetRemoteEP(((IP.SocketID)listView1.SelectedItems[0].Tag).LocalEP);
     else
         remoteEP = ((IP.SocketID)listView1.SelectedItems[0].Tag).RemoteEP;
     RouteIPForm form = new RouteIPForm(ipVersion, remoteEP.Address.ToString());
     form.ShowDialog();
 }