From 4fbbd1dbd4200747383d28dbd00b7d72926e05c3 Mon Sep 17 00:00:00 2001 From: ChsBuffer <33744752+chsbuffer@users.noreply.github.com> Date: Thu, 22 Oct 2020 15:17:02 +0800 Subject: [PATCH] feat: update progress check hash --- Netch/Forms/MainForm.Misc.cs | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/Netch/Forms/MainForm.Misc.cs b/Netch/Forms/MainForm.Misc.cs index fc28af5d..0984c77c 100644 --- a/Netch/Forms/MainForm.Misc.cs +++ b/Netch/Forms/MainForm.Misc.cs @@ -2,6 +2,7 @@ using System.ComponentModel; using System.Diagnostics; using System.IO; +using System.Text.RegularExpressions; using System.Windows.Forms; using Netch.Controllers; using Netch.Utils; @@ -44,15 +45,37 @@ namespace Netch.Forms if (MessageBoxX.Show(i18N.Translate("Download and install now?"), confirm: true) != DialogResult.OK) return; NotifyTip(i18N.Translate("Start downloading new version")); + + var tagPage = await WebUtil.DownloadStringAsync(WebUtil.CreateRequest(_updater.LatestVersionUrl)); + var match = Regex.Match(tagPage, @"