Ejemplo n.º 1
0
        private void buttonTrilaterate_Click(object sender, EventArgs e)
        {
            TrilaterationControl tctrl = _discoveryForm.trilaterationControl;

            _discoveryForm.ShowTrilaterationTab();
            tctrl.Set(((SystemPosition)dataGridView1.CurrentRow.Cells[1].Tag).curSystem);
        }
Ejemplo n.º 2
0
        private void buttonTrilaterate_Click(object sender, EventArgs e)
        {
            ISystem currSys = GetCurrentSystem();

            if (currSys != null)
            {
                TrilaterationControl tctrl = _discoveryForm.trilaterationControl;

                _discoveryForm.ShowTrilaterationTab();
                tctrl.Set(currSys);
            }
        }
Ejemplo n.º 3
0
        private void trilaterationToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TrilaterationControl tctrl = _discoveryForm.trilaterationControl;

            IEnumerable <DataGridViewRow> selectedRows = dataGridViewTravel.SelectedCells.Cast <DataGridViewCell>()
                                                         .Select(cell => cell.OwningRow)
                                                         .Distinct()
                                                         .OrderBy(cell => cell.Index);

            this.Cursor = Cursors.WaitCursor;
            string sysName = "";

            foreach (DataGridViewRow r in selectedRows)
            {
                sysName = r.Cells[1].Value.ToString();
                tctrl.AddSystemToDataGridViewDistances(sysName);
            }

            this.Cursor = Cursors.Default;
        }