コード例 #1
0
        private void InitUpdate()
        {
            if (GithubSingleFileUpdater.IsUpToDate())
            {
                cmdUpdate.Visible = false;
            }

            if (File.Exists(oldVersion))
            {
                File.Delete(oldVersion);
            }
        }
コード例 #2
0
        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);
        }