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;
|
|
|
|
|
|
2013-11-03 03:54:37 +00:00
|
|
|
|
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)
|
|
|
|
|
{
|
2013-04-14 23:56:45 +00:00
|
|
|
|
linkLabel1.LinkVisited = true;
|
2013-08-22 21:14:13 +00:00
|
|
|
|
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)
|
|
|
|
|
{
|
2013-04-14 23:56:45 +00:00
|
|
|
|
Close();
|
2011-07-31 02:13:24 +00:00
|
|
|
|
}
|
2012-04-21 15:25:47 +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)";
|
2014-06-04 17:02:54 +00:00
|
|
|
|
if (VersionInfo.DeveloperBuild)
|
2013-08-22 21:14:13 +00:00
|
|
|
|
{
|
2019-03-18 14:06:37 +00:00
|
|
|
|
Text = $" BizHawk (GIT {SubWCRev.GIT_BRANCH}#{SubWCRev.GIT_SHORTHASH})";
|
2013-08-22 21:14:13 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2019-03-18 14:06:37 +00:00
|
|
|
|
Text = $"Version {mainversion} (GIT {SubWCRev.GIT_BRANCH}#{SubWCRev.GIT_SHORTHASH})";
|
2013-08-22 21:14:13 +00:00
|
|
|
|
}
|
2014-05-08 18:35:50 +00:00
|
|
|
|
|
2019-03-18 14:06:37 +00:00
|
|
|
|
VersionLabel.Text = $"Version {mainversion}";
|
2016-05-22 22:52:14 +00:00
|
|
|
|
DateLabel.Text = VersionInfo.RELEASEDATE;
|
2013-07-28 19:09:52 +00:00
|
|
|
|
|
2014-06-01 01:57:22 +00:00
|
|
|
|
var cores = Assembly
|
|
|
|
|
.Load("BizHawk.Emulation.Cores")
|
|
|
|
|
.GetTypes()
|
|
|
|
|
.Where(t => typeof(IEmulator).IsAssignableFrom(t))
|
2017-07-12 19:10:55 +00:00
|
|
|
|
.Select(t => t.GetCustomAttributes(false).OfType<CoreAttribute>().FirstOrDefault())
|
2014-06-01 01:57:22 +00:00
|
|
|
|
.Where(a => a != null)
|
|
|
|
|
.Where(a => a.Released)
|
2019-10-13 15:50:57 +00:00
|
|
|
|
.OrderByDescending(a => a.CoreName.ToLower());
|
2014-06-01 01:57:22 +00:00
|
|
|
|
|
2016-05-22 22:52:14 +00:00
|
|
|
|
foreach (var core in cores)
|
2014-06-01 01:57:22 +00:00
|
|
|
|
{
|
|
|
|
|
CoreInfoPanel.Controls.Add(new BizBoxInfoControl(core)
|
|
|
|
|
{
|
|
|
|
|
Dock = DockStyle.Top
|
|
|
|
|
});
|
|
|
|
|
}
|
2015-10-04 01:26:30 +00:00
|
|
|
|
|
2019-03-18 14:06:37 +00:00
|
|
|
|
linkLabel2.Text = $"Commit # {SubWCRev.GIT_SHORTHASH}";
|
2015-10-04 01:26:30 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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}");
|
2015-10-04 01:26:30 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void btnCopyHash_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
System.Windows.Forms.Clipboard.SetText(SubWCRev.GIT_SHORTHASH);
|
2014-05-02 21:36:33 +00:00
|
|
|
|
}
|
2016-05-22 22:52:14 +00:00
|
|
|
|
|
|
|
|
|
private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
|
|
|
|
{
|
2016-06-11 16:40:25 +00:00
|
|
|
|
System.Diagnostics.Process.Start("https://github.com/TASVideos/BizHawk/graphs/contributors");
|
2016-05-22 22:52:14 +00:00
|
|
|
|
}
|
2011-07-31 02:13:24 +00:00
|
|
|
|
}
|
|
|
|
|
}
|