mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-24 21:54:59 +00:00
fix: Dynamic load copyright (#1030)
This commit is contained in:
parent
caca1dcaaf
commit
57cb9d0909
13 changed files with 14 additions and 13 deletions
|
@ -11,11 +11,21 @@ namespace SourceGit.Views
|
|||
private set;
|
||||
}
|
||||
|
||||
public string Copyright
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public About()
|
||||
{
|
||||
var ver = Assembly.GetExecutingAssembly().GetName().Version;
|
||||
if (ver != null)
|
||||
Version = $"{ver.Major}.{ver.Minor}";
|
||||
var attributes = Assembly.GetExecutingAssembly()
|
||||
.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
|
||||
if (attributes.Length > 0)
|
||||
Copyright = ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
|
||||
|
||||
DataContext = this;
|
||||
InitializeComponent();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue