Example #1
0
        public void Add(DateTime current, int departures, int arrivals)
        {
            if (Departures.Count > 23)
            {
                Departures.RemoveAt(0);
            }
            if (Arrivals.Count > 23)
            {
                Arrivals.RemoveAt(0);
            }
            if (Times.Count > 23)
            {
                Times.RemoveAt(0);
            }

            Departures.Add(departures);
            Arrivals.Add(arrivals);
            Times.Add($"{current.AddHours(-1d).ToString("HH")} - {current.ToString("HH\r\ndd.MM.yyyy")}");
        }