1 Star 0 Fork 0

loveyu/JiaowuHelper

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
Update.cs 876 Bytes
Copy Edit Raw Blame History
loveyu authored 2013-12-25 22:41 . Update first to 1.1.0
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Windows.Forms;
namespace JiaowuHelper
{
class Update
{
public void run() {
Thread th = new Thread(new ThreadStart(process));
th.Start();
}
private void process() {
string page = Url.readHtml(Url.getPageStream(Browser.updateUrl));
if (page == "") return;
string[] list = page.Split('\n');
Version vsNew = new Version(list[0]);
Version vs = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
if (vsNew.CompareTo(vs) <= 0) return;
if (MessageBox.Show(Encoding.UTF8.GetString(Encoding.GetEncoding("gb2312").GetBytes(page)), "是否升级新版本?",
MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
Browser.openAppPage();
}
else {
Browser.openAuthor = true;
}
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/iloveyulove/JiaowuHelper.git
git@gitee.com:iloveyulove/JiaowuHelper.git
iloveyulove
JiaowuHelper
JiaowuHelper
master

Search