From bd2c7c053e25892cbaf49d40ee547ec1a07f005f Mon Sep 17 00:00:00 2001 From: XY Wang Date: Wed, 22 Sep 2021 00:46:57 +0800 Subject: [PATCH] Fix Auto Update --- Ink Canvas/MainWindow.xaml.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Ink Canvas/MainWindow.xaml.cs b/Ink Canvas/MainWindow.xaml.cs index a7499a7..fe3b367 100644 --- a/Ink Canvas/MainWindow.xaml.cs +++ b/Ink Canvas/MainWindow.xaml.cs @@ -123,6 +123,7 @@ namespace Ink_Canvas e.CanExecute = true; } bool isInkCanvasVisible = true; + bool isAutoUpdateEnabled = false; private void Window_Loaded(object sender, RoutedEventArgs e) { //MessageBox.Show("Ink Canvas by WXRIW\n" + @@ -224,6 +225,7 @@ namespace Ink_Canvas string response = GetWebClient("http://e.wxriw.cn:1957"); if (response.Contains("Special Version")) { + isAutoUpdateEnabled = true; if (response.Contains("")) { string str = Strings.Mid(response, response.IndexOf("") + 9); @@ -1120,6 +1122,7 @@ namespace Ink_Canvas private void Window_Closed(object sender, EventArgs e) { + if (!isAutoUpdateEnabled) return; try { if (OAUS.Core.VersionHelper.HasNewVersion(GetIp("ink.wxriw.cn"), 19570))