BizHawk/BizHawk.Client.EmuHawk/BizBox.cs

80 lines
2.1 KiB
C#
Raw Normal View History

2014-06-01 01:57:22 +00:00
using BizHawk.Emulation.Common;
using System;
using System.Linq;
using System.Reflection;
2011-07-31 02:13:24 +00:00
using System.Windows.Forms;
namespace BizHawk.Client.EmuHawk
2011-07-31 02:13:24 +00:00
{
public partial class BizBox : Form
{
public BizBox()
{
InitializeComponent();
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
linkLabel1.LinkVisited = true;
System.Diagnostics.Process.Start("http://tasvideos.org/Bizhawk.html");
2011-07-31 02:13:24 +00:00
}
private void OK_Click(object sender, EventArgs e)
{
Close();
2011-07-31 02:13:24 +00:00
}
private void BizBox_Load(object sender, EventArgs e)
{
2017-04-27 16:37:26 +00:00
string mainversion = VersionInfo.Mainversion;
2016-04-23 09:55:13 +00:00
if (IntPtr.Size == 8)
mainversion += " (x64)";
if (VersionInfo.DeveloperBuild)
{
2019-03-18 14:06:37 +00:00
Text = $" BizHawk (GIT {SubWCRev.GIT_BRANCH}#{SubWCRev.GIT_SHORTHASH})";
}
else
{
2019-03-18 14:06:37 +00:00
Text = $"Version {mainversion} (GIT {SubWCRev.GIT_BRANCH}#{SubWCRev.GIT_SHORTHASH})";
}
2019-03-18 14:06:37 +00:00
VersionLabel.Text = $"Version {mainversion}";
DateLabel.Text = VersionInfo.RELEASEDATE;
2014-06-01 01:57:22 +00:00
var cores = Assembly
.Load("BizHawk.Emulation.Cores")
.GetTypes()
.Where(t => typeof(IEmulator).IsAssignableFrom(t))
.Select(t => t.GetCustomAttributes(false).OfType<CoreAttribute>().FirstOrDefault())
2014-06-01 01:57:22 +00:00
.Where(a => a != null)
.Where(a => a.Released)
.OrderByDescending(a => a.CoreName.ToLower());
2014-06-01 01:57:22 +00:00
foreach (var core in cores)
2014-06-01 01:57:22 +00:00
{
CoreInfoPanel.Controls.Add(new BizBoxInfoControl(core)
{
Dock = DockStyle.Top
});
}
2019-03-18 14:06:37 +00:00
linkLabel2.Text = $"Commit # {SubWCRev.GIT_SHORTHASH}";
}
private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
2019-03-18 14:06:37 +00:00
System.Diagnostics.Process.Start($"https://github.com/TASVideos/BizHawk/commit/{SubWCRev.GIT_SHORTHASH}");
}
private void btnCopyHash_Click(object sender, EventArgs e)
{
System.Windows.Forms.Clipboard.SetText(SubWCRev.GIT_SHORTHASH);
2014-05-02 21:36:33 +00:00
}
private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("https://github.com/TASVideos/BizHawk/graphs/contributors");
}
2011-07-31 02:13:24 +00:00
}
}