private void ToList(object sender, RelevantAirplaneArgs e)
        {
            foreach (Plane plane in _relevantPlanesList)
            {
                plane.Relevant = false;
            }
            //Console.Clear();
            foreach (Plane newPlane in e._relevantPlanes)
            {
                bool test = false;
                if (_relevantPlanesList != null)
                {
                    foreach (Plane oldPlane in _relevantPlanesList)
                    {
                        if (newPlane.Tag == oldPlane.Tag)
                        {
                            UpdatePlane(oldPlane, newPlane);
                            test = true;
                        }
                    }
                }
                if (!test)
                {
                    AddPlane(newPlane);
                }
            }

            RemoveOldPlanes(_relevantPlanesList);
            _separationCondition.Separation(_relevantPlanesList);
        }
Esempio n. 2
0
 protected virtual void OnRelevantAirplanesReceivedEvent(RelevantAirplaneArgs e)
 {
     RelevantAirplanesReceivedEvent?.Invoke(this, e);
 }