private void btnGetServerName_Click(object sender, EventArgs e)//只添加没有的项 { opc.GetRomoteServer(txtRemoteServerIP.Text); if (opc.ServerName.Count > 0) { foreach (string str in opc.ServerName) { if (!cmbServerName.Items.Contains(str)) { cmbServerName.Items.Add(str); } } } }