Mercurial > servermonitor
annotate ServerMonitor/Forms/AboutForm.cs @ 39:7645122aa7a9
Get it working under Mono
author | Brad Greco <brad@bgreco.net> |
---|---|
date | Tue, 09 Jun 2020 20:59:00 -0400 |
parents | f6235dc0a8ec |
children |
rev | line source |
---|---|
19 | 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); | |
20 | 21 // Remove initial focus on the first link causing an dotted outline. |
22 ActiveControl = NameLabel; | |
19 | 23 } |
24 | |
25 /// <summary>Hides the form when ESC is pressed.</summary> | |
26 protected override bool ProcessDialogKey(Keys keyData) | |
27 { | |
28 if (keyData == Keys.Escape) | |
29 { | |
30 Close(); | |
31 return true; | |
32 } | |
33 return base.ProcessDialogKey(keyData); | |
34 } | |
35 | |
36 private void HomePageLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) | |
37 { | |
20 | 38 Process.Start("https://bgreco.net/servermonitor"); |
39 } | |
40 | |
41 private void SshNetLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) | |
42 { | |
43 Process.Start("https://github.com/sshnet/SSH.NET"); | |
44 } | |
45 | |
46 private void NAppUpdateLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) | |
47 { | |
48 Process.Start("https://github.com/synhershko/NAppUpdate"); | |
19 | 49 } |
29
f6235dc0a8ec
Add ability to play a sound on check failure.
Brad Greco <brad@bgreco.net>
parents:
20
diff
changeset
|
50 |
f6235dc0a8ec
Add ability to play a sound on check failure.
Brad Greco <brad@bgreco.net>
parents:
20
diff
changeset
|
51 private void NAudioLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) |
f6235dc0a8ec
Add ability to play a sound on check failure.
Brad Greco <brad@bgreco.net>
parents:
20
diff
changeset
|
52 { |
f6235dc0a8ec
Add ability to play a sound on check failure.
Brad Greco <brad@bgreco.net>
parents:
20
diff
changeset
|
53 Process.Start("https://github.com/naudio/NAudio"); |
f6235dc0a8ec
Add ability to play a sound on check failure.
Brad Greco <brad@bgreco.net>
parents:
20
diff
changeset
|
54 } |
19 | 55 } |
56 } |