From 5da87a008f7e6ba9ce533b65b7db9f43aaa9073a Mon Sep 17 00:00:00 2001 From: genteure Date: Thu, 20 Jul 2023 18:52:58 +0800 Subject: [PATCH] fix(wpf): missed rebranding on about page --- BililiveRecorder.WPF/Pages/AboutPage.xaml | 10 +++------- BililiveRecorder.WPF/Pages/AboutPage.xaml.cs | 11 +++++++++++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/BililiveRecorder.WPF/Pages/AboutPage.xaml b/BililiveRecorder.WPF/Pages/AboutPage.xaml index 5652cd0..4aaba86 100644 --- a/BililiveRecorder.WPF/Pages/AboutPage.xaml +++ b/BililiveRecorder.WPF/Pages/AboutPage.xaml @@ -45,12 +45,8 @@ - - - - - - + + @@ -77,7 +73,7 @@ - + diff --git a/BililiveRecorder.WPF/Pages/AboutPage.xaml.cs b/BililiveRecorder.WPF/Pages/AboutPage.xaml.cs index 3628d37..1b8917a 100644 --- a/BililiveRecorder.WPF/Pages/AboutPage.xaml.cs +++ b/BililiveRecorder.WPF/Pages/AboutPage.xaml.cs @@ -1,3 +1,5 @@ +using System.Text.RegularExpressions; + namespace BililiveRecorder.WPF.Pages { /// @@ -8,6 +10,15 @@ namespace BililiveRecorder.WPF.Pages public AboutPage() { this.InitializeComponent(); + + if (!string.IsNullOrEmpty(GitVersionInformation.CommitDate)) + { + var match = Regex.Match(GitVersionInformation.CommitDate, @"^(?\d{4})-(?\d{2})-(?\d{2})$"); + if (match.Success) + { + this.CopyrightTextBlock.Text = $" © {match.Groups["year"].Value} Genteure"; + } + } } } }