标签:str ati img code 技术 time cli start 程序
1.打开VS2019,创建界面和按钮
2. 代码如下:
private void button1_Click(object sender, EventArgs e)
{
downpc(txttime.Text);
}
private static void downpc(string time)
{
Process.Start("shutdown", "/s /t "+time);
}
private void button2_Click(object sender, EventArgs e)
{
Process.Start("shutdown", "-a");
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void LinkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("https://www.cnblogs.com/pingg2019/");
}
标签:str ati img code 技术 time cli start 程序
原文地址:https://www.cnblogs.com/pingg2019/p/10518319.html