Skip to content

Commit

Permalink
修复版本号判断错误的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
PublicPwd committed Mar 22, 2019
1 parent 7a26c70 commit 7a3f91c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 42 deletions.
10 changes: 2 additions & 8 deletions MemoBird_GuGu/Classes/AboutInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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) 修复图文拼接顺序错乱的问题" +
Expand Down
6 changes: 3 additions & 3 deletions MemoBird_GuGu/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("咕咕")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down Expand Up @@ -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")]
16 changes: 3 additions & 13 deletions MemoBird_GuGu/Utils/CheckUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -86,18 +86,8 @@ private static string GetBrowserDownloadUrl()

private static bool IsNewVersion(string version)
{
bool bRe = false;
List<string> localVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString().Split('.').ToList();
List<string> 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)
Expand Down
20 changes: 2 additions & 18 deletions MemoBird_GuGu/Windows/Window_About.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 7a3f91c

Please sign in to comment.