Controller config - cleanup and fix compiling that was broken in last commit, also turn on new config dialog
This commit is contained in:
parent
ee27ce7828
commit
9681fc137e
|
@ -169,19 +169,12 @@
|
|||
<Compile Include="config\ControllerConfig.Designer.cs">
|
||||
<DependentUpon>ControllerConfig.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="config\ControllerConfig\ButtonListConfigPanel.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="config\ControllerConfig\ButtonListConfigPanel.Designer.cs">
|
||||
<DependentUpon>ButtonListConfigPanel.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="config\ControllerConfig\ControllerConfigPanel.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="config\ControllerConfig\ControllerConfigPanel.Designer.cs">
|
||||
<DependentUpon>ControllerConfigPanel.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="config\ControllerConfig\NESConsoleButtons.cs" />
|
||||
<Compile Include="config\GifAnimator.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -464,9 +457,6 @@
|
|||
<EmbeddedResource Include="config\ControllerConfig.resx">
|
||||
<DependentUpon>ControllerConfig.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="config\ControllerConfig\ButtonListConfigPanel.resx">
|
||||
<DependentUpon>ButtonListConfigPanel.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="config\ControllerConfig\ControllerConfigPanel.resx">
|
||||
<DependentUpon>ControllerConfigPanel.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
|
@ -56,6 +56,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
ColecoController = new ColecoVisionControllerTemplate(true);
|
||||
|
||||
NESConsoleButtons = new NESConsoleButtonTemplate(); ;
|
||||
}
|
||||
|
||||
// Directories
|
||||
|
@ -664,6 +665,7 @@ namespace BizHawk.MultiClient
|
|||
//NES settings
|
||||
public NESControllerTemplate[] NESController = new NESControllerTemplate[4];
|
||||
public NESControllerTemplate[] NESAutoController = new NESControllerTemplate[4];
|
||||
public NESConsoleButtonTemplate NESConsoleButtons = new NESConsoleButtonTemplate();
|
||||
|
||||
//SNES settings
|
||||
public SNESControllerTemplate[] SNESController = new SNESControllerTemplate[4];
|
||||
|
@ -717,10 +719,12 @@ namespace BizHawk.MultiClient
|
|||
public bool Atari2600_ShowMissle2 = true;
|
||||
public bool Atari2600_ShowBall = true;
|
||||
public bool Atari2600_ShowPlayfield = true;
|
||||
}
|
||||
|
||||
//NES Console buttons
|
||||
public string NESReset = "";
|
||||
public string NESPower = "";
|
||||
public class NESConsoleButtonTemplate
|
||||
{
|
||||
public string NESResetBindings = "";
|
||||
public string NESPowerBindings = "";
|
||||
}
|
||||
|
||||
public class SMSControllerTemplate
|
||||
|
|
|
@ -844,8 +844,8 @@ namespace BizHawk.MultiClient
|
|||
nesControls.BindMulti("P" + (i + 1) + " Start", Global.Config.NESController[i].Start);
|
||||
}
|
||||
|
||||
nesControls.BindMulti("Reset", Global.Config.NESReset);
|
||||
nesControls.BindMulti("Power", Global.Config.NESPower);
|
||||
nesControls.BindMulti("Reset", Global.Config.NESConsoleButtons.NESResetBindings);
|
||||
nesControls.BindMulti("Power", Global.Config.NESConsoleButtons.NESPowerBindings);
|
||||
|
||||
Global.NESControls = nesControls;
|
||||
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
this.tabPage31 = new System.Windows.Forms.TabPage();
|
||||
this.tabPage32 = new System.Windows.Forms.TabPage();
|
||||
this.tabPage9 = new System.Windows.Forms.TabPage();
|
||||
this.pictureBox6 = new System.Windows.Forms.PictureBox();
|
||||
this.tabControl9 = new System.Windows.Forms.TabControl();
|
||||
this.tabPage52 = new System.Windows.Forms.TabPage();
|
||||
this.tabPage53 = new System.Windows.Forms.TabPage();
|
||||
|
@ -99,10 +100,10 @@
|
|||
this.tabPage49 = new System.Windows.Forms.TabPage();
|
||||
this.tabPage50 = new System.Windows.Forms.TabPage();
|
||||
this.tabPage8 = new System.Windows.Forms.TabPage();
|
||||
this.pictureBox7 = new System.Windows.Forms.PictureBox();
|
||||
this.Cancel = new System.Windows.Forms.Button();
|
||||
this.OK = new System.Windows.Forms.Button();
|
||||
this.label38 = new System.Windows.Forms.Label();
|
||||
this.pictureBox6 = new System.Windows.Forms.PictureBox();
|
||||
this.AllowLR = new System.Windows.Forms.CheckBox();
|
||||
this.NESController1Panel = new BizHawk.MultiClient.ControllerConfigPanel();
|
||||
this.NESController2Panel = new BizHawk.MultiClient.ControllerConfigPanel();
|
||||
|
@ -143,7 +144,7 @@
|
|||
this.Atari2600Autofire1Panel = new BizHawk.MultiClient.ControllerConfigPanel();
|
||||
this.Atari2600Autofire2Panel = new BizHawk.MultiClient.ControllerConfigPanel();
|
||||
this.TI83ControllerPanel = new BizHawk.MultiClient.ControllerConfigPanel();
|
||||
this.pictureBox7 = new System.Windows.Forms.PictureBox();
|
||||
this.NESConsoleButtons = new BizHawk.MultiClient.ControllerConfigPanel();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.ControllerImage)).BeginInit();
|
||||
|
@ -152,6 +153,7 @@
|
|||
this.tabPage14.SuspendLayout();
|
||||
this.tabPage15.SuspendLayout();
|
||||
this.tabPage16.SuspendLayout();
|
||||
this.tabPage17.SuspendLayout();
|
||||
this.tabPage18.SuspendLayout();
|
||||
this.tabPage19.SuspendLayout();
|
||||
this.tabPage20.SuspendLayout();
|
||||
|
@ -173,6 +175,7 @@
|
|||
this.tabPage31.SuspendLayout();
|
||||
this.tabPage32.SuspendLayout();
|
||||
this.tabPage9.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit();
|
||||
this.tabControl9.SuspendLayout();
|
||||
this.tabPage52.SuspendLayout();
|
||||
this.tabPage55.SuspendLayout();
|
||||
|
@ -206,7 +209,6 @@
|
|||
this.tabPage7.SuspendLayout();
|
||||
this.tabControl8.SuspendLayout();
|
||||
this.tabPage8.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
|
@ -319,6 +321,7 @@
|
|||
//
|
||||
// tabPage17
|
||||
//
|
||||
this.tabPage17.Controls.Add(this.NESConsoleButtons);
|
||||
this.tabPage17.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage17.Name = "tabPage17";
|
||||
this.tabPage17.Size = new System.Drawing.Size(445, 378);
|
||||
|
@ -570,6 +573,20 @@
|
|||
this.tabPage9.Text = "Genesis";
|
||||
this.tabPage9.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// pictureBox6
|
||||
//
|
||||
this.pictureBox6.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pictureBox6.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.pictureBox6.Image = global::BizHawk.MultiClient.Properties.Resources.GENController;
|
||||
this.pictureBox6.Location = new System.Drawing.Point(472, 43);
|
||||
this.pictureBox6.Name = "pictureBox6";
|
||||
this.pictureBox6.Size = new System.Drawing.Size(261, 305);
|
||||
this.pictureBox6.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.pictureBox6.TabIndex = 4;
|
||||
this.pictureBox6.TabStop = false;
|
||||
//
|
||||
// tabControl9
|
||||
//
|
||||
this.tabControl9.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
|
@ -1015,6 +1032,20 @@
|
|||
this.tabPage8.Text = "TI-83";
|
||||
this.tabPage8.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// pictureBox7
|
||||
//
|
||||
this.pictureBox7.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pictureBox7.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.pictureBox7.Image = global::BizHawk.MultiClient.Properties.Resources.TI83_Controller;
|
||||
this.pictureBox7.Location = new System.Drawing.Point(593, 18);
|
||||
this.pictureBox7.Name = "pictureBox7";
|
||||
this.pictureBox7.Size = new System.Drawing.Size(186, 273);
|
||||
this.pictureBox7.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.pictureBox7.TabIndex = 4;
|
||||
this.pictureBox7.TabStop = false;
|
||||
//
|
||||
// Cancel
|
||||
//
|
||||
this.Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
|
@ -1048,20 +1079,6 @@
|
|||
this.label38.TabIndex = 10;
|
||||
this.label38.Text = "* Escape clears a key mapping";
|
||||
//
|
||||
// pictureBox6
|
||||
//
|
||||
this.pictureBox6.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pictureBox6.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.pictureBox6.Image = global::BizHawk.MultiClient.Properties.Resources.GENController;
|
||||
this.pictureBox6.Location = new System.Drawing.Point(472, 43);
|
||||
this.pictureBox6.Name = "pictureBox6";
|
||||
this.pictureBox6.Size = new System.Drawing.Size(261, 305);
|
||||
this.pictureBox6.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.pictureBox6.TabIndex = 4;
|
||||
this.pictureBox6.TabStop = false;
|
||||
//
|
||||
// AllowLR
|
||||
//
|
||||
this.AllowLR.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
|
@ -1346,19 +1363,12 @@
|
|||
this.TI83ControllerPanel.Size = new System.Drawing.Size(567, 404);
|
||||
this.TI83ControllerPanel.TabIndex = 1;
|
||||
//
|
||||
// pictureBox7
|
||||
// NESConsoleButtons
|
||||
//
|
||||
this.pictureBox7.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pictureBox7.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.pictureBox7.Image = global::BizHawk.MultiClient.Properties.Resources.TI83_Controller;
|
||||
this.pictureBox7.Location = new System.Drawing.Point(593, 18);
|
||||
this.pictureBox7.Name = "pictureBox7";
|
||||
this.pictureBox7.Size = new System.Drawing.Size(186, 273);
|
||||
this.pictureBox7.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.pictureBox7.TabIndex = 4;
|
||||
this.pictureBox7.TabStop = false;
|
||||
this.NESConsoleButtons.Location = new System.Drawing.Point(30, 25);
|
||||
this.NESConsoleButtons.Name = "NESConsoleButtons";
|
||||
this.NESConsoleButtons.Size = new System.Drawing.Size(100, 20);
|
||||
this.NESConsoleButtons.TabIndex = 0;
|
||||
//
|
||||
// ControllerConfig
|
||||
//
|
||||
|
@ -1383,6 +1393,8 @@
|
|||
this.tabPage14.ResumeLayout(false);
|
||||
this.tabPage15.ResumeLayout(false);
|
||||
this.tabPage16.ResumeLayout(false);
|
||||
this.tabPage17.ResumeLayout(false);
|
||||
this.tabPage17.PerformLayout();
|
||||
this.tabPage18.ResumeLayout(false);
|
||||
this.tabPage19.ResumeLayout(false);
|
||||
this.tabPage20.ResumeLayout(false);
|
||||
|
@ -1404,6 +1416,7 @@
|
|||
this.tabPage31.ResumeLayout(false);
|
||||
this.tabPage32.ResumeLayout(false);
|
||||
this.tabPage9.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
|
||||
this.tabControl9.ResumeLayout(false);
|
||||
this.tabPage52.ResumeLayout(false);
|
||||
this.tabPage55.ResumeLayout(false);
|
||||
|
@ -1437,7 +1450,6 @@
|
|||
this.tabPage7.ResumeLayout(false);
|
||||
this.tabControl8.ResumeLayout(false);
|
||||
this.tabPage8.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
@ -1562,5 +1574,6 @@
|
|||
private System.Windows.Forms.CheckBox AllowLR;
|
||||
private ControllerConfigPanel TI83ControllerPanel;
|
||||
private System.Windows.Forms.PictureBox pictureBox7;
|
||||
private BizHawk.MultiClient.ControllerConfigPanel NESConsoleButtons;
|
||||
}
|
||||
}
|
|
@ -68,6 +68,7 @@ namespace BizHawk.MultiClient
|
|||
Atari2600Autofire2Panel.LoadSettings(Global.Config.Atari2600AutoController[1]);
|
||||
|
||||
TI83ControllerPanel.LoadSettings(Global.Config.TI83Controller[0]);
|
||||
NESConsoleButtons.LoadSettings(Global.Config.NESConsoleButtons);
|
||||
|
||||
SetAutoTab(true);
|
||||
}
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
namespace BizHawk.MultiClient
|
||||
{
|
||||
partial class ButtonListConfigPanel
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// ButtonListConfigPanel
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Name = "ButtonListConfigPanel";
|
||||
this.Load += new System.EventHandler(this.ButtonListConfigPanel_Load);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,105 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Reflection;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class ButtonListConfigPanel : UserControl
|
||||
{
|
||||
List<object> ConfigObjects; //Object that values will be saved to (In Config.cs)
|
||||
|
||||
public List<string> buttons = new List<string>();
|
||||
|
||||
public int InputMarginLeft = 0;
|
||||
public int LabelPadding = 10;
|
||||
|
||||
public int MarginTop = 0;
|
||||
public int Spacing = 30;
|
||||
public int InputSize = 200;
|
||||
|
||||
protected List<InputWidget> Inputs = new List<InputWidget>();
|
||||
protected List<Label> Labels = new List<Label>();
|
||||
|
||||
public ButtonListConfigPanel()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void ButtonListConfigPanel_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Save()
|
||||
{
|
||||
for (int button = 0; button < buttons.Count; button++)
|
||||
{
|
||||
FieldInfo buttonF = ConfigObjects[button].GetType().GetField(buttons[button]);
|
||||
buttonF.SetValue(ConfigObjects[button], Inputs[button].Text);
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadSettings(List<object> stringobjs) //These must be string objects
|
||||
{
|
||||
ConfigObjects = stringobjs;
|
||||
|
||||
SetButtonList();
|
||||
Startup();
|
||||
SetWidgetStrings();
|
||||
}
|
||||
|
||||
private void SetButtonList()
|
||||
{
|
||||
buttons.Clear();
|
||||
|
||||
|
||||
|
||||
//MemberInfo[] members = ControllerConfigObject.GetType().GetMembers();
|
||||
|
||||
//foreach (MemberInfo member in members)
|
||||
//{
|
||||
// Type type = member.GetType();
|
||||
|
||||
// if (member.MemberType.ToString() == "Field" && member.ToString().Contains("System.String"))
|
||||
// {
|
||||
// buttons.Add(member.Name);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
private void SetWidgetStrings()
|
||||
{
|
||||
for (int button = 0; button < buttons.Count; button++)
|
||||
{
|
||||
//FieldInfo buttonF = ControllerConfigObject.GetType().GetField(buttons[button]);
|
||||
//object field = ControllerConfigObject.GetType().GetField(buttons[button]).GetValue(ControllerConfigObject);
|
||||
//Inputs[button].SetBindings(field.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private void Startup()
|
||||
{
|
||||
for (int i = 0; i < buttons.Count; i++)
|
||||
{
|
||||
InputWidget iw = new InputWidget();
|
||||
iw.Location = new Point(InputMarginLeft, MarginTop + (i * Spacing));
|
||||
iw.Size = new Size(InputSize, 23);
|
||||
iw.TabIndex = i;
|
||||
Controls.Add(iw);
|
||||
Inputs.Add(iw);
|
||||
|
||||
Label l = new Label();
|
||||
l.Location = new Point(InputMarginLeft + InputSize + LabelPadding, MarginTop + (i * Spacing) + 3);
|
||||
l.Text = buttons[i];
|
||||
Controls.Add(l);
|
||||
Labels.Add(l);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
|
@ -1,72 +0,0 @@
|
|||
namespace BizHawk.MultiClient.config.ControllerConfig
|
||||
{
|
||||
partial class UserControlGamePad
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.flowLayoutPanelLabels = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.flowLayoutPanelCommands = new System.Windows.Forms.FlowLayoutPanel();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// flowLayoutPanelLabels
|
||||
//
|
||||
this.flowLayoutPanelLabels.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.flowLayoutPanelLabels.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
|
||||
this.flowLayoutPanelLabels.Location = new System.Drawing.Point(0, 0);
|
||||
this.flowLayoutPanelLabels.Name = "flowLayoutPanelLabels";
|
||||
this.flowLayoutPanelLabels.Size = new System.Drawing.Size(155, 400);
|
||||
this.flowLayoutPanelLabels.TabIndex = 0;
|
||||
//
|
||||
// flowLayoutPanelCommands
|
||||
//
|
||||
this.flowLayoutPanelCommands.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.flowLayoutPanelCommands.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
|
||||
this.flowLayoutPanelCommands.Location = new System.Drawing.Point(161, 0);
|
||||
this.flowLayoutPanelCommands.Name = "flowLayoutPanelCommands";
|
||||
this.flowLayoutPanelCommands.Size = new System.Drawing.Size(154, 400);
|
||||
this.flowLayoutPanelCommands.TabIndex = 1;
|
||||
//
|
||||
// UserControlGamePad
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.flowLayoutPanelCommands);
|
||||
this.Controls.Add(this.flowLayoutPanelLabels);
|
||||
this.Name = "UserControlGamePad";
|
||||
this.Size = new System.Drawing.Size(315, 400);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanelLabels;
|
||||
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanelCommands;
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Reflection;
|
||||
|
||||
namespace BizHawk.MultiClient.config.ControllerConfig
|
||||
{
|
||||
public partial class UserControlGamePad : UserControl
|
||||
{
|
||||
private Object _Controler;
|
||||
public UserControlGamePad()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.Dock = DockStyle.Fill;
|
||||
SNESControllerTemplate tmp = new SNESControllerTemplate(false);
|
||||
|
||||
_Controler = tmp;
|
||||
initialize();
|
||||
}
|
||||
|
||||
public void initialize()
|
||||
{
|
||||
FieldInfo[] availbleComands = _Controler.GetType().GetFields().Where(x => x.FieldType == typeof(System.String)).ToArray();
|
||||
|
||||
foreach (FieldInfo item in availbleComands)
|
||||
{
|
||||
InputWidget iw = new InputWidget();
|
||||
Label label = new Label();
|
||||
label.Text = item.Name;
|
||||
iw.Text = item.GetValue(_Controler) as string;
|
||||
flowLayoutPanelCommands.Controls.Add(iw);
|
||||
flowLayoutPanelLabels.Controls.Add(label);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
Loading…
Reference in New Issue