fix(wpf): missed rebranding on about page

This commit is contained in:
genteure 2023-07-20 18:52:58 +08:00
parent 547cde5940
commit 5da87a008f
2 changed files with 14 additions and 7 deletions

View File

@ -45,12 +45,8 @@
</Style>
</StackPanel.Resources>
<StackPanel>
<TextBlock Text="B" Style="{StaticResource Pinyin}"/>
<TextBlock Text="B" Style="{StaticResource MainText}"/>
</StackPanel>
<StackPanel>
<TextBlock Text="zhàn" Style="{StaticResource Pinyin}"/>
<TextBlock Text="站" Style="{StaticResource MainText}"/>
<TextBlock Text="mikufans" Style="{StaticResource Pinyin}"/>
<TextBlock Text="mikufans" Style="{StaticResource MainText}"/>
</StackPanel>
<StackPanel>
<TextBlock Text="lù" Style="{StaticResource Pinyin}"/>
@ -77,7 +73,7 @@
</TextBlock>
<StackPanel Orientation="Horizontal">
<TextBlock FontSize="16" Text="{l:Loc About_Copyright}"/>
<TextBlock FontSize="16" Text=" © 2021 Genteure"/>
<TextBlock FontSize="16" Text=" © Genteure" x:Name="CopyrightTextBlock"/>
</StackPanel>
<TextBlock FontSize="16" TextWrapping="Wrap" Text="{l:Loc About_License}"/>
<StackPanel Orientation="Horizontal">

View File

@ -1,3 +1,5 @@
using System.Text.RegularExpressions;
namespace BililiveRecorder.WPF.Pages
{
/// <summary>
@ -8,6 +10,15 @@ namespace BililiveRecorder.WPF.Pages
public AboutPage()
{
this.InitializeComponent();
if (!string.IsNullOrEmpty(GitVersionInformation.CommitDate))
{
var match = Regex.Match(GitVersionInformation.CommitDate, @"^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})$");
if (match.Success)
{
this.CopyrightTextBlock.Text = $" © {match.Groups["year"].Value} Genteure";
}
}
}
}
}