Rev 2094 | Blame | Compare with Previous | Last modification | View Log | RSS feed
using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Reflection;namespace EA_DocGen{/// <summary>/// Summary description for AboutForm./// </summary>public class AboutForm : System.Windows.Forms.Form{private System.Windows.Forms.Label label1;private System.Windows.Forms.LinkLabel linkLabel1;private System.Windows.Forms.Label label_version;private System.Windows.Forms.LinkLabel linkLabel2;/// <summary>/// Required designer variable./// </summary>private System.ComponentModel.Container components = null;public AboutForm(){//// Required for Windows Form Designer support//InitializeComponent();this.linkLabel1.Links[0].LinkData = "http://bms/docRegister/docDetail.asp?docnum=TECHGP-00177";this.linkLabel2.Links[0].LinkData = "http://bms/docRegister/docDetail.asp?docnum=TECHGP-00186";Assembly asm = Assembly.GetExecutingAssembly();AssemblyName asmName = asm.GetName();this.label_version.Text = string.Format("Version {0}.{1}.{2}.{3}",asmName.Version.Major,asmName.Version.Minor,asmName.Version.Build,asmName.Version.Revision);}/// <summary>/// Clean up any resources being used./// </summary>protected override void Dispose( bool disposing ){if( disposing ){if(components != null){components.Dispose();}}base.Dispose( disposing );}#region Windows Form Designer generated code/// <summary>/// Required method for Designer support - do not modify/// the contents of this method with the code editor./// </summary>private void InitializeComponent(){this.label1 = new System.Windows.Forms.Label();this.linkLabel1 = new System.Windows.Forms.LinkLabel();this.label_version = new System.Windows.Forms.Label();this.linkLabel2 = new System.Windows.Forms.LinkLabel();this.SuspendLayout();//// label1//this.label1.Location = new System.Drawing.Point(24, 8);this.label1.Name = "label1";this.label1.Size = new System.Drawing.Size(416, 40);this.label1.TabIndex = 0;this.label1.Text = "ERG Enterprise Architect Document Generation Addin.";//// linkLabel1//this.linkLabel1.Location = new System.Drawing.Point(16, 96);this.linkLabel1.Name = "linkLabel1";this.linkLabel1.Size = new System.Drawing.Size(432, 16);this.linkLabel1.TabIndex = 3;this.linkLabel1.TabStop = true;this.linkLabel1.Text = "see TECHGP-00177 EA_DocGen User Manaual";this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);//// label_version//this.label_version.Location = new System.Drawing.Point(24, 48);this.label_version.Name = "label_version";this.label_version.Size = new System.Drawing.Size(320, 23);this.label_version.TabIndex = 4;this.label_version.Text = "label2";//// linkLabel2//this.linkLabel2.Location = new System.Drawing.Point(16, 136);this.linkLabel2.Name = "linkLabel2";this.linkLabel2.Size = new System.Drawing.Size(440, 32);this.linkLabel2.TabIndex = 5;this.linkLabel2.TabStop = true;this.linkLabel2.Text = "see TECHGP-00186 EA_DocGen Scenario Based User Manual";this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked);//// AboutForm//this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);this.ClientSize = new System.Drawing.Size(464, 184);this.Controls.Add(this.linkLabel2);this.Controls.Add(this.label_version);this.Controls.Add(this.linkLabel1);this.Controls.Add(this.label1);this.Name = "AboutForm";this.Text = "About";this.ResumeLayout(false);}#endregionprivate void linkLabel1_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e){// Determine which link was clicked within the LinkLabel.this.linkLabel1.Links[linkLabel1.Links.IndexOf(e.Link)].Visited = true;// Display the appropriate link based on the value of the// LinkData property of the Link object.string target = e.Link.LinkData as string;// If the value looks like a URL, navigate to it.// Otherwise, display it in a message box.if(null != target && target.StartsWith("http")){System.Diagnostics.Process.Start(target);}else{MessageBox.Show("Item clicked: " + target);}}private void linkLabel2_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e){// Determine which link was clicked within the LinkLabel.this.linkLabel2.Links[linkLabel2.Links.IndexOf(e.Link)].Visited = true;// Display the appropriate link based on the value of the// LinkData property of the Link object.string target = e.Link.LinkData as string;// If the value looks like a URL, navigate to it.// Otherwise, display it in a message box.if(null != target && target.StartsWith("http")){System.Diagnostics.Process.Start(target);}else{MessageBox.Show("Item clicked: " + target);}}}}