[#] 修改补丁请求方式,使用新的地址和补丁发布机制

This commit is contained in:
huiyadanli
2019-12-07 14:38:16 +08:00
parent 82d9b5eb52
commit aed49e4e42
2 changed files with 45 additions and 27 deletions

View File

@@ -210,11 +210,10 @@ namespace RevokeMsgPatcher
private async void FormMain_Load(object sender, EventArgs e)
{
// 异步获取最新的补丁信息
string json = await GetPathJsonAsync();
string json = await HttpUtil.GetPatchJsonAsync();
if (string.IsNullOrEmpty(json))
{
lblUpdatePachJson.Text = "[ 获取最新补丁信息失败 ]";
}
else
{
@@ -247,28 +246,6 @@ namespace RevokeMsgPatcher
}
}
private async Task<string> GetPathJsonAsync()
{
string downStr = null;
try
{
downStr = await HttpUtil.Client.GetStringAsync("https://huiyadanli.coding.me/i/revokemsg/05.json");
}
catch (Exception ex1)
{
Console.WriteLine(ex1.Message);
try
{
downStr = await HttpUtil.Client.GetStringAsync("https://www.huiyadan.com/i/revokemsg/05.json");
}
catch (Exception ex2)
{
Console.WriteLine(ex2.Message);
}
}
return downStr;
}
private void lblUpdatePachJson_Click(object sender, EventArgs e)
{
string tips = "";