private void btn_connect_Click(object sender, EventArgs e) { foreach (DataGridViewRow row in dgv_infos.Rows) { if (row.Cells[0].Value == null) { row.Cells[0].Value = false; } if ((bool)row.Cells[0].Value) { DataGridViewTextBoxCell ip = new DataGridViewTextBoxCell(); DataGridViewTextBoxCell port = new DataGridViewTextBoxCell(); DataGridViewTextBoxCell service = new DataGridViewTextBoxCell(); ip = (DataGridViewTextBoxCell)row.Cells[1]; port = (DataGridViewTextBoxCell)row.Cells[2]; service = (DataGridViewTextBoxCell)row.Cells[3]; if (connect((string)ip.Value, (string)port.Value)) { request = new Requete(knownServices, (string)service.Value); request.ShowDialog(this); btn_connect.Enabled = false; btn_getInfo.Enabled = false; btn_disconnect.Enabled = true; dgv_infos.Enabled = false; } } } }
private void button1_Click(object sender, EventArgs e) { if (connect(adress_catalogue, port_catalogue)) { request = new Requete(knownServices, "Elastic.Global.Services.Catalog"); request.ShowDialog(this); } }
private void btn_connect_Click(object sender, EventArgs e) { foreach (DataGridViewRow row in dgv_infos.Rows) { if (row.Cells[0].Value == null) { row.Cells[0].Value = false; } if ((bool)row.Cells[0].Value) { DataGridViewTextBoxCell ip = new DataGridViewTextBoxCell(); DataGridViewTextBoxCell port = new DataGridViewTextBoxCell(); DataGridViewTextBoxCell service = new DataGridViewTextBoxCell(); ip = (DataGridViewTextBoxCell) row.Cells[1]; port = (DataGridViewTextBoxCell) row.Cells[2]; service = (DataGridViewTextBoxCell)row.Cells[3]; if (connect((string)ip.Value, (string)port.Value)) { request = new Requete(knownServices, (string)service.Value); request.ShowDialog(this); } } } }