System.Diagnostics.Process.Start(Application.ExecutablePath);
System.Diagnostics.Process.GetCurrentProcess().Kill();
这种方法重启程序后程序的焦点会有点问题,暂时还想不出办法解决