コード例 #1
0
        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.");
        }