去除警告

This commit is contained in:
ww-rm
2025-03-03 23:36:12 +08:00
parent eafc470fbe
commit e43eb876a4
2 changed files with 1 additions and 82 deletions

View File

@@ -131,7 +131,7 @@
ShowIcon = false; ShowIcon = false;
ShowInTaskbar = false; ShowInTaskbar = false;
StartPosition = FormStartPosition.CenterParent; StartPosition = FormStartPosition.CenterParent;
Text = "关于"; Text = "关于 SpineViewer";
tableLayoutPanel_About.ResumeLayout(false); tableLayoutPanel_About.ResumeLayout(false);
tableLayoutPanel_About.PerformLayout(); tableLayoutPanel_About.PerformLayout();
panel1.ResumeLayout(false); panel1.ResumeLayout(false);

View File

@@ -15,37 +15,9 @@ namespace SpineViewer.Dialogs
public AboutDialog() public AboutDialog()
{ {
InitializeComponent(); InitializeComponent();
this.Text = $"关于 {AssemblyTitle}";
this.label_Version.Text = $"v{InformationalVersion}"; this.label_Version.Text = $"v{InformationalVersion}";
} }
#region 访
public string AssemblyTitle
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
if(attributes.Length > 0)
{
AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0];
if(titleAttribute.Title != "")
{
return titleAttribute.Title;
}
}
return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().Location);
}
}
public string AssemblyVersion
{
get
{
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
}
}
public string InformationalVersion public string InformationalVersion
{ {
get get
@@ -54,59 +26,6 @@ namespace SpineViewer.Dialogs
} }
} }
public string AssemblyDescription
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false);
if (attributes.Length == 0)
{
return "";
}
return ((AssemblyDescriptionAttribute)attributes[0]).Description;
}
}
public string AssemblyProduct
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false);
if (attributes.Length == 0)
{
return "";
}
return ((AssemblyProductAttribute)attributes[0]).Product;
}
}
public string AssemblyCopyright
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
if (attributes.Length == 0)
{
return "";
}
return ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
}
}
public string AssemblyCompany
{
get
{
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false);
if (attributes.Length == 0)
{
return "";
}
return ((AssemblyCompanyAttribute)attributes[0]).Company;
}
}
#endregion
private void linkLabel_RepoUrl_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) private void linkLabel_RepoUrl_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{ {
string url = linkLabel_RepoUrl.Text; string url = linkLabel_RepoUrl.Text;