public void OnSeparationChecked(object sender, SeperationEvent e)
        {
            SeperationDataRecivedList = new List <SeperationContainer>();
            SeperationDataRecivedList = e._SeperationList;

            foreach (var data in SeperationDataRecivedList)
            {
                Console.WriteLine("!SEPARATION WARNING!\nTime of occurance: " + data.TimeStamp + ":" + data.TimeStamp.Millisecond + "   Involved tracks: " + data.TrackTag1 + " and " + data.TrackTag2 + "\n");
            }
        }
        public void OnCourseCalculated(object sender, ATMEvent e)
        {
            List <SeperationContainer> calculatedList = new List <SeperationContainer>();

            DataRecivedList = new List <TrackDataContainer>();
            DataRecivedList = e._tdcList;
            calculatedList  = CheckSeperation(DataRecivedList);

            SeperationEvent seperationEvent = new SeperationEvent(calculatedList);

            SeperationChecked?.Invoke(this, seperationEvent);
        }
Exemple #3
0
        public void OnSeparationChecked(object sender, SeperationEvent e)
        {
            DataRecivedList = new List <SeperationContainer>();
            DataRecivedList = e._SeperationList;
            using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"Log.txt", true))
            {
                foreach (var data in DataRecivedList)
                {
                    string separation = "Involved tracks: " + data.TrackTag1 + " + " + data.TrackTag2;

                    if (!TotalSeperationList.Contains(separation))
                    {
                        file.WriteLine("!SEPARATION WARNING!\n" + separation + "   Time of occurance: " + data.TimeStamp + ":" + data.TimeStamp.Millisecond);
                        TotalSeperationList.Add(separation);
                    }
                }
            }
        }