private void textBoxTarget_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         RoutingUtils.setTargetSystem(_discoveryForm, textBoxTarget.Text);
     }
 }
        private void setTargetToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int[] selectedRows = dataGridViewRouteSystems.SelectedCells.OfType <DataGridViewCell>().Where(c => c.RowIndex != dataGridViewRouteSystems.NewRowIndex).Select(c => c.RowIndex).OrderBy(v => v).Distinct().ToArray();

            if (selectedRows.Length == 0)
            {
                return;
            }
            var obj = dataGridViewRouteSystems[0, selectedRows[0]].Value;

            if (obj == null)
            {
                return;
            }
            RoutingUtils.setTargetSystem(_discoveryForm, (string)obj);
        }