1、 / - AssemblyInfo.cs 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 =
2、 AssemblyDescription; #region 程序集属性访问器 public string AssemblyTitle get / 获取此程序集上的所有 Title 属性 object attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false); / 如果至少有一个 Title 属性 if (attributes.Length 0) / 请选择第一个属性 AssemblyTitleAttribute titleAttribute =
3、(AssemblyTitleAttribute)attributes0; / 如果该属性为非空字符串,则将其返回 if (titleAttribute.Title != ) return titleAttribute.Title; / 如果没有 Title 属性,或者 Title 属性为一个空字符串,则返回 .exe 的名称 return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase); public string AssemblyVersion return Assemb
4、ly.GetExecutingAssembly().GetName().Version.ToString(); public string AssemblyDescription / 获取此程序集的所有 Description 属性 object attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false); / 如果 Description 属性不存在,则返回一个空字符串 if (attributes.Length = 0) retur
5、n ; / 如果有 Description 属性,则返回该属性的值 return (AssemblyDescriptionAttribute)attributes0).Description; public string AssemblyProduct / 获取此程序集上的所有 Product 属性 object attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false); / 如果 Product 属性不存在,则返回一个空字符串 / 如果有
6、Product 属性,则返回该属性的值 return (AssemblyProductAttribute)attributes0).Product; public string AssemblyCopyright / 获取此程序集上的所有 Copyright 属性 object attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); / 如果 Copyright 属性不存在,则返回一个空字符串 / 如果有 Copyright 属性,则
7、返回该属性的值 return (AssemblyCopyrightAttribute)attributes0).Copyright; public string AssemblyCompany / 获取此程序集上的所有 Company 属性 object attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false); / 如果 Company 属性不存在,则返回一个空字符串 / 如果有 Company 属性,则返回该属性的值 return (As
8、semblyCompanyAttribute)attributes0).Company; #endregionnamespace CarManager partial class AboutBox1 / / 必需的设计器变量。/summary private System.ComponentModel.IContainer components = null; / 清理所有正在使用的资源。 protected override void Dispose(bool disposing) if (disposing & (components != null) components.Dispose
9、(); base.Dispose(disposing); #region Windows 窗体设计器生成的代码 / 设计器支持所需的方法 - 不要 / 使用代码编辑器修改此方法的内容。 private void InitializeComponent() System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutBox1); this.tableLayoutPanel = new System.Windows.
10、Forms.TableLayoutPanel(); this.logoPictureBox = new System.Windows.Forms.PictureBox(); this.labelProductName = new System.Windows.Forms.Label(); this.labelVersion = new System.Windows.Forms.Label(); this.labelCopyright = new System.Windows.Forms.Label(); this.labelCompanyName = new System.Windows.Fo
11、rms.Label(); this.textBoxDescription = new System.Windows.Forms.TextBox(); this.okButton = new System.Windows.Forms.Button(); this.tableLayoutPanel.SuspendLayout(); (System.ComponentModel.ISupportInitialize)(this.logoPictureBox).BeginInit(); this.SuspendLayout(); / / tableLayoutPanel this.tableLayou
12、tPanel.ColumnCount = 2; this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33F); this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 67F); this.tableLayoutPanel.Controls.Add
13、(this.logoPictureBox, 0, 0); this.tableLayoutPanel.Controls.Add(this.labelProductName, 1, 0); this.tableLayoutPanel.Controls.Add(this.labelVersion, 1, 1); this.tableLayoutPanel.Controls.Add(this.labelCopyright, 1, 2); this.tableLayoutPanel.Controls.Add(this.labelCompanyName, 1, 3); this.tableLayoutP
14、anel.Controls.Add(this.textBoxDescription, 1, 4); this.tableLayoutPanel.Controls.Add(this.okButton, 1, 5); this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel.Location = new System.Drawing.Point(9, 8); this.tableLayoutPanel.Name = tableLayoutPanel this.tableLayout
15、Panel.RowCount = 6; this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F); this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F); this.tableLayoutPanel.Size = new System.Drawing.Si
16、ze(417, 245); this.tableLayoutPanel.TabIndex = 0; / logoPictureBox this.logoPictureBox.Dock = System.Windows.Forms.DockStyle.Fill; this.logoPictureBox.Image = (System.Drawing.Image)(resources.GetObject(logoPictureBox.Image); this.logoPictureBox.Location = new System.Drawing.Point(3, 3); this.logoPic
17、tureBox.Name = logoPictureBox this.tableLayoutPanel.SetRowSpan(this.logoPictureBox, 6); this.logoPictureBox.Size = new System.Drawing.Size(131, 239); this.logoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.logoPictureBox.TabIndex = 12; this.logoPictureBox.TabStop =
18、false; / labelProductName this.labelProductName.Dock = System.Windows.Forms.DockStyle.Fill; this.labelProductName.Font = new System.Drawing.Font(微软雅黑, 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (byte)(134); this.labelProductName.Location = new System.Drawing.Point(143, 0);
19、 this.labelProductName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); this.labelProductName.MaximumSize = new System.Drawing.Size(0, 16); this.labelProductName.Name = labelProductName this.labelProductName.Size = new System.Drawing.Size(271, 16); this.labelProductName.TabIndex = 19; this.lab
20、elProductName.Text = 停车场管理系统 this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; / labelVersion this.labelVersion.Dock = System.Windows.Forms.DockStyle.Fill; this.labelVersion.Font = new System.Drawing.Font(, 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit
21、.Point, (byte)(134); this.labelVersion.Location = new System.Drawing.Point(143, 24); this.labelVersion.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); this.labelVersion.MaximumSize = new System.Drawing.Size(0, 16); this.labelVersion.Name = labelVersion this.labelVersion.Size = new System.Draw
22、ing.Size(271, 16); this.labelVersion.TabIndex = 0; this.labelVersion.Text = 版本 1.0 this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; / labelCopyright this.labelCopyright.Dock = System.Windows.Forms.DockStyle.Fill; this.labelCopyright.Font = new System.Drawing.Font( this.label
23、Copyright.Location = new System.Drawing.Point(143, 48); this.labelCopyright.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 16); this.labelCopyright.Name = labelCopyright this.labelCopyright.Size = new System.Drawing.Size(271, 16);
24、this.labelCopyright.TabIndex = 21; this.labelCopyright.Text = Copyright hcl this.labelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; / labelCompanyName this.labelCompanyName.Dock = System.Windows.Forms.DockStyle.Fill; this.labelCompanyName.Font = new System.Drawing.Font( this.labe
25、lCompanyName.Location = new System.Drawing.Point(143, 72); this.labelCompanyName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); this.labelCompanyName.MaximumSize = new System.Drawing.Size(0, 16); this.labelCompanyName.Name = labelCompanyName this.labelCompanyName.Size = new System.Drawing.Si
26、ze(271, 16); this.labelCompanyName.TabIndex = 22; this.labelCompanyName.Text = 公司名称 ustb this.labelCompanyName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; / textBoxDescription this.textBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill; this.textBoxDescription.Font = new System.Drawing.Font( this.textBoxDescription.Location = new System.Drawing.Point(143, 99); this.textBoxDescription.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3);
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1