private void editBookmarkToolStripMenuItem_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;
            }
            SystemClass sc = SystemClass.GetSystem((string)obj);

            if (sc == null)
            {
                EDDiscovery.Forms.MessageBoxTheme.Show("Unknown system, system is without co-ordinates", "Edit bookmark", MessageBoxButtons.OK);
            }
            else
            {
                RoutingUtils.showBookmarkForm(_discoveryForm, sc, null, false);
            }
        }
 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);
        }