Mam duży problem. Timer odlicza czas tylko raz, a później się zatrzymuje. Wrzucam kod:
private void timer1_Tick(object sender, EventArgs e)
{
timer1.Enabled = true;
int s = 3, m = 0;// s-sekundy, m-minuty
s--;//odliczanie sekund
if (s < 0)
{
s = 59;
m--;
}
if (m == 0 && s == 0)
{
MessageBox.Show("Koniec czasu", "Koniec czasu", MessageBoxButtons.OK, MessageBoxIcon.Information);
this.Close();
}
if (s < 10)
cza = Convert.ToString(m) + ":0" + Convert.ToString(s);//cza to string
else
cza = Convert.ToString(m) + ":" + Convert.ToString(s);
Czas.Text = cza;//Czas to pole tekstowe
}