Skip to content

Commit

Permalink
Add new about and license forms.
Browse files Browse the repository at this point in the history
  • Loading branch information
wrt54g committed May 4, 2023
1 parent c839ebe commit 3fb4fe5
Show file tree
Hide file tree
Showing 8 changed files with 1,607 additions and 2 deletions.
232 changes: 232 additions & 0 deletions AboutForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

62 changes: 62 additions & 0 deletions AboutForm.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
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.Show();
}
}
}
Loading

0 comments on commit 3fb4fe5

Please sign in to comment.