Skip to content

Commit

Permalink
🚧 CopyRightも置き換え
Browse files Browse the repository at this point in the history
  • Loading branch information
Hibi-10000 committed Jan 3, 2025
1 parent aa68b90 commit 7993787
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/Hash.Wpf/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public partial class App : Application

public const string SemVer = $"v{Major}.{Minor}.{Build}";

public static string NowYear => DateTime.Now.Year.ToString();

/// <summary>
/// Application Entry Point.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Hash.Wpf/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
</TabControl>
<Grid Grid.Row="3">
<Label Content="{StaticResource Title}" Padding="5,0"/>
<TextBlock x:Name="CopyRight" Text="Copyright © 2021-2024 Hibi_10000" Padding="5,0" HorizontalAlignment="Right"/>
<TextBlock Text="{str:StringResource CopyRight}" Padding="5,0" HorizontalAlignment="Right"/>
</Grid>
</Grid>
</Window>
1 change: 0 additions & 1 deletion src/Hash.Wpf/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ private void MainWindow_OnLoaded(object sender, RoutedEventArgs e)
HashForContextEnable.IsChecked = false;
}

CopyRight.Text = $"Copyright © 2021-{DateTime.Now.Year} Hibi_10000";
foreach (string hashTypeName in HashCalculate.GetHashTypeNames())
{
HashSelector.Items.Add(new ComboBoxItem { Content = hashTypeName });
Expand Down
8 changes: 7 additions & 1 deletion src/Hash.Wpf/Strings/ParentResource.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,14 @@
xmlns:local="clr-namespace:Hash.Wpf">
<sys:String x:Key="AppName">HashCalculator</sys:String>
<x:Static x:Key="Version" Member="local:App.SemVer"/>
<str:Strings x:Key="Title" StringFormat="{}{0} {1}">
<sys:String x:Key="TitleBase">{0} {1}</sys:String>
<str:Strings x:Key="Title" StringFormat="{StaticResource TitleBase}">
<StaticResource ResourceKey="AppName"/>
<StaticResource ResourceKey="Version"/>
</str:Strings>
<x:Static x:Key="NowYear" Member="local:App.NowYear"/>
<sys:String x:Key="CopyRightBase">Copyright © 2021-{0} Hibi_10000</sys:String>
<str:Strings x:Key="CopyRight" StringFormat="{StaticResource CopyRightBase}">
<StaticResource ResourceKey="NowYear"/>
</str:Strings>
</ResourceDictionary>

0 comments on commit 7993787

Please sign in to comment.