-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAboutDialog.cs
211 lines (198 loc) · 8.25 KB
/
AboutDialog.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using Want.Logging;
using Want.RecordEditor.Properties;
namespace Want.RecordEditor.View
{
/// <summary>
/// Summary description for AboutDialog.
/// </summary>
public class AboutDialog : System.Windows.Forms.Form
{
private System.Windows.Forms.Button btnOk;
private System.Windows.Forms.LinkLabel linkLblCompany;
private static Logger logger = Logger.GetSingleton();
private Panel panel1;
private Label label1;
private Panel panel2;
private Label labelCopyright;
private Label labelVersion;
private Label label2;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public AboutDialog()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
labelVersion.Text = "Version " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
linkLblCompany.Links[0].LinkData = "want gmbh";
linkLblCompany.Links.Add(0, linkLblCompany.Text.Length, "http://www.want.ch/");
linkLblCompany.LinkClicked += new LinkLabelLinkClickedEventHandler(linkLblAbout_LinkClicked);
}
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutDialog));
this.btnOk = new System.Windows.Forms.Button();
this.linkLblCompany = new System.Windows.Forms.LinkLabel();
this.panel1 = new System.Windows.Forms.Panel();
this.label1 = new System.Windows.Forms.Label();
this.labelCopyright = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.label2 = new System.Windows.Forms.Label();
this.labelVersion = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// btnOk
//
this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnOk.Location = new System.Drawing.Point(304, 175);
this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(75, 23);
this.btnOk.TabIndex = 0;
this.btnOk.Text = "OK";
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
//
// linkLblCompany
//
this.linkLblCompany.Location = new System.Drawing.Point(13, 25);
this.linkLblCompany.Name = "linkLblCompany";
this.linkLblCompany.Size = new System.Drawing.Size(159, 12);
this.linkLblCompany.TabIndex = 1;
this.linkLblCompany.TabStop = true;
this.linkLblCompany.Text = "WaNT GmbH, Switzerland";
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(118)))), ((int)(((byte)(139)))), ((int)(((byte)(191)))));
this.panel1.Controls.Add(this.label1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(391, 45);
this.panel1.TabIndex = 2;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.ForeColor = System.Drawing.Color.White;
this.label1.Location = new System.Drawing.Point(12, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(331, 24);
this.label1.TabIndex = 0;
this.label1.Text = "FillRed - fixed-length record editor";
//
// labelCopyright
//
this.labelCopyright.AutoSize = true;
this.labelCopyright.ForeColor = System.Drawing.Color.DimGray;
this.labelCopyright.Location = new System.Drawing.Point(13, 59);
this.labelCopyright.Name = "labelCopyright";
this.labelCopyright.Size = new System.Drawing.Size(168, 13);
this.labelCopyright.TabIndex = 1;
this.labelCopyright.Text = "(c) 2006 - 2010 All rights reserved.";
//
// panel2
//
this.panel2.BackColor = System.Drawing.SystemColors.Window;
this.panel2.Controls.Add(this.label2);
this.panel2.Controls.Add(this.labelVersion);
this.panel2.Controls.Add(this.linkLblCompany);
this.panel2.Controls.Add(this.labelCopyright);
this.panel2.Controls.Add(this.btnOk);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(0, 45);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(391, 210);
this.panel2.TabIndex = 3;
//
// label2
//
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.label2.Location = new System.Drawing.Point(13, 86);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(366, 79);
this.label2.TabIndex = 4;
this.label2.Text = resources.GetString("label2.Text");
//
// labelVersion
//
this.labelVersion.AutoSize = true;
this.labelVersion.ForeColor = System.Drawing.Color.DimGray;
this.labelVersion.Location = new System.Drawing.Point(13, 37);
this.labelVersion.Name = "labelVersion";
this.labelVersion.Size = new System.Drawing.Size(42, 13);
this.labelVersion.TabIndex = 3;
this.labelVersion.Text = "Version";
//
// AboutDialog
//
this.AcceptButton = this.btnOk;
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.BackColor = System.Drawing.SystemColors.InactiveCaptionText;
this.ClientSize = new System.Drawing.Size(391, 255);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "AboutDialog";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "About";
this.TopMost = true;
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private void btnOk_Click(object sender, System.EventArgs e)
{
this.Dispose();
}
private void linkLblAbout_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
try
{
linkLblCompany.LinkVisited = true;
System.Diagnostics.Process.Start(linkLblCompany.Links[0].LinkData.ToString());
}
catch (Exception ex)
{
logger.Log(Logger.MessageType.WARN, ex.Message + " when opening <about> link");
}
}
}
}