From d9f162761f404fb8ad6fc0aa405f90d42eab9e3c Mon Sep 17 00:00:00 2001 From: yaronzz Date: Thu, 2 Sep 2021 09:16:43 +0800 Subject: [PATCH] Show updataLog --- TIDALDL-UI-PRO/Pages/AboutView.xaml | 12 ++++++++++++ TIDALDL-UI-PRO/Pages/AboutViewModel.cs | 2 ++ TIDALDL-UI-PRO/Pages/MainViewModel.cs | 8 ++++++-- TIDALDL-UI-PRO/Properties/AssemblyInfo.cs | 4 ++-- TIDALDL-UI-PRO/Properties/ControlResources.xaml | 3 ++- TIDALDL-UI-PRO/UPDATE_LOG.md | 1 + 6 files changed, 25 insertions(+), 5 deletions(-) diff --git a/TIDALDL-UI-PRO/Pages/AboutView.xaml b/TIDALDL-UI-PRO/Pages/AboutView.xaml index 3102be7..24ff5f9 100644 --- a/TIDALDL-UI-PRO/Pages/AboutView.xaml +++ b/TIDALDL-UI-PRO/Pages/AboutView.xaml @@ -64,6 +64,7 @@ + @@ -109,6 +110,17 @@ + + + + + + + + + + + diff --git a/TIDALDL-UI-PRO/Pages/AboutViewModel.cs b/TIDALDL-UI-PRO/Pages/AboutViewModel.cs index 21f2087..97609b6 100644 --- a/TIDALDL-UI-PRO/Pages/AboutViewModel.cs +++ b/TIDALDL-UI-PRO/Pages/AboutViewModel.cs @@ -18,8 +18,10 @@ public class AboutViewModel : ModelBase public string Type { get; set; } = "(BETA)"; public string Version { get; set; } = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); public string LastVersion { get; set; } + public string LastVersionDesc { get; set; } public Visibility ShowDonate { get; set; } = Visibility.Collapsed; public Visibility ShowProgress { get; set; } = Visibility.Collapsed; + public Visibility ShowVersionDesc { get; set; } = Visibility.Collapsed; public Visibility EnableUpdate { get; set; } = Visibility.Collapsed; public ProgressHelper Progress { get; set; } = new ProgressHelper(false); public string DownloadStatusInfo { get; set; } diff --git a/TIDALDL-UI-PRO/Pages/MainViewModel.cs b/TIDALDL-UI-PRO/Pages/MainViewModel.cs index 13f5fa2..01ae8db 100644 --- a/TIDALDL-UI-PRO/Pages/MainViewModel.cs +++ b/TIDALDL-UI-PRO/Pages/MainViewModel.cs @@ -48,9 +48,13 @@ protected override async void OnViewLoaded() } //Update new version - VMAbout.LastVersion = await GithubHelper.getLastReleaseVersionAsync(Global.NAME_GITHUB_AUTHOR, Global.NAME_GITHUB_PROJECT); - if (VMAbout.LastVersion != null && VMAbout.LastVersion != VMAbout.Version) + GithubHelper.VER Ver = await GithubHelper.getLastReleaseVersionAsync(Global.NAME_GITHUB_AUTHOR, Global.NAME_GITHUB_PROJECT); + VMAbout.LastVersion = Ver.version; + VMAbout.LastVersionDesc = Ver.desc; + if (VMAbout.LastVersion.IsNotBlank() && VMAbout.LastVersion != VMAbout.Version) { + if (VMAbout.LastVersionDesc.IsNotBlank()) + VMAbout.ShowVersionDesc = Visibility.Visible; VMAbout.EnableUpdate = Visibility.Visible; ShowPage("about"); } diff --git a/TIDALDL-UI-PRO/Properties/AssemblyInfo.cs b/TIDALDL-UI-PRO/Properties/AssemblyInfo.cs index c791d37..d97890b 100644 --- a/TIDALDL-UI-PRO/Properties/AssemblyInfo.cs +++ b/TIDALDL-UI-PRO/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 //通过使用 "*",如下所示: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.2.1.6")] -[assembly: AssemblyFileVersion("1.2.1.6")] +[assembly: AssemblyVersion("1.2.1.7")] +[assembly: AssemblyFileVersion("1.2.1.7")] diff --git a/TIDALDL-UI-PRO/Properties/ControlResources.xaml b/TIDALDL-UI-PRO/Properties/ControlResources.xaml index 6ce269d..377b2ad 100644 --- a/TIDALDL-UI-PRO/Properties/ControlResources.xaml +++ b/TIDALDL-UI-PRO/Properties/ControlResources.xaml @@ -12,7 +12,8 @@ - + +