From 7a3f91c7482eb5ba7f6233f87af4c5a04536cafd Mon Sep 17 00:00:00 2001 From: sam Date: Sat, 23 Mar 2019 00:46:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=89=88=E6=9C=AC=E5=8F=B7?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MemoBird_GuGu/Classes/AboutInfo.cs | 10 ++-------- MemoBird_GuGu/Properties/AssemblyInfo.cs | 6 +++--- MemoBird_GuGu/Utils/CheckUpdate.cs | 16 +++------------- MemoBird_GuGu/Windows/Window_About.xaml.cs | 20 ++------------------ 4 files changed, 10 insertions(+), 42 deletions(-) diff --git a/MemoBird_GuGu/Classes/AboutInfo.cs b/MemoBird_GuGu/Classes/AboutInfo.cs index 68ce81b..0f9366e 100644 --- a/MemoBird_GuGu/Classes/AboutInfo.cs +++ b/MemoBird_GuGu/Classes/AboutInfo.cs @@ -6,15 +6,9 @@ class AboutInfo public const string QRCoderURL = "https://github.com/codebude/QRCoder"; public const string MemoBird_GuGu = "https://github.com/PublicPwd/MemoBird_GuGu"; - public const string Log_en_us = - "----------\nV20.18.6.1\n1) New function, you can print qr code of WIFI information\n2) New function, you can reprint history records in the page of history\n3) New function, you can clear the history records" + - "\n----------\nV20.18.3.1\n1) You can resize the font size" + - "\n----------\nV20.18.1.1\n1) You can view print history\n2) Window can auto resize\n3) Solve the problem that remove wrong device" + - "\n----------\nV20.17.11.1\n1) Solve the problem about the wrong typesetting" + - "\n----------\nV20.17.10.2\n1) QRCode Enhance"; - public const string Log_zh_cn = - "----------\nV20.18.6.1\n1) 新功能,可以打印包含 WIFI 信息的二维码\n2) 新功能,可以在历史界面中重新打印以前打印过的内容\n3) 新功能,可以清空历史打印记录" + + "----------\nV20.19.3.1\n1) 修复在没有选择图片状态下,点击发送按钮,程序崩溃的问题" + + "\n----------\nV20.18.6.1\n1) 新功能,可以打印包含 WIFI 信息的二维码\n2) 新功能,可以在历史界面中重新打印以前打印过的内容\n3) 新功能,可以清空历史打印记录" + "\n----------\nV20.18.3.1\n1) 可以调整字形与字号啦" + "\n----------\nV20.18.1.1\n1) 可以查看以前打印过的内容啦 \n2) 窗口可以调整大小啦\n3) 修复移除设备出错的问题" + "\n----------\nV20.17.11.1\n1) 修复图文拼接顺序错乱的问题" + diff --git a/MemoBird_GuGu/Properties/AssemblyInfo.cs b/MemoBird_GuGu/Properties/AssemblyInfo.cs index 830052c..92ddff5 100644 --- a/MemoBird_GuGu/Properties/AssemblyInfo.cs +++ b/MemoBird_GuGu/Properties/AssemblyInfo.cs @@ -12,7 +12,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("咕咕")] -[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyCopyright("Copyright © 2019")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -51,5 +51,5 @@ // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, // 方法是按如下所示使用“*”: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("20.18.6.1")] -[assembly: AssemblyFileVersion("20.18.6.1")] +[assembly: AssemblyVersion("20.19.3.1")] +[assembly: AssemblyFileVersion("20.19.3.1")] diff --git a/MemoBird_GuGu/Utils/CheckUpdate.cs b/MemoBird_GuGu/Utils/CheckUpdate.cs index 3f4f3f5..4e64451 100644 --- a/MemoBird_GuGu/Utils/CheckUpdate.cs +++ b/MemoBird_GuGu/Utils/CheckUpdate.cs @@ -36,7 +36,7 @@ private static void WebClient_DownloadStringCompleted(object sender, DownloadStr { ResponseString = e.Result; string tagName = GetTagName(); - if (!IsNewVersion(tagName)) + if (IsNewVersion(tagName)) { return; } @@ -86,18 +86,8 @@ private static string GetBrowserDownloadUrl() private static bool IsNewVersion(string version) { - bool bRe = false; - List localVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString().Split('.').ToList(); - List remoteVersion = version.Split('.').ToList(); - for (int i = 0; i < 4; i++) - { - if (int.Parse(remoteVersion[i]) > int.Parse(localVersion[i])) - { - bRe = true; - break; - } - } - return bRe; + string localVerion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); + return localVerion == version ? true : false; } private static void DownloadFile(string url, string fileName) diff --git a/MemoBird_GuGu/Windows/Window_About.xaml.cs b/MemoBird_GuGu/Windows/Window_About.xaml.cs index 1a229c6..281e2cc 100644 --- a/MemoBird_GuGu/Windows/Window_About.xaml.cs +++ b/MemoBird_GuGu/Windows/Window_About.xaml.cs @@ -12,28 +12,12 @@ public Window_About() { InitializeComponent(); Label_Title.Content += Assembly.GetExecutingAssembly().GetName().Version.ToString(); - ShowLog(); + TextBox_Log.Text = AboutInfo.Log_zh_cn; } - #region Private Function - - private void ShowLog() - { - if (Button_Submit.Content.Equals("OK")) - { - TextBox_Log.Text = AboutInfo.Log_en_us; - } - else - { - TextBox_Log.Text = AboutInfo.Log_zh_cn; - } - } - - #endregion - #region Event Handlers - private void Grid_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e) + private void Grid_MouseDown(object sender, MouseButtonEventArgs e) { if (e.LeftButton == MouseButtonState.Pressed) {