public override void OnDelete()
        {
            if (m_Timer != null)
            {
                m_Timer.Stop();
            }

            base.OnDelete();
        }
예제 #2
0
        private void UserTimer_Elapsed(object sender, ElapsedEventArgs e)
        {
            //shows timer message in blue color
            Console.ForegroundColor = ConsoleColor.Blue;

            //stops timer
            UserTimer.Stop();

            //lets user know timer has finished
            Console.WriteLine("\nDing! Your timer has ended.");
        }