BizHawk/BizHawk.Client.EmuHawk/BizBoxInfoControl.cs

45 lines
996 B
C#
Raw Normal View History

2019-12-31 16:17:55 +00:00
using System.Windows.Forms;
2014-06-01 01:57:22 +00:00
using BizHawk.Emulation.Common;
namespace BizHawk.Client.EmuHawk
{
public partial class BizBoxInfoControl : UserControl
{
2019-12-31 16:17:55 +00:00
private readonly string _url = "";
2014-06-01 01:57:22 +00:00
public BizBoxInfoControl(CoreAttribute attributes)
2014-06-01 01:57:22 +00:00
{
InitializeComponent();
CoreNameLabel.Text = attributes.CoreName;
if (!string.IsNullOrEmpty(attributes.Author))
{
2019-03-18 14:06:37 +00:00
CoreAuthorLabel.Text = $"authors: {attributes.Author}";
2014-06-01 01:57:22 +00:00
}
else
{
CoreAuthorLabel.Visible = false;
}
2017-05-10 11:45:23 +00:00
CorePortedLabel.Text = attributes.Ported ? " (Ported)" : "";
2014-06-01 01:57:22 +00:00
if (!attributes.Ported)
{
CoreUrlLink.Visible = false;
}
else
{
CoreUrlLink.Visible = true;
CoreUrlLink.Text = attributes.PortedVersion;
2019-12-31 16:17:55 +00:00
_url = attributes.PortedUrl;
2014-06-01 01:57:22 +00:00
}
}
private void CoreUrlLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
CoreUrlLink.LinkVisited = true;
2019-12-31 16:17:55 +00:00
System.Diagnostics.Process.Start(_url);
2014-06-01 01:57:22 +00:00
}
}
}