System.Diagnostics.Process.Start(Application.ExecutablePath);
System.Diagnostics.Process.GetCurrentProcess().Kill();
這種方法重啟程序后程序的焦點會有點問題,暫時還想不出辦法解決