public void GetTransponderData(object sender, TransponderArgs e)
        {
            var transponderList = e.transponderData;

            foreach (TransponderData transponderData in transponderList)
            {
                HandleNewData(transponderData);
            }
            List <Flight> newlist = collisionDetector_.OnFlightsChanged(new FlightArgs()
            {
                flights = FlightList
            });

            for (int i = 0; i < newlist.Count; i++)
            {
                FlightList[i].collision = newlist[i].collision;
            }
            Notify();
        }
Пример #2
0
 public void FilterFlight(object sender, TransponderArgs e)
 {
     transponderList = e.transponderData;
     foreach (var transponder in transponderList.ToList())
     {
         if (transponder.X < 10000 || transponder.X > 90000)
         {
             transponderList.Remove(transponder);
         }
         else if (transponder.Y < 10000 || transponder.Y > 90000)
         {
             transponderList.Remove(transponder);
         }
         else if (transponder.Altitude < 500 || transponder.Altitude > 20000)
         {
             transponderList.Remove(transponder);
         }
     }
     transponderFilterChanged?.Invoke(this, new TransponderArgs {
         transponderData = transponderList
     });
 }
Пример #3
0
 protected virtual void OnTransponderChanged(TransponderArgs e)
 {
     transponderChanged?.Invoke(this, e);
 }