111,130
社区成员
发帖
与我相关
我的任务
分享private void timer1_Tick(object sender, EventArgs e)
{
if (ti - i == 1)//从5开始到计时
{
timer1.Enabled = false;
label4.Text = "时间到,关机!!";
label1.Text = CmdPc("Shutdown.exe -s -f");
button4.Visible = true;
}
else
{
i++;
string j = (ti - i).ToString();
label4.Text = j;
}
}if (ti - i == 1)//从5开始到计时
{
timer1.Enabled = false;
label4.Text = "时间到!!";
button4.Visible = true;
}
else
{
i++;
string j = (ti - i).ToString();
label4.Text = j;
}