//
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Reflection;
using System.Diagnostics;
using System.IO;
//
private void AboutForm_Load(object sender, System.EventArgs e)
{
// get assembly info not available from application object
AssemblyCopyrightAttribute copyright = (AssemblyCopyrightAttribute)
AssemblyCopyrightAttribute.GetCustomAttribute(Assembly.GetExecutingAssembly(),
typeof(AssemblyCopyrightAttribute));
AssemblyDescriptionAttribute description = (AssemblyDescriptionAttribute)
AssemblyDescriptionAttribute.GetCustomAttribute(System.Reflection.Assembly.GetExecutingAssembly(),
typeof(AssemblyDescriptionAttribute));
// set labels
lblDescription.Text = description.Description;
lblVersion.Text = "Version: " + Application.ProductVersion;
lblCopyright.Text = copyright.Copyright;
// set links
linkCS.Links[0].LinkData = "http://msdn.microsoft.com/vcsharp/";
linkCompany.Links[0].LinkData = "http://www.vertigosoftware.com/";
// display components used by this assembly
AssemblyName[] assemComponents = Assembly.GetExecutingAssembly().GetReferencedAssemblies();
foreach (AssemblyName assemName in assemComponents)
{
ListViewItem item = listComponents.Items.Add(assemName.Name);
item.SubItems.Add(assemName.Version.ToString());
}
}