Mercurial > servermonitor
comparison ServerMonitor/Forms/AboutForm.cs @ 19:b3128fe10d57
Add About form and license.
author | Brad Greco <brad@bgreco.net> |
---|---|
date | Wed, 29 May 2019 20:18:37 -0400 |
parents | |
children | b21318f6e3f1 |
comparison
equal
deleted
inserted
replaced
18:b713b9db4c82 | 19:b3128fe10d57 |
---|---|
1 using ServerMonitorApp.Properties; | |
2 using System; | |
3 using System.Diagnostics; | |
4 using System.Reflection; | |
5 using System.Windows.Forms; | |
6 | |
7 namespace ServerMonitorApp | |
8 { | |
9 /// <summary>Program About form.</summary> | |
10 public partial class AboutForm : Form | |
11 { | |
12 public AboutForm() | |
13 { | |
14 InitializeComponent(); | |
15 } | |
16 | |
17 private void AboutForm_Load(object sender, EventArgs e) | |
18 { | |
19 Icon = Resources.icon; | |
20 NameLabel.Text += " " + Assembly.GetExecutingAssembly().GetName().Version.ToString(2); | |
21 } | |
22 | |
23 /// <summary>Hides the form when ESC is pressed.</summary> | |
24 protected override bool ProcessDialogKey(Keys keyData) | |
25 { | |
26 if (keyData == Keys.Escape) | |
27 { | |
28 Close(); | |
29 return true; | |
30 } | |
31 return base.ProcessDialogKey(keyData); | |
32 } | |
33 | |
34 private void HomePageLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) | |
35 { | |
36 Process.Start("http://bgreco.net/servermonitor"); | |
37 } | |
38 } | |
39 } |