Пример #1
0
        void MakeAnnouncement(object sender, ElapsedEventArgs e)
        {
            if (Announce != null)
            {
                Announce(this, null);
            }

            nextAnnouncement.Announce();

            if (announcements.TrueForAll(x => x.Announced))
            {
                if (AllAnnounced != null)
                {
                    AllAnnounced(this, null);
                }

                announcements.ForEach(x => x.Reset());
            }

            GetNextTime();

            Console.WriteLine("Next announcement is at: {0}", nextAnnouncement.Time);
        }