private void InitUpdate() { if (GithubSingleFileUpdater.IsUpToDate()) { cmdUpdate.Visible = false; } if (File.Exists(oldVersion)) { File.Delete(oldVersion); } }
private void cmdUpdate_Click(object sender, EventArgs e) { GithubSingleFileUpdater.DownloadReleaseVersion(newestVersion); File.Move(curVersion, oldVersion); File.Move(newestVersion, curVersion); if (File.Exists(curVersion)) { Process.Start(curVersion); } Environment.Exit(0); }