private void timer_Tick(object sender, EventArgs e) { this.timer.Enabled = false; string txtContent = GetVersion("https://raw.githubusercontent.com/coding1618/TaleWindowUpData/master/updata.json"); JObject jo = (JObject)JsonConvert.DeserializeObject(txtContent); DownloadFile(jo["fileurl"].ToString(), @"C:\tale.zip", progressBar1); Set_OS_Path.SetSysEnvironment("TaleHome", @"C:\TaleBlog"); MessageBox.Show("安装成功请重启,请使用桌面快捷方式启动,本文件请保留!请点击X退出重启软件!", "提示:"); SharpZip.UnZip(@"C:\\tale.zip", @"C:\TaleBlog"); Application.Exit(); }