Ejemplo n.º 1
0
 private void btnIPadd_Click(object sender, EventArgs e)
 {
     List<System.Net.IPAddress> ipTmp=new List<System.Net.IPAddress>();
     foreach (object o in listIP.Items)
     {
         ipTmp.Add(System.Net.IPAddress.Parse(o.ToString()));
     }
     frmEnterIP dlg = new frmEnterIP(ipTmp);
     if (dlg.ShowDialog() == DialogResult.OK)
     {
         listIP.Items.Clear();
         foreach (System.Net.IPAddress ip in dlg.m_ipList)
             listIP.Items.Add(ip);
         listIP.SelectedIndex = 0;
         string sHost = txtHost.Text;
     }
     dlg.Dispose();
 }