Subversion Repositories DevTools

Rev

Rev 2094 | Details | Compare with Previous | Last modification | View Log | RSS feed

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