private void timer1_Tick(object sender, EventArgs e)
{
if (count <1801)
{
count += timer1.Interval;
}
else
{
progressBarControl1.ForeColor = Color.Yellow;
count += timer1.Interval;
progressBarControl1.Value -= timer1.Interval;
if (count % 900 == 0)
{
if (int.Parse(lbl_TimeShowQuestion.Text) != 0)
{
lbl_TimeShowQuestion.Text = (int.Parse(lbl_TimeShowQuestion.Text) - 1).ToString();
}
if (int.Parse(lbl_TimeShowQuestion.Text) <= 5)
{
progressBarControl1.ForeColor = Color.Red;
}
else
{
progressBarControl1.ForeColor = Color.Yellow;
}
if (int.Parse(lbl_TimeShowQuestion.Text) == 0)
{
timer1.Stop();
count = 0;
lbl_TimeShowQuestion.Image = null;
}
}
}
}