C#
0
Вклад в тег
int i;
int tk;
string c;
private void Button1_Click(object sender, EventArgs e)
{
i = 300;
c ="5:00";
label1.Text = c;
timer1.Interval = 1000;
timer1.Enabled = true;
timer1.Start();
}
private void Timer1_Tick(object sender, EventArgs e)
{
tk = --i;
TimeSpan span = TimeSpan.FromMinutes(tk);
string label = span.ToString(@"hh\:mm");
label1.Text = label.ToString();
if (i < 0)
timer1.Stop();
}