-
Notifications
You must be signed in to change notification settings - Fork 8
/
AboutForm.cs
46 lines (39 loc) · 1.24 KB
/
AboutForm.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
using System;
using System.Diagnostics;
using System.Drawing;
using System.Reflection;
using System.Windows.Forms;
using BlackOps2SoundStudio.Properties;
namespace BlackOps2SoundStudio
{
public partial class AboutForm : Form
{
public AboutForm()
{
InitializeComponent();
aboutRichTextBox.Rtf = Resources.About;
// DPI clipping fix.
using (var g = CreateGraphics())
if (g.DpiX > 96)
Recurse(this);
var v = typeof(AboutForm).Assembly.GetName().Version;
versionLabel.Text = "Version " + v.Major + "." + v.Minor + "." + v.Build;
}
private void Recurse(Control control)
{
foreach (Control child in control.Controls)
Recurse(child);
var label = control as Label;
if (label != null)
label.Font = new Font(label.Font.FontFamily, label.Font.Size * 0.75f, label.Font.Style);
}
private void closeButton_Click(object sender, EventArgs e)
{
Close();
}
private void aboutRichTextBox_LinkClicked(object sender, LinkClickedEventArgs e)
{
Process.Start(e.LinkText);
}
}
}