Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2169 ghuddy 1
using System;
2
using System.Drawing;
3
using System.Collections;
4
using System.ComponentModel;
5
using System.Windows.Forms;
6
using System.Reflection;
7
 
8
namespace EA_ReqPro
9
{
10
	/// <summary>
11
	/// Summary description for AboutForm.
12
	/// </summary>
13
	public class AboutForm : System.Windows.Forms.Form
14
	{
15
      private System.Windows.Forms.Label label1;
16
      private System.Windows.Forms.LinkLabel linkLabel1;
17
      private System.Windows.Forms.Label label_version;
18
		/// <summary>
19
		/// Required designer variable.
20
		/// </summary>
21
		private System.ComponentModel.Container components = null;
22
 
23
		public AboutForm()
24
		{
25
			//
26
			// Required for Windows Form Designer support
27
			//
28
			InitializeComponent();
29
 
30
         this.linkLabel1.Links[0].LinkData = "http://bms/docRegister/docDetail.asp?docnum=TECHGP-00027";
31
 
32
         Assembly asm = Assembly.GetExecutingAssembly();
33
         AssemblyName asmName = asm.GetName();
34
 
35
         this.label_version.Text = string.Format("Version {0}.{1}.{2}.{3}",
36
         asmName.Version.Major,
37
         asmName.Version.Minor,
38
         asmName.Version.Build,
39
         asmName.Version.Revision);
40
 
41
		}
42
 
43
		/// <summary>
44
		/// Clean up any resources being used.
45
		/// </summary>
46
		protected override void Dispose( bool disposing )
47
		{
48
			if( disposing )
49
			{
50
				if(components != null)
51
				{
52
					components.Dispose();
53
				}
54
			}
55
			base.Dispose( disposing );
56
		}
57
 
58
		#region Windows Form Designer generated code
59
		/// <summary>
60
		/// Required method for Designer support - do not modify
61
		/// the contents of this method with the code editor.
62
		/// </summary>
63
		private void InitializeComponent()
64
		{
65
         this.label1 = new System.Windows.Forms.Label();
66
         this.linkLabel1 = new System.Windows.Forms.LinkLabel();
67
         this.label_version = new System.Windows.Forms.Label();
68
         this.SuspendLayout();
69
         // 
70
         // label1
71
         // 
72
         this.label1.Location = new System.Drawing.Point(24, 8);
73
         this.label1.Name = "label1";
74
         this.label1.Size = new System.Drawing.Size(320, 40);
75
         this.label1.TabIndex = 0;
76
         this.label1.Text = "ERG Enterprise Architect ReqPro Integration Addin.";
77
         // 
78
         // linkLabel1
79
         // 
80
         this.linkLabel1.Location = new System.Drawing.Point(16, 96);
81
         this.linkLabel1.Name = "linkLabel1";
82
         this.linkLabel1.Size = new System.Drawing.Size(328, 16);
83
         this.linkLabel1.TabIndex = 3;
84
         this.linkLabel1.TabStop = true;
85
         this.linkLabel1.Text = "see TECHGP-00027 EA_ReqPro User Manaual";
86
         this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
87
         // 
88
         // label_version
89
         // 
90
         this.label_version.Location = new System.Drawing.Point(24, 48);
91
         this.label_version.Name = "label_version";
92
         this.label_version.Size = new System.Drawing.Size(320, 23);
93
         this.label_version.TabIndex = 4;
94
         this.label_version.Text = "version unknown";
95
         // 
96
         // AboutForm
97
         // 
98
         this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
99
         this.ClientSize = new System.Drawing.Size(400, 144);
100
         this.Controls.Add(this.label_version);
101
         this.Controls.Add(this.linkLabel1);
102
         this.Controls.Add(this.label1);
103
         this.Name = "AboutForm";
104
         this.Text = "About";
105
         this.ResumeLayout(false);
106
 
107
      }
108
		#endregion
109
 
110
      private void linkLabel1_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
111
      {
112
         // Determine which link was clicked within the LinkLabel.
113
         this.linkLabel1.Links[linkLabel1.Links.IndexOf(e.Link)].Visited = true;
114
 
115
         // Display the appropriate link based on the value of the
116
         // LinkData property of the Link object.
117
         string target = e.Link.LinkData as string;
118
 
119
         // If the value looks like a URL, navigate to it.
120
         // Otherwise, display it in a message box.
121
         if(null != target && target.StartsWith("http"))
122
         {
123
            System.Diagnostics.Process.Start(target);
124
         }
125
         else
126
         {
127
            MessageBox.Show("Item clicked: " + target);
128
         }
129
 
130
      }
131
 
132
 
133
 
134
 
135
	}
136
}