Ai
4 Star 11 Fork 8

鸣飞/BuildH框架代码开发辅助工具

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
AboutBox1.cs 3.54 KB
一键复制 编辑 原始数据 按行查看 历史
鸣飞 提交于 2019-02-12 16:31 +08:00 . xxx
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Windows.Forms;
namespace CodeGenerator.UI
{
partial class AboutBox1 : Form
{
public AboutBox1()
{
InitializeComponent();
//this.Text = String.Format("关于 {0}", AssemblyTitle);
//this.labelProductName.Text = AssemblyProduct;
//this.labelVersion.Text = String.Format("版本 {0}", AssemblyVersion);
//this.labelCopyright.Text = AssemblyCopyright;
//this.labelCompanyName.Text = AssemblyCompany;
//this.textBoxDescription.Text = AssemblyDescription;
}
#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().CodeBase);
}
}
public string AssemblyVersion
{
get
{
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
}
}
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 labelCompanyName_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://www.buildh.cn");
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/mf_/CodeGenerator.git
git@gitee.com:mf_/CodeGenerator.git
mf_
CodeGenerator
BuildH框架代码开发辅助工具
master

搜索帮助