/// <summary>
/// 重启程序
/// </summary>
private void Restart()
{
Application.ExitThread();
Thread thtmp = new Thread(new ParameterizedThreadStart(run));
object appName = Application.ExecutablePath;
Thread.Sleep(500);
thtmp.Start(appName);
}
private void run(Object obj)
{
Process ps = new Process();
ps.StartInfo.FileName = obj.ToString();
ps.Start();
}
重启程序
最新推荐文章于 2022-10-21 15:59:09 发布