From 10d92d489de600cea4ec84db5b27d9dfc8376f92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A9=97=E4=B9=83=E6=9E=9C?= <1763575579@qq.com> Date: Sat, 20 Jul 2024 16:46:20 +0800 Subject: [PATCH] update --- EAappEmulater/Api/CoreApi.cs | 7 +++++-- EAappEmulater/Assets/Files/Misc/UpdateNotes.txt | 7 ++++++- EAappEmulater/Properties/AssemblyInfo.cs | 10 +++++----- EAappEmulater/Usings.cs | 1 + EAappEmulater/Views/AboutView.xaml | 7 +------ EAappEmulater/Windows/MainWindow.xaml | 4 ++-- ModernWpf/Styles/TextBoxHint.xaml | 9 ++++++--- 7 files changed, 26 insertions(+), 19 deletions(-) diff --git a/EAappEmulater/Api/CoreApi.cs b/EAappEmulater/Api/CoreApi.cs index 021cdae..42a1af1 100644 --- a/EAappEmulater/Api/CoreApi.cs +++ b/EAappEmulater/Api/CoreApi.cs @@ -24,7 +24,7 @@ public static async Task GetWebUpdateVersion() { try { - var request = new RestRequest("https://api.battlefield.vip/eaapp/update.txt", Method.Get); + var request = new RestRequest("https://api.github.com/repos/CrazyZhang666/EAappEmulater/releases/latest", Method.Get); var response = await _client.ExecuteAsync(request); LoggerHelper.Info($"GetWebUpdateVersion 请求结束,状态 {response.ResponseStatus}"); @@ -38,7 +38,10 @@ public static async Task GetWebUpdateVersion() if (response.StatusCode == HttpStatusCode.OK) { - if (Version.TryParse(response.Content, out Version version)) + var jsonNode = JsonNode.Parse(response.Content); + + var tagName = jsonNode["tag_name"].GetValue(); + if (Version.TryParse(tagName, out Version version)) { LoggerHelper.Info($"获取服务器更新版本号成功 {version}"); return version; diff --git a/EAappEmulater/Assets/Files/Misc/UpdateNotes.txt b/EAappEmulater/Assets/Files/Misc/UpdateNotes.txt index db2ae0f..f3958b9 100644 --- a/EAappEmulater/Assets/Files/Misc/UpdateNotes.txt +++ b/EAappEmulater/Assets/Files/Misc/UpdateNotes.txt @@ -1,4 +1,9 @@ -2024/07/18 v1.6.0.0 +2024/07/20 v1.6.1.0 +------------------------ +- 修改软件内超链接指向GitHub + + +2024/07/18 v1.6.0.0 ------------------------ - 开源了EAapp模拟器源代码 diff --git a/EAappEmulater/Properties/AssemblyInfo.cs b/EAappEmulater/Properties/AssemblyInfo.cs index f63465d..72f33e4 100644 --- a/EAappEmulater/Properties/AssemblyInfo.cs +++ b/EAappEmulater/Properties/AssemblyInfo.cs @@ -12,12 +12,12 @@ // PropertyGroup Generate????Attribute [assembly: AssemblyTitle("EA app 模拟器")] -[assembly: AssemblyCompany("https://battlefield.vip")] +[assembly: AssemblyCompany("https://github.com/CrazyZhang666/EAappEmulater")] [assembly: AssemblyProduct("EA app 模拟器")] -[assembly: AssemblyVersion("1.6.0.0")] -[assembly: AssemblyFileVersion("1.6.0.0")] -[assembly: AssemblyInformationalVersion("1.6.0.0")] +[assembly: AssemblyVersion("1.6.1.0")] +[assembly: AssemblyFileVersion("1.6.1.0")] +[assembly: AssemblyInformationalVersion("1.6.1.0")] // 不重复 -[assembly: AssemblyDescription("https://battlefield.vip")] +[assembly: AssemblyDescription("https://github.com/CrazyZhang666/EAappEmulater")] [assembly: AssemblyCopyright("Copyright © 2024-2024")] \ No newline at end of file diff --git a/EAappEmulater/Usings.cs b/EAappEmulater/Usings.cs index 70628da..8af7806 100644 --- a/EAappEmulater/Usings.cs +++ b/EAappEmulater/Usings.cs @@ -29,4 +29,5 @@ global using System.Text.Unicode; global using System.Text.Encodings.Web; global using System.Text.Json.Serialization; +global using System.Text.Json.Nodes; global using Microsoft.Win32; \ No newline at end of file diff --git a/EAappEmulater/Views/AboutView.xaml b/EAappEmulater/Views/AboutView.xaml index e85514b..1971ae5 100644 --- a/EAappEmulater/Views/AboutView.xaml +++ b/EAappEmulater/Views/AboutView.xaml @@ -46,15 +46,10 @@ - diff --git a/EAappEmulater/Windows/MainWindow.xaml b/EAappEmulater/Windows/MainWindow.xaml index 13596d1..3b40f81 100644 --- a/EAappEmulater/Windows/MainWindow.xaml +++ b/EAappEmulater/Windows/MainWindow.xaml @@ -30,8 +30,8 @@ VerticalAlignment="Center" Icon="" Text="发现新版本,点击下载" - ToolTip="https://battlefield.vip" - Uri="https://battlefield.vip" + ToolTip="https://github.com/CrazyZhang666/EAappEmulater/releases" + Uri="https://github.com/CrazyZhang666/EAappEmulater/releases" Visibility="Hidden" WindowChrome.IsHitTestVisibleInChrome="True" /> diff --git a/ModernWpf/Styles/TextBoxHint.xaml b/ModernWpf/Styles/TextBoxHint.xaml index 7074cab..6a48e4a 100644 --- a/ModernWpf/Styles/TextBoxHint.xaml +++ b/ModernWpf/Styles/TextBoxHint.xaml @@ -99,6 +99,8 @@ + + @@ -129,10 +131,11 @@ Text="{TemplateBinding Hint}" /> + HorizontalScrollBarVisibility="{TemplateBinding HorizontalScrollBarVisibility}" + VerticalScrollBarVisibility="{TemplateBinding VerticalScrollBarVisibility}" />