最近老是忘记打卡,自己写了一个简单的提醒工具,关机时提醒自己记得打卡,代码很简单,主要是提供一点思路
class Program
{
static void Main(string[] args)
{
Console.WriteLine("________打卡了吗?");
string read = Console.ReadLine();
if (read == "Y" || read == "Yes" || read == "打了")
{
Console.WriteLine("关机了");
Process.Start("shutdown.exe", "-s -t 3");//关机
}
else
{
Console.Write("快去打卡");
}
Console.ReadKey();
}
}