private void CountdownTimer_Tick(object sender, EventArgs e) { Counter--; if (Counter != 0) { SetShutdownLabel(Counter); Application.DoEvents(); } else Close(); }