Subversion Repositories DevTools

Rev

Rev 2094 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2094 Rev 2126
Line 1... Line 1...
1
using System;
1
using System;
2
using System.Drawing;
2
using System.Drawing;
3
using System.Collections;
3
using System.Collections;
4
using System.ComponentModel;
4
using System.ComponentModel;
5
using System.Windows.Forms;
5
using System.Windows.Forms;
-
 
6
using System.Reflection;
6
 
7
 
7
namespace EA_DocGen
8
namespace EA_DocGen
8
{
9
{
9
	/// <summary>
10
	/// <summary>
10
	/// Summary description for AboutForm.
11
	/// Summary description for AboutForm.
11
	/// </summary>
12
	/// </summary>
12
	public class AboutForm : System.Windows.Forms.Form
13
	public class AboutForm : System.Windows.Forms.Form
13
	{
14
	{
14
      private System.Windows.Forms.Label label1;
15
      private System.Windows.Forms.Label label1;
15
      private System.Windows.Forms.LinkLabel linkLabel1;
16
      private System.Windows.Forms.LinkLabel linkLabel1;
-
 
17
      private System.Windows.Forms.Label label_version;
-
 
18
      private System.Windows.Forms.LinkLabel linkLabel2;
16
		/// <summary>
19
		/// <summary>
17
		/// Required designer variable.
20
		/// Required designer variable.
18
		/// </summary>
21
		/// </summary>
19
		private System.ComponentModel.Container components = null;
22
		private System.ComponentModel.Container components = null;
20
 
23
 
Line 25... Line 28...
25
			//
28
			//
26
			InitializeComponent();
29
			InitializeComponent();
27
 
30
 
28
         this.linkLabel1.Links[0].LinkData = "http://bms/docRegister/docDetail.asp?docnum=TECHGP-00177";
31
         this.linkLabel1.Links[0].LinkData = "http://bms/docRegister/docDetail.asp?docnum=TECHGP-00177";
29
 
32
 
-
 
33
         this.linkLabel2.Links[0].LinkData = "http://bms/docRegister/docDetail.asp?docnum=TECHGP-00186";
30
			//
34
 
31
			// TODO: Add any constructor code after InitializeComponent call
35
         Assembly asm = Assembly.GetExecutingAssembly();
-
 
36
         AssemblyName asmName = asm.GetName();
32
			//
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);
33
		}
43
		}
34
 
44
 
35
		/// <summary>
45
		/// <summary>
36
		/// Clean up any resources being used.
46
		/// Clean up any resources being used.
37
		/// </summary>
47
		/// </summary>
Line 54... Line 64...
54
		/// </summary>
64
		/// </summary>
55
		private void InitializeComponent()
65
		private void InitializeComponent()
56
		{
66
		{
57
         this.label1 = new System.Windows.Forms.Label();
67
         this.label1 = new System.Windows.Forms.Label();
58
         this.linkLabel1 = new System.Windows.Forms.LinkLabel();
68
         this.linkLabel1 = new System.Windows.Forms.LinkLabel();
-
 
69
         this.label_version = new System.Windows.Forms.Label();
-
 
70
         this.linkLabel2 = new System.Windows.Forms.LinkLabel();
59
         this.SuspendLayout();
71
         this.SuspendLayout();
60
         // 
72
         // 
61
         // label1
73
         // label1
62
         // 
74
         // 
63
         this.label1.Location = new System.Drawing.Point(24, 8);
75
         this.label1.Location = new System.Drawing.Point(24, 8);
64
         this.label1.Name = "label1";
76
         this.label1.Name = "label1";
65
         this.label1.Size = new System.Drawing.Size(320, 56);
77
         this.label1.Size = new System.Drawing.Size(416, 40);
66
         this.label1.TabIndex = 0;
78
         this.label1.TabIndex = 0;
67
         this.label1.Text = "ERG Enterprise Architect Document Generation Addin.";
79
         this.label1.Text = "ERG Enterprise Architect Document Generation Addin.";
68
         // 
80
         // 
69
         // linkLabel1
81
         // linkLabel1
70
         // 
82
         // 
71
         this.linkLabel1.Location = new System.Drawing.Point(16, 96);
83
         this.linkLabel1.Location = new System.Drawing.Point(16, 96);
72
         this.linkLabel1.Name = "linkLabel1";
84
         this.linkLabel1.Name = "linkLabel1";
73
         this.linkLabel1.Size = new System.Drawing.Size(328, 16);
85
         this.linkLabel1.Size = new System.Drawing.Size(432, 16);
74
         this.linkLabel1.TabIndex = 3;
86
         this.linkLabel1.TabIndex = 3;
75
         this.linkLabel1.TabStop = true;
87
         this.linkLabel1.TabStop = true;
76
         this.linkLabel1.Text = "see TECHGP-00177 EA_DocGen User Manaual";
88
         this.linkLabel1.Text = "see TECHGP-00177 EA_DocGen User Manaual";
77
         this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
89
         this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
78
         // 
90
         // 
-
 
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
         // 
79
         // AboutForm
109
         // AboutForm
80
         // 
110
         // 
81
         this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
111
         this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
82
         this.ClientSize = new System.Drawing.Size(360, 144);
112
         this.ClientSize = new System.Drawing.Size(464, 184);
-
 
113
         this.Controls.Add(this.linkLabel2);
-
 
114
         this.Controls.Add(this.label_version);
83
         this.Controls.Add(this.linkLabel1);
115
         this.Controls.Add(this.linkLabel1);
84
         this.Controls.Add(this.label1);
116
         this.Controls.Add(this.label1);
85
         this.Name = "AboutForm";
117
         this.Name = "AboutForm";
86
         this.Text = "About";
118
         this.Text = "About";
87
         this.ResumeLayout(false);
119
         this.ResumeLayout(false);
Line 109... Line 141...
109
            MessageBox.Show("Item clicked: " + target);
141
            MessageBox.Show("Item clicked: " + target);
110
         }
142
         }
111
     
143
     
112
      }
144
      }
113
 
145
 
-
 
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;
-
 
150
 
-
 
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;
114
 
154
 
-
 
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
      }
115
 
166
 
116
 
167
 
117
	}
168
	}
118
}
169
}