public void copyConfig() { string applationPath = AppDomain.CurrentDomain.BaseDirectory; FIlesCopy filesCopy = new FIlesCopy(applationPath + "Config", applationPath + "Release"); filesCopy.beginCopyFiles(); }
public void filesCopy(object filescopy) { bool s = true; while (s) { while (threadTag == 1) { FIlesCopy filecopy = (FIlesCopy)filescopy; filecopy.beginCopyFiles(); DialogResult resault = MessageBox.Show("升级已完成是否重新启动程序", "重启程序", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); if (resault == DialogResult.OK) { Process.Start(FileName.Substring(0, FileName.LastIndexOf("\\")) + "\\GPSTran.exe"); Process.GetCurrentProcess().CloseMainWindow(); Application.Exit(); } else { Application.Exit(); } threadTag = 0; s = false; break; } } }