Example #1
0
        private void ShutDownTm_Tick(object sender, EventArgs e)
        {
            timeLeft      = timeLeft.Subtract(TimeSpan.FromSeconds(1));
            lblTimer.Text = timeLeft.ToString(@"hh\:mm\:ss");

            if (timeLeft.TotalSeconds <= 0)
            {
                ShutDownTm.Stop();
                PerformAction();
            }
        }
Example #2
0
 private void button2_Click(object sender, EventArgs e)
 {
     ShutDownTm.Stop();
 }