public void Set(ISystem system)
        {
            if (TargetSystem == null || !TargetSystem.Equals(system))
            {
                TargetSystem = system;
                ClearDataGridViewDistancesRows();
            }

            if (TargetSystem == null)
            {
                return;
            }

            textBoxSystemName.Text = TargetSystem.name;
            if (TargetSystem.HasCoordinate)
            {
                textBoxCoordinateX.Text = TargetSystem.x.ToString();
                textBoxCoordinateY.Text = TargetSystem.y.ToString();
                textBoxCoordinateZ.Text = TargetSystem.z.ToString();

                labelStatus.Text      = "Has Coordinates!";
                labelStatus.BackColor = Color.LawnGreen;
            }
            else
            {
                labelStatus.Text      = "Enter Distances";
                labelStatus.BackColor = Color.LightBlue;
            }

            UnfreezeTrilaterationUI();
            dataGridViewDistances.Focus();

            PopulateSuggestedSystems();
            PopulateClosestSystems();
        }
        private void Set(ISystem system)        // called on New to set up trilat
        {
            if (targetsystem == null || system == null || !targetsystem.Equals(system))
            {
                targetsystem = system;
                ClearDataGridViewDistancesRows();
            }

            SetTargetSystemUI();
            toolStripLabelNoCoords.Text = discoveryform.history.FilterByFSD.Where(j => !(j.journalEntry as JournalFSDJump).HasCoordinate).Count().ToString();

            UnfreezeTrilaterationUI();
            dataGridViewDistances.Focus();

            dataGridViewClosestSystems.Rows.Clear();
            PopulateLocalWantedSystems();
            Thread ViewPushedSystemsThread = new Thread(ViewPushedSystems)
            {
                Name = "EDSM get pushed systems"
            };

            ViewPushedSystemsThread.Start();

            sector = null;
            if (toolStripButtonSector.Checked)
            {
                Thread ViewSectorSystemsThread = new Thread(() => ViewSectorSystems(system))
                {
                    Name = "EDSM get sector systems"
                };
                ViewSectorSystemsThread.Start();
            }
        }
Example #3
0
        public void Set(ISystem system)
        {
            if (TargetSystem == null || system == null || !TargetSystem.Equals(system))
            {
                TargetSystem = system;
                ClearDataGridViewDistancesRows();
            }

            if (TargetSystem == null)
            {
                return;
            }

            textBoxSystemName.Text = TargetSystem.name;

            if (TargetSystem.HasCoordinate)
            {
                textBoxCoordinateX.Text = TargetSystem.x.ToString();
                textBoxCoordinateY.Text = TargetSystem.y.ToString();
                textBoxCoordinateZ.Text = TargetSystem.z.ToString();

                SetTriStatusSuccess("Has Coordinates!");
            }
            else
            {
                SetTriStatusError("Enter Distances");
            }

            UnfreezeTrilaterationUI();
            dataGridViewDistances.Focus();

            dataGridViewClosestSystems.Rows.Clear();
            PopulateLocalWantedSystems();
            Thread ViewPushedSystemsThread = new Thread(ViewPushedSystems)
            {
                Name = "EDSM get pushed systems"
            };

            ViewPushedSystemsThread.Start();
        }
        public void Set(ISystem system)
        {
            if (TargetSystem == null || system == null || !TargetSystem.Equals(system))
            {
                TargetSystem = system;
                ClearDataGridViewDistancesRows();
            }

            SetTargetSystemUI();

            UnfreezeTrilaterationUI();
            dataGridViewDistances.Focus();

            dataGridViewClosestSystems.Rows.Clear();
            PopulateLocalWantedSystems();
            Thread ViewPushedSystemsThread = new Thread(ViewPushedSystems)
            {
                Name = "EDSM get pushed systems"
            };

            ViewPushedSystemsThread.Start();
        }
Example #5
0
        public void Set(ISystem system)
        {
            if (TargetSystem == null || system == null || !TargetSystem.Equals(system))
            {
                TargetSystem = system;
                ClearDataGridViewDistancesRows();
            }

            SetTargetSystemUI();
            toolStripLabelNoCoords.Text = _discoveryForm.history.FilterByFSD.Where(j => !(j.journalEntry as JournalFSDJump).HasCoordinate).Count().ToString();

            UnfreezeTrilaterationUI();
            dataGridViewDistances.Focus();

            dataGridViewClosestSystems.Rows.Clear();
            PopulateLocalWantedSystems();
            Thread ViewPushedSystemsThread = new Thread(ViewPushedSystems)
            {
                Name = "EDSM get pushed systems"
            };

            ViewPushedSystemsThread.Start();
        }