Mesen-X/GUI.NET/Forms/frmInputBarcode.cs
Souryo 850102bbdc Input: Added support for ~20 new peripherals (Incomplete, more fixes/changes to come)
Movies: Rewrote format to support all IO devices and console types
Netplay: Now supports all IO devices and console types
2017-11-19 23:08:23 -05:00

37 lines
765 B
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Mesen.GUI.Forms
{
public partial class frmInputBarcode : BaseConfigForm
{
public class BarcodeData
{
public UInt64 Barcode;
}
public frmInputBarcode()
{
InitializeComponent();
Entity = new BarcodeData();
AddBinding("Barcode", txtBarcode, eNumberFormat.Decimal);
}
protected override void OnFormClosed(FormClosedEventArgs e)
{
base.OnFormClosed(e);
if(DialogResult == DialogResult.OK) {
InteropEmu.InputBarcode(((BarcodeData)Entity).Barcode, txtBarcode.Text.Length > 8 ? 13 : 8);
}
}
}
}