-
Notifications
You must be signed in to change notification settings - Fork 0
/
AboutForm.cs
55 lines (47 loc) · 1.75 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
47
48
49
50
51
52
53
54
55
using System;
using System.Diagnostics;
using System.Reflection;
using System.Windows.Forms;
namespace GameOCRTTS
{
public partial class AboutForm : Form
{
public string CurrentVersion { get; private set; }
public AboutForm()
{
InitializeComponent();
}
private void AboutForm_Load(object sender, EventArgs e)
{
string process = Assembly.GetEntryAssembly().Location;
FileVersionInfo version = FileVersionInfo.GetVersionInfo(process);
CurrentVersion = $"{version.FileMajorPart}.{version.FileMinorPart}";
versionLabel.Text = $"version {CurrentVersion}";
}
private void mrflapstaartLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Process.Start("https://github.com/mrflapstaart");
}
private void wrt54gLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Process.Start("https://github.com/wrt54g");
}
private void githubpageButton_Click(object sender, EventArgs e)
{
Process.Start("https://github.com/MrFlapstaart/GameOCRTTS");
}
private void readmeButton_Click(object sender, EventArgs e)
{
Process.Start("https://github.com/MrFlapstaart/GameOCRTTS/blob/master/README.md");
}
private void changelogButton_Click(object sender, EventArgs e)
{
Process.Start($"https://github.com/MrFlapstaart/GameOCRTTS/blob/master/releases/{CurrentVersion}/CHANGELOG.md");
}
private void licenseButton_Click(object sender, EventArgs e)
{
LicenseForm licenseform = new LicenseForm();
licenseform.ShowDialog();
}
}
}