Build 62.

Complete rework of Options and DevOptions
New dialog for all possible ones
GUI improvement for Mapped Actions
Refactoring of node selection using an Event
pull/104/head
bm98 8 years ago
parent 23649da891
commit ce5406e073

@ -11,43 +11,44 @@ namespace SCJMapper_V2
/// </summary>
public abstract class DeviceCls
{
public const String DeviceClass ="UNDEF";
public const String DeviceID = "NA0_";
static public Boolean IsUndefined( String deviceClass )
public const string DeviceClass ="UNDEF";
public const string DeviceID = "NA0_";
static public bool IsUndefined( string deviceClass )
{
return ( deviceClass == DeviceClass );
}
public const String BlendedInput = "~"; // internal used only
static public Boolean IsBlendedInput( String input ) { return ( input == BlendedInput ); }
public const string BlendedInput = "~"; // internal used only
static public bool IsBlendedInput( string input ) { return ( input == BlendedInput ); }
static public Boolean IsDeviceClass( String deviceClass ) { return false; }
static public String DeviceClassFromInput( String input ) { return DeviceClass; }
static public String DevInput( String input ) { return input; }
static public Boolean DevMatch( String devInput ) { return false; }
static public bool IsDeviceClass( string deviceClass ) { return false; }
static public string DeviceClassFromInput( string input ) { return DeviceClass; }
static public string DevInput( string input ) { return input; }
static public bool DevMatch( string devInput ) { return false; }
public abstract String DevClass { get; }
public abstract String DevName { get; }
public abstract string DevClass { get; }
public abstract string DevName { get; }
public abstract System.Drawing.Color MapColor { get; }
public virtual List<string> AnalogCommands { get { return new List<string>( ); } } // just return an empty one if not implemented
public abstract Boolean Activated { get; set; }
public abstract bool Activated { get; set; }
public virtual void FinishDX( ) { }
public virtual void ApplySettings( ) { }
public abstract String GetLastChange( );
public abstract void GetCmdData( String cmd, out int data );
public abstract string GetLastChange( );
public abstract void GetCmdData( string cmd, out int data );
public abstract void GetData( );
static public String toXML( String blendedInput )
static public string toXML( string blendedInput )
{
return blendedInput.Replace( BlendedInput, " " ); // must make spaces (tilde is for internal processing only)
}
static public String toXMLBlendExtension( String blendedInput )
static public string toXMLBlendExtension( string blendedInput )
{
return (IsBlendedInput(blendedInput) ? string.Format( "multiTap=\"1\"") : "" ); // blending needs to overwrite potential multitaps (2+)
}
static public String fromXML( String blendedInput )
static public string fromXML( string blendedInput )
{
return blendedInput.Replace( " ", BlendedInput ); // must make tilde (spaces is for external processing only)
}

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SCJMapper_V2
{
public class DeviceList : List<DeviceCls>
{
}
}

@ -88,7 +88,6 @@
this.tdiAddMod3 = new System.Windows.Forms.ToolStripMenuItem();
this.tc1 = new System.Windows.Forms.TabControl();
this.tabJS1 = new System.Windows.Forms.TabPage();
this.UC_JoyPanel = new SCJMapper_V2.Joystick.UC_JoyPanel();
this.panel1 = new System.Windows.Forms.Panel();
this.btClip = new System.Windows.Forms.Button();
this.txRebind = new System.Windows.Forms.TextBox();
@ -102,6 +101,7 @@
this.SFD = new System.Windows.Forms.SaveFileDialog();
this.tlpanel = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.btOptions = new System.Windows.Forms.Button();
this.btDumpLog = new System.Windows.Forms.Button();
this.btJSTuning = new System.Windows.Forms.Button();
this.btDumpProfile = new System.Windows.Forms.Button();
@ -109,12 +109,11 @@
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.btSettings = new System.Windows.Forms.Button();
this.btJsReassign = new System.Windows.Forms.Button();
this.lblPTU = new System.Windows.Forms.Label();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
this.btSaveMyMapping = new System.Windows.Forms.Button();
this.btLoadMyMapping = new System.Windows.Forms.Button();
this.txMappingName = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.lblPTU = new System.Windows.Forms.Label();
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
this.cbxShowJoystick = new System.Windows.Forms.CheckBox();
this.cbxShowGamepad = new System.Windows.Forms.CheckBox();
@ -126,15 +125,6 @@
this.btClearFilter = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.lblProfileUsed = new System.Windows.Forms.Label();
this.flpExtensions = new System.Windows.Forms.FlowLayoutPanel();
this.cbxInvAimPitch = new System.Windows.Forms.CheckBox();
this.cbxInvViewPitch = new System.Windows.Forms.CheckBox();
this.cbxInvAimYaw = new System.Windows.Forms.CheckBox();
this.cbxInvViewYaw = new System.Windows.Forms.CheckBox();
this.cbxInvThrottle = new System.Windows.Forms.CheckBox();
this.cbxInvStrafeVert = new System.Windows.Forms.CheckBox();
this.cbxInvStrafeLat = new System.Windows.Forms.CheckBox();
this.cbxInvStrafeLon = new System.Windows.Forms.CheckBox();
this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
this.toolStripStatusLabel2 = new System.Windows.Forms.ToolStripStatusLabel();
this.tsBtReset = new System.Windows.Forms.ToolStripDropDownButton();
@ -150,6 +140,9 @@
this.loadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.label5 = new System.Windows.Forms.Label();
this.lblAssigned = new System.Windows.Forms.Label();
this.UC_JoyPanel = new SCJMapper_V2.Joystick.UC_JoyPanel();
this.cmCopyPaste.SuspendLayout();
this.panel2.SuspendLayout();
this.cmMouseEntry.SuspendLayout();
@ -162,7 +155,6 @@
this.tableLayoutPanel2.SuspendLayout();
this.tableLayoutPanel3.SuspendLayout();
this.flowLayoutPanel2.SuspendLayout();
this.flpExtensions.SuspendLayout();
this.tableLayoutPanel4.SuspendLayout();
this.statusStrip1.SuspendLayout();
this.SuspendLayout();
@ -184,9 +176,10 @@
this.rtb.DetectUrls = false;
this.rtb.Dock = System.Windows.Forms.DockStyle.Fill;
this.rtb.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rtb.Location = new System.Drawing.Point(676, 81);
this.rtb.Location = new System.Drawing.Point(686, 81);
this.rtb.Name = "rtb";
this.rtb.Size = new System.Drawing.Size(372, 561);
this.tlpanel.SetRowSpan(this.rtb, 2);
this.rtb.Size = new System.Drawing.Size(362, 686);
this.rtb.TabIndex = 21;
this.rtb.Text = "";
this.rtb.WordWrap = false;
@ -254,7 +247,7 @@
// btGrab
//
this.btGrab.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btGrab.Location = new System.Drawing.Point(171, 3);
this.btGrab.Location = new System.Drawing.Point(181, 3);
this.btGrab.Name = "btGrab";
this.btGrab.Size = new System.Drawing.Size(120, 24);
this.btGrab.TabIndex = 19;
@ -276,7 +269,8 @@
//
this.panel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel2.Controls.Add(this.btMakeMod);
this.panel2.Controls.Add(this.label5);
this.panel2.Controls.Add(this.lblAssigned);
this.panel2.Controls.Add(this.btJsKbd);
this.panel2.Controls.Add(this.btBlend);
this.panel2.Controls.Add(this.lblLastJ);
@ -290,12 +284,12 @@
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Location = new System.Drawing.Point(3, 379);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(288, 167);
this.panel2.Size = new System.Drawing.Size(298, 167);
this.panel2.TabIndex = 17;
//
// btMakeMod
//
this.btMakeMod.Location = new System.Drawing.Point(10, 137);
this.btMakeMod.Location = new System.Drawing.Point(155, 3);
this.btMakeMod.Name = "btMakeMod";
this.btMakeMod.Size = new System.Drawing.Size(73, 25);
this.btMakeMod.TabIndex = 17;
@ -309,7 +303,7 @@
this.btJsKbd.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btJsKbd.ImageKey = "J";
this.btJsKbd.ImageList = this.IL;
this.btJsKbd.Location = new System.Drawing.Point(104, 102);
this.btJsKbd.Location = new System.Drawing.Point(107, 134);
this.btJsKbd.Name = "btJsKbd";
this.btJsKbd.Size = new System.Drawing.Size(79, 25);
this.btJsKbd.TabIndex = 16;
@ -334,7 +328,7 @@
//
// btBlend
//
this.btBlend.Location = new System.Drawing.Point(10, 102);
this.btBlend.Location = new System.Drawing.Point(9, 134);
this.btBlend.Name = "btBlend";
this.btBlend.Size = new System.Drawing.Size(73, 25);
this.btBlend.TabIndex = 16;
@ -346,9 +340,9 @@
//
this.lblLastJ.CausesValidation = false;
this.lblLastJ.ContextMenuStrip = this.cmMouseEntry;
this.lblLastJ.Location = new System.Drawing.Point(52, 42);
this.lblLastJ.Location = new System.Drawing.Point(64, 74);
this.lblLastJ.Name = "lblLastJ";
this.lblLastJ.Size = new System.Drawing.Size(222, 22);
this.lblLastJ.Size = new System.Drawing.Size(224, 22);
this.lblLastJ.TabIndex = 14;
this.lblLastJ.Text = "...";
this.lblLastJ.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lblLastJ_KeyDown);
@ -426,7 +420,7 @@
// cbxThrottle
//
this.cbxThrottle.AutoSize = true;
this.cbxThrottle.Location = new System.Drawing.Point(89, 76);
this.cbxThrottle.Location = new System.Drawing.Point(89, 108);
this.cbxThrottle.Name = "cbxThrottle";
this.cbxThrottle.Size = new System.Drawing.Size(66, 17);
this.cbxThrottle.TabIndex = 13;
@ -435,7 +429,7 @@
//
// btFind
//
this.btFind.Location = new System.Drawing.Point(201, 71);
this.btFind.Location = new System.Drawing.Point(215, 103);
this.btFind.Name = "btFind";
this.btFind.Size = new System.Drawing.Size(73, 25);
this.btFind.TabIndex = 12;
@ -446,24 +440,24 @@
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(7, 45);
this.label7.Location = new System.Drawing.Point(4, 77);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(28, 13);
this.label7.Size = new System.Drawing.Size(50, 13);
this.label7.TabIndex = 3;
this.label7.Text = "Ctrl.";
this.label7.Text = "Dev Ctrl.";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(7, 17);
this.label6.Location = new System.Drawing.Point(4, 18);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(33, 13);
this.label6.Size = new System.Drawing.Size(50, 13);
this.label6.TabIndex = 3;
this.label6.Text = "Cmd.";
this.label6.Text = "Selected";
//
// btClear
//
this.btClear.Location = new System.Drawing.Point(201, 102);
this.btClear.Location = new System.Drawing.Point(215, 134);
this.btClear.Name = "btClear";
this.btClear.Size = new System.Drawing.Size(73, 25);
this.btClear.TabIndex = 2;
@ -475,15 +469,15 @@
//
this.lblAction.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.lblAction.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblAction.Location = new System.Drawing.Point(52, 17);
this.lblAction.Location = new System.Drawing.Point(64, 17);
this.lblAction.Name = "lblAction";
this.lblAction.Size = new System.Drawing.Size(222, 20);
this.lblAction.Size = new System.Drawing.Size(224, 20);
this.lblAction.TabIndex = 1;
this.lblAction.Text = "...";
//
// btAssign
//
this.btAssign.Location = new System.Drawing.Point(10, 71);
this.btAssign.Location = new System.Drawing.Point(9, 103);
this.btAssign.Name = "btAssign";
this.btAssign.Size = new System.Drawing.Size(73, 25);
this.btAssign.TabIndex = 15;
@ -505,7 +499,6 @@
this.treeView1.SelectedImageKey = "Selected";
this.treeView1.Size = new System.Drawing.Size(364, 686);
this.treeView1.TabIndex = 16;
this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
this.treeView1.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick);
//
// cmAddDel
@ -664,7 +657,7 @@
this.tc1.Name = "tc1";
this.tc1.SelectedIndex = 0;
this.tc1.ShowToolTips = true;
this.tc1.Size = new System.Drawing.Size(288, 370);
this.tc1.Size = new System.Drawing.Size(298, 370);
this.tc1.TabIndex = 15;
this.tc1.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.tc1_DrawItem);
this.tc1.Selected += new System.Windows.Forms.TabControlEventHandler(this.tc1_Selected);
@ -675,19 +668,10 @@
this.tabJS1.Location = new System.Drawing.Point(4, 24);
this.tabJS1.Name = "tabJS1";
this.tabJS1.Padding = new System.Windows.Forms.Padding(3);
this.tabJS1.Size = new System.Drawing.Size(280, 342);
this.tabJS1.Size = new System.Drawing.Size(290, 342);
this.tabJS1.TabIndex = 0;
this.tabJS1.Text = "Joystick 1";
//
// UC_JoyPanel
//
this.UC_JoyPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.UC_JoyPanel.JsAssignment = 0;
this.UC_JoyPanel.Location = new System.Drawing.Point(3, 3);
this.UC_JoyPanel.Name = "UC_JoyPanel";
this.UC_JoyPanel.Size = new System.Drawing.Size(274, 336);
this.UC_JoyPanel.TabIndex = 0;
//
// panel1
//
this.tlpanel.SetColumnSpan(this.panel1, 3);
@ -763,7 +747,7 @@
// buttonExit
//
this.buttonExit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonExit.Location = new System.Drawing.Point(171, 51);
this.buttonExit.Location = new System.Drawing.Point(181, 51);
this.buttonExit.Name = "buttonExit";
this.buttonExit.Size = new System.Drawing.Size(120, 24);
this.buttonExit.TabIndex = 13;
@ -793,7 +777,7 @@
//
this.tlpanel.ColumnCount = 3;
this.tlpanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 370F));
this.tlpanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 300F));
this.tlpanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 310F));
this.tlpanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tlpanel.Controls.Add(this.rtb, 2, 1);
this.tlpanel.Controls.Add(this.panel1, 0, 0);
@ -802,7 +786,6 @@
this.tlpanel.Controls.Add(this.tableLayoutPanel2, 1, 3);
this.tlpanel.Controls.Add(this.tableLayoutPanel3, 2, 3);
this.tlpanel.Controls.Add(this.flowLayoutPanel2, 0, 3);
this.tlpanel.Controls.Add(this.flpExtensions, 2, 2);
this.tlpanel.Controls.Add(this.tableLayoutPanel4, 1, 1);
this.tlpanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.tlpanel.GrowStyle = System.Windows.Forms.TableLayoutPanelGrowStyle.FixedSize;
@ -823,13 +806,14 @@
this.tableLayoutPanel1.ColumnCount = 2;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Controls.Add(this.btOptions, 1, 2);
this.tableLayoutPanel1.Controls.Add(this.btGrab, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.btDump, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.btDumpList, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.btDumpLog, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.btJSTuning, 1, 3);
this.tableLayoutPanel1.Controls.Add(this.btDumpProfile, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.btTable, 1, 2);
this.tableLayoutPanel1.Controls.Add(this.btTable, 1, 1);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.GrowStyle = System.Windows.Forms.TableLayoutPanelGrowStyle.FixedSize;
this.tableLayoutPanel1.Location = new System.Drawing.Point(376, 648);
@ -840,9 +824,19 @@
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(294, 119);
this.tableLayoutPanel1.Size = new System.Drawing.Size(304, 119);
this.tableLayoutPanel1.TabIndex = 23;
//
// btOptions
//
this.btOptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btOptions.Location = new System.Drawing.Point(181, 63);
this.btOptions.Name = "btOptions";
this.btOptions.Size = new System.Drawing.Size(120, 23);
this.btOptions.TabIndex = 28;
this.btOptions.Text = "Options...";
this.btOptions.Click += new System.EventHandler(this.btOptions_Click);
//
// btDumpLog
//
this.btDumpLog.Location = new System.Drawing.Point(3, 63);
@ -856,7 +850,7 @@
// btJSTuning
//
this.btJSTuning.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btJSTuning.Location = new System.Drawing.Point(171, 93);
this.btJSTuning.Location = new System.Drawing.Point(181, 93);
this.btJSTuning.Name = "btJSTuning";
this.btJSTuning.Size = new System.Drawing.Size(120, 23);
this.btJSTuning.TabIndex = 17;
@ -876,7 +870,7 @@
// btTable
//
this.btTable.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btTable.Location = new System.Drawing.Point(171, 63);
this.btTable.Location = new System.Drawing.Point(181, 33);
this.btTable.Name = "btTable";
this.btTable.Size = new System.Drawing.Size(120, 24);
this.btTable.TabIndex = 27;
@ -889,10 +883,10 @@
this.tableLayoutPanel2.ColumnCount = 2;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.Controls.Add(this.btMakeMod, 1, 0);
this.tableLayoutPanel2.Controls.Add(this.buttonExit, 1, 1);
this.tableLayoutPanel2.Controls.Add(this.btSettings, 0, 1);
this.tableLayoutPanel2.Controls.Add(this.btJsReassign, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.lblPTU, 1, 0);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.GrowStyle = System.Windows.Forms.TableLayoutPanelGrowStyle.FixedSize;
this.tableLayoutPanel2.Location = new System.Drawing.Point(376, 773);
@ -901,11 +895,12 @@
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(294, 78);
this.tableLayoutPanel2.Size = new System.Drawing.Size(304, 78);
this.tableLayoutPanel2.TabIndex = 24;
//
// btSettings
//
this.btSettings.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btSettings.Location = new System.Drawing.Point(3, 51);
this.btSettings.Name = "btSettings";
this.btSettings.Size = new System.Drawing.Size(120, 24);
@ -916,6 +911,7 @@
// btJsReassign
//
this.btJsReassign.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btJsReassign.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btJsReassign.Location = new System.Drawing.Point(3, 21);
this.btJsReassign.Name = "btJsReassign";
this.btJsReassign.Size = new System.Drawing.Size(120, 24);
@ -923,42 +919,30 @@
this.btJsReassign.Text = "Js Reassign...";
this.btJsReassign.Click += new System.EventHandler(this.btJsReassign_Click);
//
// lblPTU
//
this.lblPTU.BackColor = System.Drawing.Color.SandyBrown;
this.lblPTU.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblPTU.Location = new System.Drawing.Point(150, 0);
this.lblPTU.Name = "lblPTU";
this.lblPTU.Size = new System.Drawing.Size(141, 45);
this.lblPTU.TabIndex = 17;
this.lblPTU.Text = "Using PTU folders";
this.lblPTU.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.lblPTU.Visible = false;
//
// tableLayoutPanel3
//
this.tableLayoutPanel3.ColumnCount = 2;
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 240F));
this.tableLayoutPanel3.Controls.Add(this.btSaveMyMapping, 1, 1);
this.tableLayoutPanel3.Controls.Add(this.btLoadMyMapping, 0, 1);
this.tableLayoutPanel3.Controls.Add(this.txMappingName, 1, 0);
this.tableLayoutPanel3.Controls.Add(this.label1, 0, 0);
this.tableLayoutPanel3.Controls.Add(this.lblPTU, 0, 1);
this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel3.GrowStyle = System.Windows.Forms.TableLayoutPanelGrowStyle.FixedSize;
this.tableLayoutPanel3.Location = new System.Drawing.Point(676, 773);
this.tableLayoutPanel3.Location = new System.Drawing.Point(686, 773);
this.tableLayoutPanel3.Name = "tableLayoutPanel3";
this.tableLayoutPanel3.RowCount = 2;
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
this.tableLayoutPanel3.Size = new System.Drawing.Size(372, 78);
this.tableLayoutPanel3.Size = new System.Drawing.Size(362, 78);
this.tableLayoutPanel3.TabIndex = 25;
//
// btSaveMyMapping
//
this.btSaveMyMapping.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btSaveMyMapping.Image = ((System.Drawing.Image)(resources.GetObject("btSaveMyMapping.Image")));
this.btSaveMyMapping.Location = new System.Drawing.Point(164, 51);
this.btSaveMyMapping.Location = new System.Drawing.Point(154, 51);
this.btSaveMyMapping.Name = "btSaveMyMapping";
this.btSaveMyMapping.Size = new System.Drawing.Size(205, 24);
this.btSaveMyMapping.TabIndex = 15;
@ -967,21 +951,11 @@
this.btSaveMyMapping.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.btSaveMyMapping.Click += new System.EventHandler(this.btSaveMyMapping_Click);
//
// btLoadMyMapping
//
this.btLoadMyMapping.Location = new System.Drawing.Point(3, 51);
this.btLoadMyMapping.Name = "btLoadMyMapping";
this.btLoadMyMapping.Size = new System.Drawing.Size(120, 24);
this.btLoadMyMapping.TabIndex = 14;
this.btLoadMyMapping.Text = "Load my Mapping";
this.btLoadMyMapping.Visible = false;
this.btLoadMyMapping.Click += new System.EventHandler(this.btLoadMyMapping_Click);
//
// txMappingName
//
this.txMappingName.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.txMappingName.CharacterCasing = System.Windows.Forms.CharacterCasing.Lower;
this.txMappingName.Location = new System.Drawing.Point(135, 13);
this.txMappingName.Location = new System.Drawing.Point(125, 13);
this.txMappingName.Name = "txMappingName";
this.txMappingName.Size = new System.Drawing.Size(234, 22);
this.txMappingName.TabIndex = 0;
@ -992,12 +966,25 @@
//
this.label1.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(41, 17);
this.label1.Location = new System.Drawing.Point(31, 17);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(88, 13);
this.label1.TabIndex = 16;
this.label1.Text = "Mapping name:";
//
// lblPTU
//
this.lblPTU.BackColor = System.Drawing.Color.SandyBrown;
this.lblPTU.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblPTU.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblPTU.Location = new System.Drawing.Point(3, 48);
this.lblPTU.Name = "lblPTU";
this.lblPTU.Size = new System.Drawing.Size(116, 30);
this.lblPTU.TabIndex = 17;
this.lblPTU.Text = "Using PTU folders";
this.lblPTU.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.lblPTU.Visible = false;
//
// flowLayoutPanel2
//
this.flowLayoutPanel2.Controls.Add(this.cbxShowJoystick);
@ -1129,107 +1116,6 @@
this.lblProfileUsed.Text = "...";
this.lblProfileUsed.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// flpExtensions
//
this.flpExtensions.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.flpExtensions.Controls.Add(this.cbxInvAimPitch);
this.flpExtensions.Controls.Add(this.cbxInvViewPitch);
this.flpExtensions.Controls.Add(this.cbxInvAimYaw);
this.flpExtensions.Controls.Add(this.cbxInvViewYaw);
this.flpExtensions.Controls.Add(this.cbxInvThrottle);
this.flpExtensions.Controls.Add(this.cbxInvStrafeVert);
this.flpExtensions.Controls.Add(this.cbxInvStrafeLat);
this.flpExtensions.Controls.Add(this.cbxInvStrafeLon);
this.flpExtensions.Dock = System.Windows.Forms.DockStyle.Fill;
this.flpExtensions.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flpExtensions.Location = new System.Drawing.Point(676, 648);
this.flpExtensions.Name = "flpExtensions";
this.flpExtensions.Size = new System.Drawing.Size(372, 119);
this.flpExtensions.TabIndex = 27;
//
// cbxInvAimPitch
//
this.cbxInvAimPitch.Location = new System.Drawing.Point(3, 3);
this.cbxInvAimPitch.Name = "cbxInvAimPitch";
this.cbxInvAimPitch.Size = new System.Drawing.Size(168, 18);
this.cbxInvAimPitch.TabIndex = 0;
this.cbxInvAimPitch.Text = "Inv. Aim Pitch";
this.cbxInvAimPitch.UseVisualStyleBackColor = true;
this.cbxInvAimPitch.MouseClick += new System.Windows.Forms.MouseEventHandler(this.cbxInv_XY_MouseClick);
//
// cbxInvViewPitch
//
this.cbxInvViewPitch.Location = new System.Drawing.Point(3, 27);
this.cbxInvViewPitch.Name = "cbxInvViewPitch";
this.cbxInvViewPitch.Size = new System.Drawing.Size(168, 18);
this.cbxInvViewPitch.TabIndex = 0;
this.cbxInvViewPitch.Text = "Inv. View Pitch";
this.cbxInvViewPitch.UseVisualStyleBackColor = true;
this.cbxInvViewPitch.MouseClick += new System.Windows.Forms.MouseEventHandler(this.cbxInv_XY_MouseClick);
//
// cbxInvAimYaw
//
this.cbxInvAimYaw.Location = new System.Drawing.Point(3, 51);
this.cbxInvAimYaw.Name = "cbxInvAimYaw";
this.cbxInvAimYaw.Size = new System.Drawing.Size(168, 18);
this.cbxInvAimYaw.TabIndex = 0;
this.cbxInvAimYaw.Text = "Inv. Aim Yaw";
this.cbxInvAimYaw.UseVisualStyleBackColor = true;
this.cbxInvAimYaw.MouseClick += new System.Windows.Forms.MouseEventHandler(this.cbxInv_XY_MouseClick);
//
// cbxInvViewYaw
//
this.cbxInvViewYaw.Location = new System.Drawing.Point(3, 75);
this.cbxInvViewYaw.Name = "cbxInvViewYaw";
this.cbxInvViewYaw.Size = new System.Drawing.Size(168, 18);
this.cbxInvViewYaw.TabIndex = 0;
this.cbxInvViewYaw.Text = "Inv. View Yaw";
this.cbxInvViewYaw.UseVisualStyleBackColor = true;
this.cbxInvViewYaw.MouseClick += new System.Windows.Forms.MouseEventHandler(this.cbxInv_XY_MouseClick);
//
// cbxInvThrottle
//
this.cbxInvThrottle.Location = new System.Drawing.Point(177, 3);
this.cbxInvThrottle.Name = "cbxInvThrottle";
this.cbxInvThrottle.Size = new System.Drawing.Size(168, 18);
this.cbxInvThrottle.TabIndex = 0;
this.cbxInvThrottle.Text = "Inv. Throttle";
this.cbxInvThrottle.UseVisualStyleBackColor = true;
this.cbxInvThrottle.MouseClick += new System.Windows.Forms.MouseEventHandler(this.cbxInv_XY_MouseClick);
//
// cbxInvStrafeVert
//
this.cbxInvStrafeVert.Location = new System.Drawing.Point(177, 27);
this.cbxInvStrafeVert.Name = "cbxInvStrafeVert";
this.cbxInvStrafeVert.Size = new System.Drawing.Size(168, 18);
this.cbxInvStrafeVert.TabIndex = 0;
this.cbxInvStrafeVert.Text = "Inv. Strafe vertical";
this.cbxInvStrafeVert.UseVisualStyleBackColor = true;
this.cbxInvStrafeVert.Visible = false;
this.cbxInvStrafeVert.MouseClick += new System.Windows.Forms.MouseEventHandler(this.cbxInv_XY_MouseClick);
//
// cbxInvStrafeLat
//
this.cbxInvStrafeLat.Location = new System.Drawing.Point(177, 51);
this.cbxInvStrafeLat.Name = "cbxInvStrafeLat";
this.cbxInvStrafeLat.Size = new System.Drawing.Size(168, 18);
this.cbxInvStrafeLat.TabIndex = 0;
this.cbxInvStrafeLat.Text = "Inv. Strafe lateral";
this.cbxInvStrafeLat.UseVisualStyleBackColor = true;
this.cbxInvStrafeLat.Visible = false;
this.cbxInvStrafeLat.MouseClick += new System.Windows.Forms.MouseEventHandler(this.cbxInv_XY_MouseClick);
//
// cbxInvStrafeLon
//
this.cbxInvStrafeLon.Location = new System.Drawing.Point(177, 75);
this.cbxInvStrafeLon.Name = "cbxInvStrafeLon";
this.cbxInvStrafeLon.Size = new System.Drawing.Size(168, 18);
this.cbxInvStrafeLon.TabIndex = 0;
this.cbxInvStrafeLon.Text = "Inv. Strafe longitudinal";
this.cbxInvStrafeLon.UseVisualStyleBackColor = true;
this.cbxInvStrafeLon.Visible = false;
this.cbxInvStrafeLon.MouseClick += new System.Windows.Forms.MouseEventHandler(this.cbxInv_XY_MouseClick);
//
// tableLayoutPanel4
//
this.tableLayoutPanel4.ColumnCount = 1;
@ -1242,7 +1128,7 @@
this.tableLayoutPanel4.RowCount = 2;
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel4.Size = new System.Drawing.Size(294, 549);
this.tableLayoutPanel4.Size = new System.Drawing.Size(304, 549);
this.tableLayoutPanel4.TabIndex = 28;
//
// toolStripStatusLabel2
@ -1379,6 +1265,34 @@
this.statusStrip1.TabIndex = 26;
this.statusStrip1.Text = "statusStrip1";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(4, 41);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(54, 13);
this.label5.TabIndex = 18;
this.label5.Text = "Mapping";
//
// lblAssigned
//
this.lblAssigned.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.lblAssigned.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblAssigned.Location = new System.Drawing.Point(64, 40);
this.lblAssigned.Name = "lblAssigned";
this.lblAssigned.Size = new System.Drawing.Size(224, 20);
this.lblAssigned.TabIndex = 17;
this.lblAssigned.Text = "...";
//
// UC_JoyPanel
//
this.UC_JoyPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.UC_JoyPanel.JsAssignment = 0;
this.UC_JoyPanel.Location = new System.Drawing.Point(3, 3);
this.UC_JoyPanel.Name = "UC_JoyPanel";
this.UC_JoyPanel.Size = new System.Drawing.Size(284, 336);
this.UC_JoyPanel.TabIndex = 0;
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -1412,7 +1326,6 @@
this.tableLayoutPanel3.PerformLayout();
this.flowLayoutPanel2.ResumeLayout(false);
this.flowLayoutPanel2.PerformLayout();
this.flpExtensions.ResumeLayout(false);
this.tableLayoutPanel4.ResumeLayout(false);
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
@ -1474,7 +1387,6 @@
private System.Windows.Forms.TextBox txFilter;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
private System.Windows.Forms.Button btSaveMyMapping;
private System.Windows.Forms.Button btLoadMyMapping;
private System.Windows.Forms.TextBox txMappingName;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.LinkLabel linkLblReleases;
@ -1498,15 +1410,6 @@
private System.Windows.Forms.ContextMenuStrip cmAddDel;
private System.Windows.Forms.ToolStripMenuItem tdiAddBinding;
private System.Windows.Forms.ToolStripMenuItem tdiDelBinding;
private System.Windows.Forms.FlowLayoutPanel flpExtensions;
private System.Windows.Forms.CheckBox cbxInvAimPitch;
private System.Windows.Forms.CheckBox cbxInvViewPitch;
private System.Windows.Forms.CheckBox cbxInvAimYaw;
private System.Windows.Forms.CheckBox cbxInvViewYaw;
private System.Windows.Forms.CheckBox cbxInvStrafeVert;
private System.Windows.Forms.CheckBox cbxInvStrafeLat;
private System.Windows.Forms.CheckBox cbxInvStrafeLon;
private System.Windows.Forms.CheckBox cbxInvThrottle;
private System.Windows.Forms.Button btDumpLog;
private System.Windows.Forms.ToolStripSeparator tdiSGroup2;
private System.Windows.Forms.ToolStripMenuItem tdiBlendBinding;
@ -1539,6 +1442,9 @@
private System.Windows.Forms.ToolStripMenuItem tdiCollapseAll;
private System.Windows.Forms.ToolStripMenuItem tdiExpandAll;
private System.Windows.Forms.ToolStripSeparator tdiSGroup1;
private System.Windows.Forms.Button btOptions;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label lblAssigned;
}
}

@ -16,6 +16,7 @@ using SCJMapper_V2.Keyboard;
using SCJMapper_V2.Mouse;
using SCJMapper_V2.Gamepad;
using SCJMapper_V2.Joystick;
using SCJMapper_V2.Options;
namespace SCJMapper_V2
{
@ -23,13 +24,13 @@ namespace SCJMapper_V2
{
private static readonly log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod( ).DeclaringType );
private const String c_GithubLink = @"https://github.com/SCToolsfactory/SCJMapper-V2/releases";
private const string c_GithubLink = @"https://github.com/SCToolsfactory/SCJMapper-V2/releases";
private AppSettings m_AppSettings = new AppSettings( );
private Boolean m_appLoading = true; // used to detect if we are loading (or running)
// keyboard modifier handling variables
private String m_persistentMods = "";
private string m_persistentMods = "";
private const int c_modifierTime = 3500; // msec time before a modifier times out and will be removed
private int m_modifierTimeout = 0;
@ -122,10 +123,10 @@ namespace SCJMapper_V2
/// <summary>
/// Get the current JsN String for the active device tab
/// Get the current JsN string for the active device tab
/// </summary>
/// <returns>The jsN string - can be jsx, js1..jsN</returns>
private String JSStr( )
private string JSStr( )
{
UC_JoyPanel jp = ( UC_JoyPanel )( tc1.SelectedTab.Controls["UC_JoyPanel"] );
return jp.JsName;
@ -171,7 +172,7 @@ namespace SCJMapper_V2
{
SCMappings.UpdateMappingNames( );
tsDDbtMappings.DropDownItems.Clear( );
foreach ( String s in SCMappings.MappingNames ) {
foreach ( string s in SCMappings.MappingNames ) {
tsDDbtMappings.DropDownItems.Add( Path.GetFileNameWithoutExtension( s ) );
}
}
@ -181,7 +182,7 @@ namespace SCJMapper_V2
/// </summary>
private void SCFileIndication( )
{
if ( String.IsNullOrEmpty( SCPath.SCClientMappingPath ) ) tsDDbtMappings.BackColor = MyColors.InvalidColor;
if ( string.IsNullOrEmpty( SCPath.SCClientMappingPath ) ) tsDDbtMappings.BackColor = MyColors.InvalidColor;
else tsDDbtMappings.BackColor = MyColors.MappingColor;
}
@ -201,7 +202,7 @@ namespace SCJMapper_V2
this.Size = m_AppSettings.FormSize;
this.Location = m_AppSettings.FormLocation;
String version = Application.ProductVersion; // get the version information
string version = Application.ProductVersion; // get the version information
// BETA VERSION; TODO - comment out if not longer
//lblTitle.Text += " - V " + version.Substring( 0, version.IndexOf( ".", version.IndexOf( "." ) + 1 ) ); // PRODUCTION
lblTitle.Text += " - V " + version + " beta"; // BETA
@ -384,7 +385,10 @@ namespace SCJMapper_V2
log.Debug( "InitActionTree - Entry" );
// build TreeView and the ActionMaps
if ( m_AT != null ) m_AT.NodeSelectedEvent -= M_AT_NodeSelectedEvent; // disconnect the Event
m_AT = new ActionTree( m_Joystick, m_Gamepad );
m_AT.NodeSelectedEvent += M_AT_NodeSelectedEvent; // connect the Event
m_AT.Ctrl = treeView1; // the ActionTree owns the TreeView control
m_AT.IgnoreMaps = m_AppSettings.IgnoreActionmaps;
// provide the display items (init)
@ -393,14 +397,6 @@ namespace SCJMapper_V2
m_AT.LoadProfileTree( SCDefaultProfile.DefaultProfileName, addDefaultBinding );
lblProfileUsed.Text = SCDefaultProfile.UsedDefProfile; // SCA 2.2 show used profile
// provide an array of checkboxes to Options (all is handled there)
List<CheckBox> inversions = new List<CheckBox>( );
inversions.Add( cbxInvAimPitch ); inversions.Add( cbxInvViewPitch );
inversions.Add( cbxInvAimYaw ); inversions.Add( cbxInvViewYaw );
inversions.Add( cbxInvThrottle );
inversions.Add( cbxInvStrafeVert ); inversions.Add( cbxInvStrafeLat ); inversions.Add( cbxInvStrafeLon );
m_AT.InvertCheckList = inversions;
// Activation Update
tdiCbxActivation.Items.Clear( );
tdiCbxActivation.Items.AddRange( ActivationModes.Instance.Names.ToArray( ) );
@ -428,6 +424,7 @@ namespace SCJMapper_V2
}
/// <summary>
/// Aquire the DInput joystick devices
/// </summary>
@ -495,14 +492,14 @@ namespace SCJMapper_V2
log.Debug( "Create Gamepad instance" );
gs = new GamepadCls( gpDevice, uUC_GpadPanelNew, tabs ); // does all device related activities for that particular item
gs.SetDeviceName( instance.ProductName );
tc1.TabPages[tabs].ToolTipText = String.Format( "{0}\n{1}", gs.DevName, " " );
tc1.TabPages[tabs].ToolTipText = string.Format( "{0}\n{1}", gs.DevName, " " );
toolTip1.SetToolTip( tc1.TabPages[tabs], tc1.TabPages[tabs].ToolTipText );
} else {
log.Debug( "Add first Joystick panel" );
log.Debug( "Create Joystick instance" );
tc1.TabPages[tabs].Text = String.Format( "Joystick {0}", nJs++ );
tc1.TabPages[tabs].Text = string.Format( "Joystick {0}", nJs++ );
js = new JoystickCls( jsDevice, this, tabs + 1, UC_JoyPanel, tabs ); // does all device related activities for that particular item
tc1.TabPages[tabs].ToolTipText = String.Format( "{0}\n{1}", js.DevName, js.DevInstanceGUID );
tc1.TabPages[tabs].ToolTipText = string.Format( "{0}\n{1}", js.DevName, js.DevInstanceGUID );
toolTip1.SetToolTip( tc1.TabPages[tabs], tc1.TabPages[tabs].ToolTipText );
}
} else {
@ -514,17 +511,17 @@ namespace SCJMapper_V2
log.Debug( "Create Gamepad instance" );
gs = new GamepadCls( gpDevice, uUC_GpadPanelNew, tabs ); // does all device related activities for that particular item
gs.SetDeviceName( instance.ProductName );
tc1.TabPages[tabs].ToolTipText = String.Format( "{0}\n{1}", gs.DevName, " " );
tc1.TabPages[tabs].ToolTipText = string.Format( "{0}\n{1}", gs.DevName, " " );
toolTip1.SetToolTip( tc1.TabPages[tabs], tc1.TabPages[tabs].ToolTipText );
} else {
log.Debug( "Add next Joystick panel" );
// setup the further tab contents along the reference one in TabPage[0] (the control named UC_JoyPanel)
tc1.TabPages.Add( String.Format( "Joystick {0}", nJs++ ) );
tc1.TabPages.Add( string.Format( "Joystick {0}", nJs++ ) );
UC_JoyPanel uUC_JoyPanelNew = new UC_JoyPanel( ); tc1.TabPages[tabs].Controls.Add( uUC_JoyPanelNew );
uUC_JoyPanelNew.Size = UC_JoyPanel.Size; uUC_JoyPanelNew.Location = UC_JoyPanel.Location;
log.Debug( "Create Joystick instance" );
js = new JoystickCls( jsDevice, this, tabs + 1, uUC_JoyPanelNew, tabs ); // does all device related activities for that particular item
tc1.TabPages[tabs].ToolTipText = String.Format( "{0}\n{1}", js.DevName, js.DevInstanceGUID );
tc1.TabPages[tabs].ToolTipText = string.Format( "{0}\n{1}", js.DevName, js.DevInstanceGUID );
toolTip1.SetToolTip( tc1.TabPages[tabs], tc1.TabPages[tabs].ToolTipText );
}
}
@ -580,9 +577,7 @@ namespace SCJMapper_V2
// Collect modifiers - simply overwrite existing ones as we deal with THIS file now
tdiAddMod1.Visible = false; tdiAddMod2.Visible = false; tdiAddMod3.Visible = false; // make context menu invisible
tdiAddMod1.Text = ""; tdiAddMod2.Text = ""; tdiAddMod3.Text = ""; // and clear
for ( int i = flpExtensions.Controls.Count - 1; i >= 0; i-- ) {
if ( ( flpExtensions.Controls[i] as CheckBox ).Text.StartsWith( "js" ) ) flpExtensions.Controls.RemoveAt( i );
}
/*
if ( m_AT.ActionMaps.Modifiers.Count > 2 ) {
tdiAddMod3.Text = string.Format( "MOD: {0}", m_AT.ActionMaps.Modifiers[2] ); tdiAddMod3.Visible = true;
// make a new one
@ -604,7 +599,7 @@ namespace SCJMapper_V2
cbx.CheckedChanged += Cbx_CheckedChanged;
flpExtensions.Controls.Add( cbx );
}
*/
// JS mapping for js1 .. js8 can be changed and reloaded from XML
// note - unmapped ones remain what they were
@ -615,8 +610,8 @@ namespace SCJMapper_V2
// for all supported jsN
for ( int i = 0; i < JoystickCls.JSnum_MAX; i++ ) {
j = null;
if ( !String.IsNullOrEmpty( m_AT.ActionMaps.jsNGUID[i] ) ) j = m_Joystick.Find_jsInstance( m_AT.ActionMaps.jsNGUID[i] );
else if ( !String.IsNullOrEmpty( m_AT.ActionMaps.jsN[i] ) ) j = m_Joystick.Find_jsDev( m_AT.ActionMaps.jsN[i] );
if ( !string.IsNullOrEmpty( m_AT.ActionMaps.jsNGUID[i] ) ) j = m_Joystick.Find_jsInstance( m_AT.ActionMaps.jsNGUID[i] );
else if ( !string.IsNullOrEmpty( m_AT.ActionMaps.jsN[i] ) ) j = m_Joystick.Find_jsDev( m_AT.ActionMaps.jsN[i] );
if ( j != null ) {
m_AT.ActionMaps.jsNGUID[i] = j.DevInstanceGUID; // subst for missing one (version up etc.)
@ -660,14 +655,14 @@ namespace SCJMapper_V2
{
log.Debug( "Dump - Entry" );
rtb.Text = String.Format( "<!-- {0} - SC Joystick Mapping - {1} -->\n{2}", DateTime.Now, txMappingName.Text, m_AT.toXML( txMappingName.Text ) );
rtb.Text = string.Format( "<!-- {0} - SC Joystick Mapping - {1} -->\n{2}", DateTime.Now, txMappingName.Text, m_AT.toXML( txMappingName.Text ) );
btDump.BackColor = btClear.BackColor; btDump.UseVisualStyleBackColor = btClear.UseVisualStyleBackColor; // neutral again
btGrab.BackColor = btClear.BackColor; btGrab.UseVisualStyleBackColor = btClear.UseVisualStyleBackColor; // neutral again
}
private void SetRebindField( String map )
private void SetRebindField( string map )
{
txRebind.Text = "pp_rebindkeys " + map;
}
@ -707,7 +702,7 @@ namespace SCJMapper_V2
if ( m_keyIn || tc1.SelectedTab.Tag == null ) return; // don't handle those
String ctrl = "";
string ctrl = "";
if ( m_curJoystick == null ) {
// no active joystick - may be a gamepad
if ( m_Gamepad != null ) {
@ -746,21 +741,18 @@ namespace SCJMapper_V2
// TreeView Events
private void treeView1_AfterSelect( object sender, TreeViewEventArgs e )
private void treeView1_NodeMouseClick( object sender, TreeNodeMouseClickEventArgs e )
{
String atx = m_AT.SelectedAction;
if ( !String.IsNullOrEmpty( atx ) ) {
lblAction.Text = atx;
if ( e.Button == MouseButtons.Right ) {
treeView1.SelectedNode = e.Node;
}
}
private void treeView1_NodeMouseClick( object sender, TreeNodeMouseClickEventArgs e )
// Action Tree Event - manages the de/selection of a node
private void M_AT_NodeSelectedEvent( object sender, ActionTreeEventArgs e )
{
if ( e.Button == System.Windows.Forms.MouseButtons.Right ) {
treeView1.SelectedNode = e.Node;
}
lblAction.Text = e.SelectedAction;
lblAssigned.Text = e.SelectedCtrl;
}
@ -813,6 +805,8 @@ namespace SCJMapper_V2
} else MySounds.PlayCannot( );
}
//TODO
// possibly obsolete - we dont support to make own modifiers - button is invisible
private void btMakeMod_Click( object sender, EventArgs e )
{
if ( m_AT.ActionMaps.Modifiers.Contains( lblLastJ.Text ) ) return; // have it already
@ -823,7 +817,7 @@ namespace SCJMapper_V2
cbx.Text = lblLastJ.Text;
cbx.Checked = true;
cbx.CheckedChanged += Cbx_CheckedChanged;
flpExtensions.Controls.Add( cbx );
//flpExtensions.Controls.Add( cbx );
m_AT.ActionMaps.Modifiers.Add( lblLastJ.Text );
// maintain context menu - quick and d.. version
if ( string.IsNullOrEmpty( tdiAddMod1.Text ) ) {
@ -844,9 +838,14 @@ namespace SCJMapper_V2
}
}
//TODO
// possibly obsolete - we dont support to make own modifiers
private void Cbx_CheckedChanged( object sender, EventArgs e )
{
int i = flpExtensions.Controls.IndexOf( (Control)sender );
/*
* int i = flpExtensions.Controls.IndexOf( (Control)sender );
if ( i >= 0 ) {
string my = ( sender as CheckBox).Text;
int m = m_AT.ActionMaps.Modifiers.IndexOf(my);
@ -864,9 +863,10 @@ namespace SCJMapper_V2
// remove from joystick - but this applies to one of all - may be not the current
foreach ( JoystickCls j in m_Joystick ) { j.UpdateModifier( my, false ); } // send it to all
// finally remove the checkbox
flpExtensions.Controls.RemoveAt( i );
//flpExtensions.Controls.RemoveAt( i );
m_AT.Dirty = true; if ( m_AT.Dirty ) btDump.BackColor = MyColors.DirtyColor;
}
*/
}
// General Area Items
@ -879,15 +879,15 @@ namespace SCJMapper_V2
private void btDumpList_Click( object sender, EventArgs e )
{
if ( m_AppSettings.UseCSVListing )
rtb.Text = String.Format( "-- {0} - SC Joystick Mapping --\n{1}", DateTime.Now, m_AT.ReportActionsCSV( m_AppSettings.ListModifiers ) );
rtb.Text = string.Format( "-- {0} - SC Joystick Mapping --\n{1}", DateTime.Now, m_AT.ReportActionsCSV( m_AppSettings.ListModifiers ) );
else
rtb.Text = String.Format( "-- {0} - SC Joystick Mapping --\n{1}", DateTime.Now, m_AT.ReportActions( ) );
rtb.Text = string.Format( "-- {0} - SC Joystick Mapping --\n{1}", DateTime.Now, m_AT.ReportActions( ) );
}
private void btDumpLog_Click( object sender, EventArgs e )
{
rtb.Text = String.Format( "-- {0} - SC Joystick AC Log Controller Detection --\n{1}", DateTime.Now, SCLogExtract.ExtractLog( ) );
rtb.Text = string.Format( "-- {0} - SC Joystick AC Log Controller Detection --\n{1}", DateTime.Now, SCLogExtract.ExtractLog( ) );
}
@ -1096,7 +1096,7 @@ namespace SCJMapper_V2
private void tdiCollapseAll_Click( object sender, EventArgs e )
{
TreeNode selNodeActionMap = treeView1.SelectedNode;
TreeNode selNodeParent = selNodeActionMap;
TreeNode selNodeParent = selNodeActionMap;
// see if we have a parent..
if ( selNodeActionMap.Level > 1 )
selNodeParent = selNodeActionMap.Parent;
@ -1198,19 +1198,6 @@ namespace SCJMapper_V2
}
// XML load and save
private void btLoadMyMapping_Click( object sender, EventArgs e )
{
if ( SCMappings.MappingFileExists( txMappingName.Text ) ) {
rtb.LoadFile( SCMappings.MappingFileName( txMappingName.Text ), RichTextBoxStreamType.PlainText );
InitActionTree( false );
Grab( );
m_AppSettings.MyMappingName = txMappingName.Text; m_AppSettings.Save( );// last used - persist
txMappingName.BackColor = MyColors.SuccessColor;
} else {
txMappingName.BackColor = MyColors.ErrorColor;
}
}
private void btSaveMyMapping_Click( object sender, EventArgs e )
{
Boolean cancel = false;
@ -1302,7 +1289,10 @@ namespace SCJMapper_V2
}
}
m_AT.NodeSelectedEvent -= M_AT_NodeSelectedEvent; // disconnect the Event
m_AT = newTree; // make it the valid one
m_AT.NodeSelectedEvent += M_AT_NodeSelectedEvent; // reconnect the Event
m_AT.DefineShowOptions( cbxShowJoystick.Checked, cbxShowGamepad.Checked, cbxShowKeyboard.Checked, cbxShowMouse.Checked, cbxShowMappedOnly.Checked );
m_AT.ReloadTreeView( );
if ( m_AT.Dirty ) btDump.BackColor = MyColors.DirtyColor;
@ -1321,207 +1311,126 @@ namespace SCJMapper_V2
}
private void btJSTuning_Click( object sender, EventArgs e )
/// <summary>
/// Updates Gamedevice, Nodetext for one Tuning (Option) item from current assignment
/// </summary>
/// <param name="optionName">THe option to handle</param>
/// <param name="action">The corresponding action</param>
/// <param name="actionmap">The actionmap to search for the action</param>
private void UpdateOptionItem( string optionName, string action, string actionmap )
{
timer1.Enabled = false; // must be off while a modal window is shown, else DX gets crazy
JSCAL = new OGL.FormJSCalCurve( );
// get current mapping from ActionMaps
String nodeText = "";
string nodeText = "";
// attach Yaw command
DeviceTuningParameter tuning = null;
DeviceCls dev = null;
String find = "";
string find = "";
// find action item for yaw
find = ActionTreeNode.ComposeNodeText( "v_yaw", "js" );
nodeText = m_AT.FindText( "spaceship_movement", find ); // returns "" or a complete text ("action - command")
if ( !String.IsNullOrWhiteSpace( nodeText ) ) {
tuning = m_AT.ActionMaps.OptionTree.TuningItem( optionName ); // set defaults
find = ActionTreeNode.ComposeNodeText( action, "js" );
nodeText = m_AT.FindText( actionmap, find ); // returns "" or a complete text ("action - command")
if ( !string.IsNullOrWhiteSpace( nodeText ) ) {
dev = m_Joystick.Find_jsN( JoystickCls.JSNum( ActionTreeNode.CommandFromNodeText( nodeText ) ) );
} else {
find = ActionTreeNode.ComposeNodeText( "v_yaw", "xi" );
nodeText = m_AT.FindText( "spaceship_movement", find );
if ( !String.IsNullOrWhiteSpace( nodeText ) ) {
find = ActionTreeNode.ComposeNodeText( action, "xi" );
nodeText = m_AT.FindText( actionmap, find );
if ( !string.IsNullOrWhiteSpace( nodeText ) ) {
dev = m_Gamepad;
}
}
m_AT.ActionMaps.TuningY.Reset( ); // set defaults
tuning.Reset( );
if ( dev != null ) {
// JS commands that are supported
if ( nodeText.ToLowerInvariant( ).EndsWith( "_x" ) || nodeText.ToLowerInvariant( ).EndsWith( "_rotx" )
|| nodeText.ToLowerInvariant( ).EndsWith( "_y" ) || nodeText.ToLowerInvariant( ).EndsWith( "_roty" )
|| nodeText.ToLowerInvariant( ).EndsWith( "_Z" ) || nodeText.ToLowerInvariant( ).EndsWith( "_rotz" ) ) {
m_AT.ActionMaps.TuningY.GameDevice = dev;
m_AT.ActionMaps.TuningY.Action = nodeText;
if ( nodeText.ToLowerInvariant( ).EndsWith( "_x" ) || nodeText.ToLowerInvariant( ).EndsWith( "_rotx" ) || nodeText.ToLowerInvariant( ).EndsWith( "_throttlex" )
|| nodeText.ToLowerInvariant( ).EndsWith( "_y" ) || nodeText.ToLowerInvariant( ).EndsWith( "_roty" ) || nodeText.ToLowerInvariant( ).EndsWith( "_throttley" )
|| nodeText.ToLowerInvariant( ).EndsWith( "_Z" ) || nodeText.ToLowerInvariant( ).EndsWith( "_rotz" ) || nodeText.ToLowerInvariant( ).EndsWith( "_throttlez" )
|| nodeText.ToLowerInvariant( ).EndsWith( "_slider1" ) || nodeText.ToLowerInvariant( ).EndsWith( "_slider2" ) ) {
tuning.GameDevice = dev;
tuning.NodeText = nodeText;
string doID = Deviceoptions.DevOptionID( dev.DevName, nodeText );
if ( ! m_AT.ActionMaps.Deadzones.ContainsKey(doID) ){
m_AT.ActionMaps.Deadzones.Add( doID, new DeviceOptionParameter( ) );
if ( m_AT.ActionMaps.DeviceOptions.ContainsKey( doID ) ) {
tuning.Deviceoption = m_AT.ActionMaps.DeviceOptions[doID];
}
m_AT.ActionMaps.TuningY.Deviceoption = m_AT.ActionMaps.Deadzones[doID];
JSCAL.YawTuning = m_AT.ActionMaps.TuningY;
}
// GP commands that are supported - X
else if ( nodeText.ToLowerInvariant( ).Contains( "_thumblx" ) || nodeText.ToLowerInvariant( ).Contains( "_thumbrx" ) ) {
m_AT.ActionMaps.TuningY.GameDevice = dev;
m_AT.ActionMaps.TuningY.Action = nodeText;
string doID = Deviceoptions.DevOptionID( dev.DevName, "x" );
if ( !m_AT.ActionMaps.Deadzones.ContainsKey( doID ) ) {
m_AT.ActionMaps.Deadzones.Add( doID, new DeviceOptionParameter( ) );
}
m_AT.ActionMaps.TuningY.Deviceoption = m_AT.ActionMaps.Deadzones[doID];
JSCAL.YawTuning = m_AT.ActionMaps.TuningY;
}
}
// attach Pitch command
dev = null;
find = ActionTreeNode.ComposeNodeText( "v_pitch", "js" );
nodeText = m_AT.FindText( "spaceship_movement", find ); // returns "" or a complete text ("action - command")
if ( !String.IsNullOrWhiteSpace( nodeText ) ) {
dev = m_Joystick.Find_jsN( JoystickCls.JSNum( ActionTreeNode.CommandFromNodeText( nodeText ) ) );
} else {
find = ActionTreeNode.ComposeNodeText( "v_pitch", "xi" );
nodeText = m_AT.FindText( "spaceship_movement", find );
if ( !String.IsNullOrWhiteSpace( nodeText ) ) {
dev = m_Gamepad;
}
}
m_AT.ActionMaps.TuningP.Reset( ); // set defaults
if ( dev != null ) {
// JS commands that are supported
if ( nodeText.ToLowerInvariant( ).EndsWith( "_x" ) || nodeText.ToLowerInvariant( ).EndsWith( "_rotx" )
|| nodeText.ToLowerInvariant( ).EndsWith( "_y" ) || nodeText.ToLowerInvariant( ).EndsWith( "_roty" )
|| nodeText.ToLowerInvariant( ).EndsWith( "_Z" ) || nodeText.ToLowerInvariant( ).EndsWith( "_rotz" ) ) {
m_AT.ActionMaps.TuningP.GameDevice = dev;
m_AT.ActionMaps.TuningP.Action = nodeText;
// GP commands that are supported
else if ( nodeText.ToLowerInvariant( ).Contains( "_thumblx" ) || nodeText.ToLowerInvariant( ).Contains( "_thumbrx" )
|| nodeText.ToLowerInvariant( ).Contains( "_thumbly" ) || nodeText.ToLowerInvariant( ).Contains( "_thumbry" ) ) {
tuning.GameDevice = dev;
tuning.NodeText = nodeText;
string doID = Deviceoptions.DevOptionID( dev.DevName, nodeText );
if ( !m_AT.ActionMaps.Deadzones.ContainsKey( doID ) ) {
m_AT.ActionMaps.Deadzones.Add( doID, new DeviceOptionParameter( ) );
if ( m_AT.ActionMaps.DeviceOptions.ContainsKey( doID ) ) {
tuning.Deviceoption = m_AT.ActionMaps.DeviceOptions[doID];
}
m_AT.ActionMaps.TuningP.Deviceoption = m_AT.ActionMaps.Deadzones[doID];
JSCAL.PitchTuning = m_AT.ActionMaps.TuningP;
}
// GP commands that are supported - either Y
else if ( nodeText.ToLowerInvariant( ).Contains( "_thumbly" ) || nodeText.ToLowerInvariant( ).Contains( "_thumbry" ) ) {
m_AT.ActionMaps.TuningP.GameDevice = dev;
m_AT.ActionMaps.TuningP.Action = nodeText;
string doID = Deviceoptions.DevOptionID( dev.DevName, "y" );
if ( !m_AT.ActionMaps.Deadzones.ContainsKey( doID ) ) {
m_AT.ActionMaps.Deadzones.Add( doID, new DeviceOptionParameter( ) );
}
m_AT.ActionMaps.TuningP.Deviceoption = m_AT.ActionMaps.Deadzones[doID];
JSCAL.PitchTuning = m_AT.ActionMaps.TuningP;
} else if ( tuning.DevInstanceNo > 0 ) {
// a device was assigned but the action is not mapped
// try to find the gamedevice here
if ( JoystickCls.IsDeviceClass( tuning.DeviceClass ) ) {
tuning.GameDevice = m_Joystick.Find_jsN( tuning.DevInstanceNo );
} else if ( GamepadCls.IsDeviceClass( tuning.DeviceClass ) ) {
tuning.GameDevice = m_Gamepad;
}
}
// attach Roll command - cannot use gamepad here
dev = null;
find = ActionTreeNode.ComposeNodeText( "v_roll", "js" );
nodeText = m_AT.FindText( "spaceship_movement", find ); // returns "" or a complete text ("action - command")
if ( !String.IsNullOrWhiteSpace( nodeText ) ) {
dev = m_Joystick.Find_jsN( JoystickCls.JSNum( ActionTreeNode.CommandFromNodeText( nodeText ) ) );
}
}
m_AT.ActionMaps.TuningR.Reset( ); // set defaults
if ( dev != null ) {
// JS commands that are supported
if ( nodeText.ToLowerInvariant( ).EndsWith( "_x" ) || nodeText.ToLowerInvariant( ).EndsWith( "_rotx" )
|| nodeText.ToLowerInvariant( ).EndsWith( "_y" ) || nodeText.ToLowerInvariant( ).EndsWith( "_roty" )
|| nodeText.ToLowerInvariant( ).EndsWith( "_Z" ) || nodeText.ToLowerInvariant( ).EndsWith( "_rotz" ) ) {
m_AT.ActionMaps.TuningR.GameDevice = dev;
m_AT.ActionMaps.TuningR.Action = nodeText;
string doID = Deviceoptions.DevOptionID( dev.DevName, nodeText );
if ( !m_AT.ActionMaps.Deadzones.ContainsKey( doID ) ) {
m_AT.ActionMaps.Deadzones.Add( doID, new DeviceOptionParameter( ) );
}
m_AT.ActionMaps.TuningR.Deviceoption = m_AT.ActionMaps.Deadzones[doID];
JSCAL.RollTuning = m_AT.ActionMaps.TuningR;
}
}
/// <summary>
/// Get the assigned controls for some commands used in Tuning Yaw,Pitch,Roll and the Strafe ones
/// Connect deviceOption if known
/// </summary>
private void UpdateTuningItems( )
{
// cleanup - Actions will be assigned new in below calls
m_AT.ActionMaps.DeviceOptions.ResetActions( );
// get current mapping from ActionMaps
UpdateOptionItem( "flight_move_pitch", "v_pitch", "spaceship_movement" );
UpdateOptionItem( "flight_move_yaw", "v_yaw", "spaceship_movement" );
UpdateOptionItem( "flight_move_roll", "v_roll", "spaceship_movement" );
UpdateOptionItem( "flight_move_strafe_vertical", "v_strafe_vertical", "spaceship_movement" );
UpdateOptionItem( "flight_move_strafe_lateral", "v_strafe_lateral", "spaceship_movement" );
UpdateOptionItem( "flight_move_strafe_longitudinal", "v_strafe_longitudinal", "spaceship_movement" );
}
// find action item for Strafe Lateral - cannot use gamepad here
find = ActionTreeNode.ComposeNodeText( "v_strafe_lateral", "js" );
nodeText = m_AT.FindText( "spaceship_movement", find ); // returns "" or a complete text ("action - command")
if ( !String.IsNullOrWhiteSpace( nodeText ) ) {
dev = m_Joystick.Find_jsN( JoystickCls.JSNum( ActionTreeNode.CommandFromNodeText( nodeText ) ) );
}
m_AT.ActionMaps.TuningStrafeLateral.Reset( ); // set defaults
if ( dev != null ) {
// JS commands that are supported
if ( nodeText.ToLowerInvariant( ).EndsWith( "_x" ) || nodeText.ToLowerInvariant( ).EndsWith( "_rotx" )
|| nodeText.ToLowerInvariant( ).EndsWith( "_y" ) || nodeText.ToLowerInvariant( ).EndsWith( "_roty" )
|| nodeText.ToLowerInvariant( ).EndsWith( "_Z" ) || nodeText.ToLowerInvariant( ).EndsWith( "_rotz" ) ) {
m_AT.ActionMaps.TuningStrafeLateral.GameDevice = dev;
m_AT.ActionMaps.TuningStrafeLateral.Action = nodeText;
string doID = Deviceoptions.DevOptionID( dev.DevName, nodeText );
if ( !m_AT.ActionMaps.Deadzones.ContainsKey( doID ) ) {
m_AT.ActionMaps.Deadzones.Add( doID, new DeviceOptionParameter( ) );
}
m_AT.ActionMaps.TuningStrafeLateral.Deviceoption = m_AT.ActionMaps.Deadzones[doID];
JSCAL.StrafeLatTuning = m_AT.ActionMaps.TuningStrafeLateral;
}
}
/// <summary>
/// Get the assigned controls for other Options - if available...
/// </summary>
private void UpdateMoreOptionItems( )
{
// get current mapping from ActionMaps
UpdateOptionItem( "flight_throttle_abs", "v_throttle_abs", "spaceship_movement" );
UpdateOptionItem( "flight_throttle_rel", "v_throttle_rel", "spaceship_movement" );
// attach Strafe Vertical command - cannot use gamepad here
dev = null;
find = ActionTreeNode.ComposeNodeText( "v_strafe_vertical", "js" );
nodeText = m_AT.FindText( "spaceship_movement", find ); // returns "" or a complete text ("action - command")
if ( !String.IsNullOrWhiteSpace( nodeText ) ) {
dev = m_Joystick.Find_jsN( JoystickCls.JSNum( ActionTreeNode.CommandFromNodeText( nodeText ) ) );
}
UpdateOptionItem( "flight_aim_pitch", "v_aim_pitch", "spaceship_targeting" );
UpdateOptionItem( "flight_aim_yaw", "v_aim_yaw", "spaceship_targeting" );
m_AT.ActionMaps.TuningStrafeVertical.Reset( ); // set defaults
if ( dev != null ) {
// JS commands that are supported
if ( nodeText.ToLowerInvariant( ).EndsWith( "_x" ) || nodeText.ToLowerInvariant( ).EndsWith( "_rotx" )
|| nodeText.ToLowerInvariant( ).EndsWith( "_y" ) || nodeText.ToLowerInvariant( ).EndsWith( "_roty" )
|| nodeText.ToLowerInvariant( ).EndsWith( "_Z" ) || nodeText.ToLowerInvariant( ).EndsWith( "_rotz" ) ) {
m_AT.ActionMaps.TuningStrafeVertical.GameDevice = dev;
m_AT.ActionMaps.TuningStrafeVertical.Action = nodeText;
string doID = Deviceoptions.DevOptionID( dev.DevName, nodeText );
if ( !m_AT.ActionMaps.Deadzones.ContainsKey( doID ) ) {
m_AT.ActionMaps.Deadzones.Add( doID, new DeviceOptionParameter( ) );
}
m_AT.ActionMaps.TuningStrafeVertical.Deviceoption = m_AT.ActionMaps.Deadzones[doID];
JSCAL.StrafeVertTuning = m_AT.ActionMaps.TuningStrafeVertical;
}
}
UpdateOptionItem( "flight_view_pitch", "v_view_pitch", "spaceship_view" );
UpdateOptionItem( "flight_view_yaw", "v_view_yaw", "spaceship_view" );
// attach Strafe Longitudinal command - cannot use gamepad here
dev = null;
find = ActionTreeNode.ComposeNodeText( "v_strafe_longitudinal", "js" );
nodeText = m_AT.FindText( "spaceship_movement", find ); // returns "" or a complete text ("action - command")
if ( !String.IsNullOrWhiteSpace( nodeText ) ) {
dev = m_Joystick.Find_jsN( JoystickCls.JSNum( ActionTreeNode.CommandFromNodeText( nodeText ) ) );
}
UpdateOptionItem( "turret_aim_pitch", "v_aim_pitch", "spaceship_turret" );
UpdateOptionItem( "turret_aim_yaw", "v_aim_yaw", "spaceship_turret" );
}
m_AT.ActionMaps.TuningStrafeLongitudinal.Reset( ); // set defaults
if ( dev != null ) {
// JS commands that are supported
if ( nodeText.ToLowerInvariant( ).EndsWith( "_x" ) || nodeText.ToLowerInvariant( ).EndsWith( "_rotx" )
|| nodeText.ToLowerInvariant( ).EndsWith( "_y" ) || nodeText.ToLowerInvariant( ).EndsWith( "_roty" )
|| nodeText.ToLowerInvariant( ).EndsWith( "_Z" ) || nodeText.ToLowerInvariant( ).EndsWith( "_rotz" ) ) {
m_AT.ActionMaps.TuningStrafeLongitudinal.GameDevice = dev;
m_AT.ActionMaps.TuningStrafeLongitudinal.Action = nodeText;
string doID = Deviceoptions.DevOptionID( dev.DevName, nodeText );
if ( !m_AT.ActionMaps.Deadzones.ContainsKey( doID ) ) {
m_AT.ActionMaps.Deadzones.Add( doID, new DeviceOptionParameter( ) );
}
m_AT.ActionMaps.TuningStrafeLongitudinal.Deviceoption = m_AT.ActionMaps.Deadzones[doID];
JSCAL.StrafeLonTuning = m_AT.ActionMaps.TuningStrafeLongitudinal;
}
}
private void btJSTuning_Click( object sender, EventArgs e )
{
timer1.Enabled = false; // must be off while a modal window is shown, else DX gets crazy
JSCAL = new OGL.FormJSCalCurve( );
// Have to attach here to capture the currently valid settings
UpdateTuningItems( );
// run
JSCAL.ShowDialog( );
JSCAL.OptionTree = m_AT.ActionMaps.OptionTree; // assign tuning values
JSCAL.ShowDialog( this );
m_AT.Dirty = true;
// get from dialog
JSCAL = null; // get rid and create a new one next time..
if ( m_AT.Dirty ) btDump.BackColor = MyColors.DirtyColor;
@ -1529,6 +1438,40 @@ namespace SCJMapper_V2
}
private void btOptions_Click( object sender, EventArgs e )
{
timer1.Enabled = false; // must be off while a modal window is shown, else DX gets crazy
FormOptions OPT = new FormOptions();
// Have to attach here to capture the currently valid settings
UpdateTuningItems( );
UpdateMoreOptionItems( );
DeviceList devlist = new DeviceList();
if ( m_AppSettings.DetectGamepad && m_Gamepad != null ) {
devlist.Add( m_Gamepad );
}
devlist.AddRange( m_Joystick );
OPT.OptionTree = m_AT.ActionMaps.OptionTree;
OPT.DeviceOptions = m_AT.ActionMaps.DeviceOptions;
OPT.Devicelist = devlist;
OPT.ShowDialog( this );
m_AT.Dirty = true;
OPT = null; // get rid and create a new one next time..
devlist = null;
if ( m_AT.Dirty ) btDump.BackColor = MyColors.DirtyColor;
timer1.Enabled = true;
}
// Keyboard Input
Boolean m_keyIn = false;
@ -1565,8 +1508,8 @@ namespace SCJMapper_V2
{
if ( m_keyIn ) {
m_Keyboard.GetData( );
String modS = m_Keyboard.GetLastChange( false ); // modifiers only
String keyModS = m_Keyboard.GetLastChange( true ); // modifiers+keyboard input
string modS = m_Keyboard.GetLastChange( false ); // modifiers only
string keyModS = m_Keyboard.GetLastChange( true ); // modifiers+keyboard input
// don't override modifiers when we are in mouse mode and the mod is the same and there is no kbd entry....
if ( m_mouseIn && ( keyModS == modS ) && ( m_persistentMods == ( modS + "+" ) ) ) {
; // nothing here -
@ -1590,8 +1533,8 @@ namespace SCJMapper_V2
if ( m_Keyboard == null ) return;
m_Keyboard.GetData( );
String modS = m_Keyboard.GetLastChange( false );
if ( !String.IsNullOrEmpty( modS ) ) {
string modS = m_Keyboard.GetLastChange( false );
if ( !string.IsNullOrEmpty( modS ) ) {
if ( modS.Contains( KeyboardCls.ClearMods ) ) {
// allow to cancel modifiers
m_persistentMods = ""; // kill persistent ones
@ -1619,10 +1562,10 @@ namespace SCJMapper_V2
private void tmeItem_Click( object sender, EventArgs e )
{
ToolStripMenuItem ts = (ToolStripMenuItem)sender;
if ( String.IsNullOrEmpty( ( string )ts.Tag ) ) return;
if ( string.IsNullOrEmpty( ( string )ts.Tag ) ) return;
String item = "";
String device = MouseCls.DeviceClass;
string item = "";
string device = MouseCls.DeviceClass;
int btNum = 0;
if ( int.TryParse( ( string )ts.Tag, out btNum ) ) {
@ -1641,7 +1584,7 @@ namespace SCJMapper_V2
device = KeyboardCls.DeviceClass;
}
String ctrl = "";
string ctrl = "";
// have to handle the two devices
if ( MouseCls.IsDeviceClass( device ) ) {
if ( m_Keyboard == null ) {
@ -1724,7 +1667,10 @@ namespace SCJMapper_V2
// returns a null if no changes have been found
if ( newTree != null ) {
m_AT.NodeSelectedEvent -= M_AT_NodeSelectedEvent; // disconnect the Event
m_AT = newTree; // make it the valid one
m_AT.NodeSelectedEvent += M_AT_NodeSelectedEvent; // reconnect the Event
m_AT.DefineShowOptions( cbxShowJoystick.Checked, cbxShowGamepad.Checked, cbxShowKeyboard.Checked, cbxShowMouse.Checked, cbxShowMappedOnly.Checked );
m_AT.ReloadTreeView( );
if ( m_AT.Dirty ) btDump.BackColor = MyColors.DirtyColor;
@ -1738,6 +1684,5 @@ namespace SCJMapper_V2
{
m_AT.FindAndSelectActionKey( e.Actionmap, e.Actionkey, e.Nodeindex );
}
}
}

@ -120,92 +120,6 @@
<metadata name="cmCopyPaste.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>300, 17</value>
</metadata>
<metadata name="IL.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>494, 17</value>
</metadata>
<data name="IL.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAA6
EAAAAk1TRnQBSQFMAgEBCQEAAdABEAHQAhABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
AUADAAEwAwABAQEAAQgGAAEMGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEA
AfABygGmAQABMwUAATMBAAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEA
AYABfAH/AQACUAH/AQABkwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFm
AwABmQMAAcwCAAEzAwACMwIAATMBZgIAATMBmQIAATMBzAIAATMB/wIAAWYDAAFmATMCAAJmAgABZgGZ
AgABZgHMAgABZgH/AgABmQMAAZkBMwIAAZkBZgIAApkCAAGZAcwCAAGZAf8CAAHMAwABzAEzAgABzAFm
AgABzAGZAgACzAIAAcwB/wIAAf8BZgIAAf8BmQIAAf8BzAEAATMB/wIAAf8BAAEzAQABMwEAAWYBAAEz
AQABmQEAATMBAAHMAQABMwEAAf8BAAH/ATMCAAMzAQACMwFmAQACMwGZAQACMwHMAQACMwH/AQABMwFm
AgABMwFmATMBAAEzAmYBAAEzAWYBmQEAATMBZgHMAQABMwFmAf8BAAEzAZkCAAEzAZkBMwEAATMBmQFm
AQABMwKZAQABMwGZAcwBAAEzAZkB/wEAATMBzAIAATMBzAEzAQABMwHMAWYBAAEzAcwBmQEAATMCzAEA
ATMBzA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eAHAAHgLwAB4AcAAeAHAAHgBwAB4AcAAeAHAAHg
BwAB4AEBBgAB4AEDBgAB4AEHBgAB9wX/AfgBDwHAAf8BnwH9Av8B8AEHAcABfwGPAfgB3wH9AeABAwGA
AX8BjwHwAY8B8AHAAQEBgAE/AQMB4AEHAfABgAEBAYABHwMAAoABAQGAAR8BgAEAAYABAAGAAQEBwAEf
AYABAAGAAQABgAEBAcABHwGAAQABgAEAAYABAQHgAR8BgAEBAYABAAGAAQEB4AEfAcABAQHAAQEBgAEB
AfABfwHAAQEBwwHhAcABAwH/ASMB4AEDAecB4wHgAQcB/wGNBP8B8AEPAf8B/Q7/BAAB/AE/Av8EAAH4
AQ8B4AEDBAAB8AEPAcABAQQAAcABBwGAAQEEAAGAAQcBgAEBBAABgAEAAYABAQQAAcABAAGAAQEEAAHg
AQEBgAEBBAAB4AH/AYABAQQAAeAB/wHAAQEEAAHhAf8BwAEBBAABgAH/AcABAwQAAYEB/wHgAQMEAAED
Af8B4AEHBAABBwP/BAABxwP/Cw==
</value>
</data>
<metadata name="cmMouseEntry.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>761, 17</value>
</metadata>
<metadata name="cmAddDel.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>652, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
@ -468,6 +382,89 @@
u459AcHtFiFpohCyiCKghgx2LMobzjENaYBSg7xUjpjyOWWq2lCmMw53SBq6H00dRjdybJJ3o8hMmseA
Y77zcj3gqae8LoFeYJow8wzVPeFzWvMDVj3mdpXmW8CvMpXS46wHi4zaxlRDxRL9I94NwPeMKM95pmwZ
x1//2Q==
</value>
</data>
<metadata name="cmAddDel.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>652, 17</value>
</metadata>
<metadata name="IL.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>494, 17</value>
</metadata>
<data name="IL.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAA8
EAAAAk1TRnQBSQFMAgEBCQEAAWABEQFgAREBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAATADAAEBAQABCAYAAQwYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM
AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA
ATMB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MBvAPzAfIB8QHyAgAB/w/zBv8BKQR4
Bf8BAAFuAXkBvAH3ARMB8AwAAvIG8wHyAfEB9AIAAf8I8wHyAfcB8gH3AfIB9wHzBv8BHAN4Bv8B7QHr
AbwC7w4AAvEG8gLxAwAB/wHzDf8B7wf/AZkBUAj/ARMB8AHqHAAg/wIAAfMB9wH/GwABQgFNAT4HAAE+
AwABKAMAAUADAAEwAwABAQEAAQEFAAGAAQEWAAP/AQAB4AcAAeAvAAHgBwAB4AcAAeAHAAHgBwAB4AcA
AeAHAAHgAQEGAAHgAQMGAAHgAQcGAAH3Bf8B+AEPAcAB/wGfAf0C/wHwAQcBwAF/AY8B+AHfAf0B4AED
AYABfwGPAfABjwHwAcABAQGAAT8BAwHgAQcB8AGAAQEBgAEfAwACgAEBAYABHwGAAQABgAEAAYABAQHA
AR8BgAEAAYABAAGAAQEBwAEfAYABAAGAAQABgAEBAeABHwGAAQEBgAEAAYABAQHgAR8BwAEBAcABAQGA
AQEB8AF/AcABAQHDAeEBwAEDAf8BIwHgAQMB5wHjAeABBwH/AY0E/wHwAQ8B/wH9Dv8EAAH8AT8C/wQA
AfgBDwHgAQMEAAHwAQ8BwAEBBAABwAEHAYABAQQAAYABBwGAAQEEAAGAAQABgAEBBAABwAEAAYABAQQA
AeABAQGAAQEEAAHgAf8BgAEBBAAB4AH/AcABAQQAAeEB/wHAAQEEAAGAAf8BwAEDBAABgQH/AeABAwQA
AQMB/wHgAQcEAAEHA/8EAAHHA/8L
</value>
</data>
<data name="btSaveMyMapping.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@ -542,6 +539,9 @@
Tesk88046SuRb2gfwdMB6S/DHs/UzS4d0QAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="cmMouseEntry.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>761, 17</value>
</metadata>
<metadata name="OFD.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>133, 17</value>
</metadata>

@ -22,18 +22,18 @@ namespace SCJMapper_V2.Joystick
#region Static Items
public new const String DeviceClass = "joystick"; // the device name used throughout this app
public new const String DeviceID = "js1_";
public new const string DeviceClass = "joystick"; // the device name used throughout this app
public new const string DeviceID = "js1_";
static public int RegisteredDevices = 0;
static public int JSnum_UNKNOWN = 0;
static public int JSnum_MAX = 12; // Get to 12 for 'freaks' ..
public const String JsUnknown = "jsx_";
public const string JsUnknown = "jsx_";
public new const String BlendedInput = DeviceID + DeviceCls.BlendedInput; //AC2 ..
static public new Boolean IsBlendedInput( String input )
public new const string BlendedInput = DeviceID + DeviceCls.BlendedInput; //AC2 ..
static public new bool IsBlendedInput( string input )
{
if ( input == BlendedInput ) return true;
return false;
@ -80,15 +80,15 @@ namespace SCJMapper_V2.Joystick
/// </summary>
/// <param name="deviceClass"></param>
/// <returns></returns>
static public new Boolean IsDeviceClass( String deviceClass )
static public new bool IsDeviceClass( string deviceClass )
{
return ( deviceClass == DeviceClass );
}
public static void DecompJsCommand( String jsCmd, out String jsTag, out String sAction )
public static void DecompJsCommand( string jsCmd, out string jsTag, out string sAction )
{
jsTag = ""; sAction = "";
String[] e = jsCmd.Split( new char[] { '_' }, StringSplitOptions.RemoveEmptyEntries );
string[] e = jsCmd.Split( new char[] { '_' }, StringSplitOptions.RemoveEmptyEntries );
if ( e.Length > 1 ) {
jsTag = e[0].Trim( ) + "_";
sAction = e[1].Trim( );
@ -100,7 +100,7 @@ namespace SCJMapper_V2.Joystick
/// </summary>
/// <param name="devInput"></param>
/// <returns></returns>
static public new String DeviceClassFromInput( String devInput )
static public new string DeviceClassFromInput( string devInput )
{
if ( JSNum( devInput ) != JSnum_UNKNOWN )
return DeviceClass; // this
@ -113,7 +113,7 @@ namespace SCJMapper_V2.Joystick
/// </summary>
/// <param name="input">A keyboard input</param>
/// <returns>DevInput</returns>
static public new String DevInput( String input )
static public new string DevInput( string input )
{
if ( DevMatch( input ) )
return input; // already
@ -126,7 +126,7 @@ namespace SCJMapper_V2.Joystick
/// </summary>
/// <param name="devInput">A devInput string</param>
/// <returns>True for a match</returns>
static public new Boolean DevMatch( String devInput )
static public new bool DevMatch( string devInput )
{
return IsJsN( devInput );
}
@ -138,9 +138,9 @@ namespace SCJMapper_V2.Joystick
/// </summary>
/// <param name="jsCmd">The joystick command in 'jsN_command' notation</param>
/// <returns>the jsN part or an empty string</returns>
public static String JsTagFromJsCommand( String jsCmd )
public static string JsTagFromJsCommand( string jsCmd )
{
String jsTag, sAction;
string jsTag, sAction;
DecompJsCommand( jsCmd, out jsTag, out sAction );
return jsTag;
}
@ -151,9 +151,9 @@ namespace SCJMapper_V2.Joystick
/// </summary>
/// <param name="jsCmd">The joystick command in 'jsN_command' notation</param>
/// <returns>the stick action part or an empty string</returns>
public static String ActionFromJsCommand( String jsCmd )
public static string ActionFromJsCommand( string jsCmd )
{
String jsTag, sAction;
string jsTag, sAction;
DecompJsCommand( jsCmd, out jsTag, out sAction );
return sAction;
}
@ -166,7 +166,7 @@ namespace SCJMapper_V2.Joystick
/// </summary>
/// <param name="jsNum">The JS number</param>
/// <returns>The formatted JS name for the CryEngine XML</returns>
static public String JSTag( int jsNum )
static public string JSTag( int jsNum )
{
if ( IsJSValid( jsNum ) ) return "js" + jsNum.ToString( );
return JsUnknown;
@ -179,10 +179,10 @@ namespace SCJMapper_V2.Joystick
/// </summary>
/// <param name="jsTag">The JS string</param>
/// <returns>The JS number</returns>
static public int JSNum( String jsTag )
static public int JSNum( string jsTag )
{
int retNum = JSnum_UNKNOWN;
if ( !String.IsNullOrWhiteSpace( jsTag ) ) {
if ( !string.IsNullOrWhiteSpace( jsTag ) ) {
// find jsN start
int jsPos = jsTag.IndexOf( "+js" );
if ( jsPos > 0 ) {
@ -191,15 +191,13 @@ namespace SCJMapper_V2.Joystick
retNum = JSnum_UNKNOWN; // neither double nor single digit found
}
}
}
else if ( jsTag.StartsWith( "js" ) ) {
if ( !int.TryParse( (jsTag+"XX").Substring( 2, 2 ), out retNum ) ) { // cheap .. test for double digits ( have to extend the string to parse)
} else if ( jsTag.StartsWith( "js" ) ) {
if ( !int.TryParse( ( jsTag + "XX" ).Substring( 2, 2 ), out retNum ) ) { // cheap .. test for double digits ( have to extend the string to parse)
if ( !int.TryParse( jsTag.Substring( 2, 1 ), out retNum ) ) { // now for only single ones
retNum = JSnum_UNKNOWN; // neither double nor single digit found
}
}
}
else {
} else {
retNum = JSnum_UNKNOWN; // neither double nor single digit found
}
}
@ -213,7 +211,7 @@ namespace SCJMapper_V2.Joystick
/// </summary>
/// <param name="jsNum">The JS number</param>
/// <returns>True if it is a valid one</returns>
static public Boolean IsJSValid( int jsNum )
static public bool IsJSValid( int jsNum )
{
return ( jsNum > JSnum_UNKNOWN ) && ( jsNum <= JSnum_MAX );
}
@ -225,7 +223,7 @@ namespace SCJMapper_V2.Joystick
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
static public Boolean IsJsN( String input )
static public bool IsJsN( string input )
{
return rgx_js.IsMatch( input );
}
@ -237,20 +235,18 @@ namespace SCJMapper_V2.Joystick
/// <param name="input">An input directive</param>
/// <param name="newJsN">the new JsN number</param>
/// <returns>The modified js directive or the directive if no mod can be done</returns>
static public String ReassignJSTag( String input, int newJsN )
static public string ReassignJSTag( string input, int newJsN )
{
// find jsN start
if ( IsJsN( input ) ) {
int inJsN = JSNum( input );
if ( inJsN < 10 ) {
return input.Replace( input.Substring( 0, 3 ), JSTag( newJsN ) );
}
else {
} else {
// 2 digit input JsN
return input.Replace( input.Substring( 0, 4 ), JSTag( newJsN ) );
}
}
else {
} else {
return input;
}
}
@ -268,18 +264,17 @@ namespace SCJMapper_V2.Joystick
/// <param name="control"></param>
/// <param name="makeIt"></param>
/// <returns></returns>
static public String MakeThrottle( String control, Boolean makeIt )
static public string MakeThrottle( string control, bool makeIt )
{
if ( makeIt == false ) return control;
if ( control.Length < 5 ) return control;
String retVal = control;
string retVal = control;
if ( rgx_jsl.IsMatch( control ) ) {
int inJsN = JSNum( control );
if ( inJsN < 10 ) {
retVal = retVal.Insert( 4, "throttle" );
}
else {
} else {
// 2 digit input JsN
retVal = retVal.Insert( 5, "throttle" );
}
@ -298,7 +293,7 @@ namespace SCJMapper_V2.Joystick
/// </summary>
/// <param name="control"></param>
/// <returns></returns>
static public Boolean CanThrottle( String control )
static public bool CanThrottle( string control )
{
return rgx_jsl.IsMatch( control ) || rgx_jsr.IsMatch( control );
}
@ -312,7 +307,7 @@ namespace SCJMapper_V2.Joystick
/// </summary>
/// <param name="devInput">A qualified devInput (jsN_buttonM)</param>
/// <returns>True for a valid one</returns>
static public Bool ValidModifier( String devInput )
static public Bool ValidModifier( string devInput )
{
return rgx_jsb.IsMatch( devInput );
}
@ -330,7 +325,7 @@ namespace SCJMapper_V2.Joystick
private Control m_hwnd;
private int m_numPOVs = 0; // static counter for UpdateControls
private int m_sliderCount = 0; // static counter for UpdateControls
private String m_lastItem = "";
private string m_lastItem = "";
private int m_senseLimit = 150; // axis jitter avoidance...
private int m_joystickNumber = 0; // seq number of the enumerated joystick
private bool[] m_ignoreButtons;
@ -346,7 +341,7 @@ namespace SCJMapper_V2.Joystick
/// </summary>
/// <param name="value">The Hat value</param>
/// <returns>The direction string</returns>
private String HatDir( int value )
private string HatDir( int value )
{
// Hats have a 360deg -> 36000 value reporting
if ( value == 0 ) return "up";
@ -360,15 +355,15 @@ namespace SCJMapper_V2.Joystick
/// <summary>
/// The DeviceClass of this instance
/// </summary>
public override String DevClass { get { return JoystickCls.DeviceClass; } }
public override string DevClass { get { return JoystickCls.DeviceClass; } }
/// <summary>
/// The JS ProductName property
/// </summary>
public override String DevName { get { return m_device.Properties.ProductName; } }
public override string DevName { get { return m_device.Properties.ProductName; } }
/// <summary>
/// The JS Instance GUID for multiple device support (VJoy gets 2 of the same name)
/// </summary>
public String DevInstanceGUID { get { return m_device.Information.InstanceGuid.ToString( ); } }
public string DevInstanceGUID { get { return m_device.Information.InstanceGuid.ToString( ); } }
/// <summary>
/// The sequence number of the enumerated devices
/// </summary>
@ -391,16 +386,50 @@ namespace SCJMapper_V2.Joystick
}
// device props
public int AxisCount { get { return m_device.Capabilities.AxeCount; } }
public int ButtonCount { get { return m_device.Capabilities.ButtonCount; } }
public int POVCount { get { return m_device.Capabilities.PovCount; } }
public override List<string> AnalogCommands
{
get {
List<string> cmds = new List<string>();
try {
// Enumerate all the objects on the device.
foreach ( DeviceObjectInstance d in m_device.GetObjects( ) ) {
// Set the UI to reflect what objects the joystick supports.
if ( ObjectGuid.XAxis == d.ObjectType ) cmds.Add( "x" );
if ( ObjectGuid.YAxis == d.ObjectType ) cmds.Add( "y" );
if ( ObjectGuid.ZAxis == d.ObjectType ) cmds.Add( "z" );
if ( ObjectGuid.RxAxis == d.ObjectType ) cmds.Add( "rotx" );
if ( ObjectGuid.RyAxis == d.ObjectType ) cmds.Add( "roty" );
if ( ObjectGuid.RzAxis == d.ObjectType ) cmds.Add( "rotz" );
if ( ObjectGuid.Slider == d.ObjectType ) {
switch ( m_sliderCount++ ) {
case 0:
cmds.Add( "slider1" );
break;
case 1:
cmds.Add( "slider2" );
break;
}
}
}
} catch ( Exception ex ) {
log.Error( "AnalogCommands - Get JS Objects failed", ex );
}
cmds.Sort( );
return cmds;
}
}
public override Boolean Activated
public override bool Activated
{
get { return m_activated; }
set
{
set {
m_activated = value;
if ( m_activated == false ) m_device.Unacquire( ); // explicitely if not longer active
}
@ -458,8 +487,7 @@ namespace SCJMapper_V2.Joystick
// Update the controls to reflect what objects the device supports.
UpdateControls( d );
}
}
catch ( Exception ex ) {
} catch ( Exception ex ) {
log.Error( "Get JS Objects failed", ex );
}
@ -493,7 +521,7 @@ namespace SCJMapper_V2.Joystick
ResetButtons( m_ignoreButtons );
// read ignore buttons
String igs = "";
string igs = "";
switch ( m_joystickNumber ) {
case 1: igs = appSettings.IgnoreJS1; break;
case 2: igs = appSettings.IgnoreJS2; break;
@ -505,11 +533,11 @@ namespace SCJMapper_V2.Joystick
case 8: igs = appSettings.IgnoreJS8; break;
default: break;
}
if ( String.IsNullOrWhiteSpace( igs ) ) return; // no setting - all allowed
if ( string.IsNullOrWhiteSpace( igs ) ) return; // no setting - all allowed
// read the ignore numbers
String[] nums = igs.Split( ' ' );
foreach ( String s in nums ) {
string[] nums = igs.Split( ' ' );
foreach ( string s in nums ) {
int btNum = 0; // gets 1..n
if ( int.TryParse( s, out btNum ) ) {
if ( ( btNum > 0 ) && ( btNum <= m_ignoreButtons.Length ) ) {
@ -622,7 +650,7 @@ namespace SCJMapper_V2.Joystick
/// Find the last change the user did on that device
/// </summary>
/// <returns>The last action as CryEngine compatible string</returns>
public override String GetLastChange( )
public override string GetLastChange( )
{
// TODO: Expand this out into a joystick class (see commit for details)
Dictionary<string, string> axies = new Dictionary<string, string>( )
@ -758,21 +786,18 @@ namespace SCJMapper_V2.Joystick
// Poll the device for info.
try {
m_device.Poll( );
}
catch ( SharpDXException e ) {
} catch ( SharpDXException e ) {
if ( ( e.ResultCode == ResultCode.NotAcquired ) || ( e.ResultCode == ResultCode.InputLost ) ) {
// Check to see if either the app needs to acquire the device, or
// if the app lost the device to another process.
try {
// Acquire the device.
m_device.Acquire( );
}
catch ( SharpDXException ) {
} catch ( SharpDXException ) {
// Failed to acquire the device. This could be because the app doesn't have focus.
return; // EXIT unaquired
}
}
else {
} else {
log.Error( "Unexpected Poll Exception", e );
return; // EXIT see ex code
}
@ -797,7 +822,7 @@ namespace SCJMapper_V2.Joystick
/// <summary>
/// Collect the current data from the device
/// </summary>
public override void GetCmdData( String cmd, out int data )
public override void GetCmdData( string cmd, out int data )
{
// TODO: Expand this out into a joystick class (see commit for details)
Dictionary<string, string> axies = new Dictionary<string, string>( )
@ -819,21 +844,18 @@ namespace SCJMapper_V2.Joystick
// Poll the device for info.
try {
m_device.Poll( );
}
catch ( SharpDXException e ) {
} catch ( SharpDXException e ) {
if ( ( e.ResultCode == ResultCode.NotAcquired ) || ( e.ResultCode == ResultCode.InputLost ) ) {
// Check to see if either the app needs to acquire the device, or
// if the app lost the device to another process.
try {
// Acquire the device.
m_device.Acquire( );
}
catch ( SharpDXException ) {
} catch ( SharpDXException ) {
// Failed to acquire the device. This could be because the app doesn't have focus.
return; // EXIT unaquired
}
}
else {
} else {
log.Error( "Unexpected Poll Exception", e );
return; // EXIT see ex code
}
@ -852,8 +874,7 @@ namespace SCJMapper_V2.Joystick
try {
PropertyInfo axisProperty = typeof( JoystickState ).GetProperty( axies[cmd] );
data = ( int )axisProperty.GetValue( this.m_state, null );
}
catch {
} catch {
data = 0;
}
}
@ -873,21 +894,18 @@ namespace SCJMapper_V2.Joystick
// Poll the device for info.
try {
m_device.Poll( );
}
catch ( SharpDXException e ) {
} catch ( SharpDXException e ) {
if ( ( e.ResultCode == ResultCode.NotAcquired ) || ( e.ResultCode == ResultCode.InputLost ) ) {
// Check to see if either the app needs to acquire the device, or
// if the app lost the device to another process.
try {
// Acquire the device - if the (main)window is active
if ( Activated ) m_device.Acquire( );
}
catch ( SharpDXException ) {
} catch ( SharpDXException ) {
// Failed to acquire the device. This could be because the app doesn't have focus.
return; // EXIT unaquired
}
}
else {
} else {
log.Error( "Unexpected Poll Exception", e );
return; // EXIT see ex code
}

@ -107,6 +107,9 @@
this.lblTurnspeed = new System.Windows.Forms.Label();
this.slTurnSpeed = new System.Windows.Forms.TrackBar();
this.panel6 = new System.Windows.Forms.Panel();
this.rbPtDeadzone = new System.Windows.Forms.RadioButton();
this.lblGraphSaturation = new System.Windows.Forms.Label();
this.lblGraphDeadzone = new System.Windows.Forms.Label();
this.lblNodetext = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.cbRuse = new System.Windows.Forms.CheckBox();
@ -166,9 +169,6 @@
this.panel10 = new System.Windows.Forms.Panel();
this.rbTuneStrafe = new System.Windows.Forms.RadioButton();
this.rbTuneYPR = new System.Windows.Forms.RadioButton();
this.lblGraphDeadzone = new System.Windows.Forms.Label();
this.lblGraphSaturation = new System.Windows.Forms.Label();
this.rbPtDeadzone = new System.Windows.Forms.RadioButton();
this.tlp.SuspendLayout();
this.tlpData.SuspendLayout();
this.pnlYaw.SuspendLayout();
@ -1082,6 +1082,38 @@
this.panel6.Size = new System.Drawing.Size(579, 288);
this.panel6.TabIndex = 5;
//
// rbPtDeadzone
//
this.rbPtDeadzone.AutoSize = true;
this.rbPtDeadzone.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rbPtDeadzone.Location = new System.Drawing.Point(14, 72);
this.rbPtDeadzone.Name = "rbPtDeadzone";
this.rbPtDeadzone.Size = new System.Drawing.Size(81, 19);
this.rbPtDeadzone.TabIndex = 54;
this.rbPtDeadzone.Text = "Deadzone";
this.rbPtDeadzone.UseVisualStyleBackColor = true;
this.rbPtDeadzone.CheckedChanged += new System.EventHandler(this.rbPtAny_CheckedChanged);
//
// lblGraphSaturation
//
this.lblGraphSaturation.AutoSize = true;
this.lblGraphSaturation.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblGraphSaturation.Location = new System.Drawing.Point(531, 266);
this.lblGraphSaturation.Name = "lblGraphSaturation";
this.lblGraphSaturation.Size = new System.Drawing.Size(34, 15);
this.lblGraphSaturation.TabIndex = 53;
this.lblGraphSaturation.Text = "0.000";
//
// lblGraphDeadzone
//
this.lblGraphDeadzone.AutoSize = true;
this.lblGraphDeadzone.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblGraphDeadzone.Location = new System.Drawing.Point(252, 266);
this.lblGraphDeadzone.Name = "lblGraphDeadzone";
this.lblGraphDeadzone.Size = new System.Drawing.Size(34, 15);
this.lblGraphDeadzone.TabIndex = 52;
this.lblGraphDeadzone.Text = "0.000";
//
// lblNodetext
//
this.lblNodetext.AutoSize = true;
@ -1281,6 +1313,7 @@
this.rbPtSaturation.Name = "rbPtSaturation";
this.rbPtSaturation.Size = new System.Drawing.Size(83, 19);
this.rbPtSaturation.TabIndex = 32;
this.rbPtSaturation.TabStop = true;
this.rbPtSaturation.Text = "Saturation";
this.rbPtSaturation.UseVisualStyleBackColor = true;
this.rbPtSaturation.CheckedChanged += new System.EventHandler(this.rbPtAny_CheckedChanged);
@ -1542,6 +1575,7 @@
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btDone.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btDone.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btDone.Location = new System.Drawing.Point(290, 3);
this.btDone.Name = "btDone";
this.btDone.Size = new System.Drawing.Size(125, 65);
@ -1767,38 +1801,6 @@
this.rbTuneYPR.UseVisualStyleBackColor = false;
this.rbTuneYPR.CheckedChanged += new System.EventHandler(this.rbTuneYPR_CheckedChanged);
//
// lblGraphDeadzone
//
this.lblGraphDeadzone.AutoSize = true;
this.lblGraphDeadzone.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblGraphDeadzone.Location = new System.Drawing.Point(252, 266);
this.lblGraphDeadzone.Name = "lblGraphDeadzone";
this.lblGraphDeadzone.Size = new System.Drawing.Size(34, 15);
this.lblGraphDeadzone.TabIndex = 52;
this.lblGraphDeadzone.Text = "0.000";
//
// lblGraphSaturation
//
this.lblGraphSaturation.AutoSize = true;
this.lblGraphSaturation.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblGraphSaturation.Location = new System.Drawing.Point(531, 266);
this.lblGraphSaturation.Name = "lblGraphSaturation";
this.lblGraphSaturation.Size = new System.Drawing.Size(34, 15);
this.lblGraphSaturation.TabIndex = 53;
this.lblGraphSaturation.Text = "0.000";
//
// rbPtDeadzone
//
this.rbPtDeadzone.AutoSize = true;
this.rbPtDeadzone.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rbPtDeadzone.Location = new System.Drawing.Point(14, 72);
this.rbPtDeadzone.Name = "rbPtDeadzone";
this.rbPtDeadzone.Size = new System.Drawing.Size(81, 19);
this.rbPtDeadzone.TabIndex = 54;
this.rbPtDeadzone.Text = "Deadzone";
this.rbPtDeadzone.UseVisualStyleBackColor = true;
this.rbPtDeadzone.CheckedChanged += new System.EventHandler(this.rbPtAny_CheckedChanged);
//
// FormJSCalCurve
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

@ -18,7 +18,7 @@ using System.Windows.Forms.DataVisualization.Charting;
using SCJMapper_V2.OGL.TextureLoaders;
using SCJMapper_V2.Joystick;
using SCJMapper_V2.Options;
namespace SCJMapper_V2.OGL
{
@ -160,13 +160,15 @@ namespace SCJMapper_V2.OGL
public void Load( DeviceTuningParameter dp )
{
if ( dp != null ) {
used = true;
nodetext = dp.Action;
used = ( !string.IsNullOrEmpty( dp.NodeText ) );
if ( !used ) return;
nodetext = dp.NodeText;
string[] e = nodetext.Split( new char[] { ActionTreeInputNode.RegDiv, ActionTreeInputNode.ModDiv }, StringSplitOptions.RemoveEmptyEntries );
if ( e.Length > 0 )
control = e[1].TrimEnd( );
else
control = dp.Action;
control = dp.NodeText;
command = dp.CommandCtrl;
// the option data
invertUsed = dp.InvertUsed;
@ -312,6 +314,31 @@ namespace SCJMapper_V2.OGL
#endregion
private OptionTree m_tuningRef = null; // will get the current optiontree on call
public OptionTree OptionTree
{
get {
return m_tuningRef;
}
set {
m_tuningRef = value;
if ( m_tuningRef == null ) {
log.Error( "- OptionTree: m_tuningRef not assigned" );
return;
}
YawTuning = m_tuningRef.TuningItem( "flight_move_yaw" );
PitchTuning = m_tuningRef.TuningItem( "flight_move_pitch" );
RollTuning = m_tuningRef.TuningItem( "flight_move_roll" );
StrafeLatTuning = m_tuningRef.TuningItem( "flight_move_strafe_lateral" );
StrafeVertTuning = m_tuningRef.TuningItem( "flight_move_strafe_vertical" );
StrafeLonTuning = m_tuningRef.TuningItem( "flight_move_strafe_longitudinal" );
}
}
// Generic Interaction Pattern
//
// Assign TuningParameter (load Live data from Parameter)
@ -322,14 +349,14 @@ namespace SCJMapper_V2.OGL
//
#region YAW - Interaction
private DeviceTuningParameter m_YawTuning = new DeviceTuningParameter( );
private DeviceTuningParameter m_YawTuning = new DeviceTuningParameter( "flight_move_yaw" );
private LiveValues m_liveYaw = new LiveValues(); // live values
/// <summary>
/// Submit the tuning parameters
/// </summary>
///
public DeviceTuningParameter YawTuning
private DeviceTuningParameter YawTuning
{
get {
YawUpdateTuning( );
@ -385,14 +412,14 @@ namespace SCJMapper_V2.OGL
#region PITCH - Interaction
private DeviceTuningParameter m_PitchTuning = new DeviceTuningParameter( );
private DeviceTuningParameter m_PitchTuning = new DeviceTuningParameter( "flight_move_pitch" );
private LiveValues m_livePitch = new LiveValues(); // live values
/// <summary>
/// Submit the tuning parameters
/// </summary>
///
public DeviceTuningParameter PitchTuning
private DeviceTuningParameter PitchTuning
{
get {
// update
@ -448,14 +475,14 @@ namespace SCJMapper_V2.OGL
#region ROLL - Interaction
private DeviceTuningParameter m_RollTuning = new DeviceTuningParameter( );
private DeviceTuningParameter m_RollTuning = new DeviceTuningParameter( "flight_move_roll" );
private LiveValues m_liveRoll = new LiveValues(); // live values
/// <summary>
/// Submit the tuning parameters
/// </summary>
///
public DeviceTuningParameter RollTuning
private DeviceTuningParameter RollTuning
{
get {
// update
@ -513,14 +540,14 @@ namespace SCJMapper_V2.OGL
#region Strafe Lateral - Interaction (yaw GUI values)
private DeviceTuningParameter m_StrafeLatTuning = new DeviceTuningParameter( );
private DeviceTuningParameter m_StrafeLatTuning = new DeviceTuningParameter( "flight_move_strafe_lateral" );
private LiveValues m_liveStrafeLat = new LiveValues(); // live values
/// <summary>
/// Submit the tuning parameters
/// </summary>
///
public DeviceTuningParameter StrafeLatTuning
private DeviceTuningParameter StrafeLatTuning
{
get {
// update
@ -577,14 +604,14 @@ namespace SCJMapper_V2.OGL
#region Strafe Vertical - Interaction (pitch GUI values)
private DeviceTuningParameter m_StrafeVertTuning = new DeviceTuningParameter( );
private DeviceTuningParameter m_StrafeVertTuning = new DeviceTuningParameter( "flight_move_strafe_vertical" );
private LiveValues m_liveStrafeVert = new LiveValues(); // live values
/// <summary>
/// Submit the tuning parameters
/// </summary>
///
public DeviceTuningParameter StrafeVertTuning
private DeviceTuningParameter StrafeVertTuning
{
get {
// update
@ -641,14 +668,14 @@ namespace SCJMapper_V2.OGL
#region Strafe Longitudinal - Interaction (Roll GUI values)
private DeviceTuningParameter m_StrafeLonTuning = new DeviceTuningParameter( );
private DeviceTuningParameter m_StrafeLonTuning = new DeviceTuningParameter( "flight_move_strafe_longitudinal" );
private LiveValues m_liveStrafeLon = new LiveValues(); // live values
/// <summary>
/// Submit the tuning parameters
/// </summary>
///
public DeviceTuningParameter StrafeLonTuning
private DeviceTuningParameter StrafeLonTuning
{
get {
// update

@ -1,4 +1,7 @@
namespace SCJMapper_V2.Joystick

namespace SCJMapper_V2.Options
{
public class DeviceOptionParameter
{
@ -7,6 +10,9 @@
private string m_deviceName = "";
private string m_cmdCtrl = ""; // x, y, rotz ...
private string m_doID = "";
private string m_action =""; // v_pitch .. assigned if known only
private bool m_deadzoneEnabled = false; // default
private string m_deadzone = "0.000";
@ -29,16 +35,17 @@
public DeviceOptionParameter(string deviceName, string cmdCtrl, string dz, string sa )
{
m_deviceName = deviceName;
m_doID = Deviceoptions.DevOptionID( deviceName, cmdCtrl );
m_cmdCtrl = cmdCtrl;
if ( string.IsNullOrEmpty( dz ) ) {
m_deadzone = "0.00";
m_deadzone = "0.000";
m_deadzoneEnabled = false;
} else {
m_deadzone = dz;
m_deadzoneEnabled = true;
}
if ( string.IsNullOrEmpty(sa)) {
m_saturation = "1.00";
m_saturation = "1.000";
m_saturationEnabled = false;
} else {
m_saturation = sa;
@ -55,17 +62,29 @@
set { m_deviceName = value; }
}
public string DoID
{
get { return m_doID; }
set { m_doID = value; }
}
public string CommandCtrl
{
get { return m_cmdCtrl; }
set { m_cmdCtrl = value; }
}
public string Action
{
get { return m_action; }
set { m_action = value; }
}
public bool DeadzoneUsed
{
get {
return ( m_deadzoneEnabled && ( m_deadzone != "0.00" ) );
return ( m_deadzoneEnabled && ( m_deadzone != "0.0000" ) );
}
set { m_deadzoneEnabled = value; }
}
@ -79,7 +98,7 @@
public bool SaturationUsed
{
get {
return ( m_saturationEnabled && ( m_saturation != "1.00" ) );
return ( m_saturationEnabled && ( m_saturation != "1.000" ) );
}
set { m_saturationEnabled = value; }
}

@ -1,8 +1,10 @@
using System;
using SCJMapper_V2.Gamepad;
using SCJMapper_V2.Joystick;
using System;
using System.Collections.Generic;
using System.Xml;
namespace SCJMapper_V2.Joystick
namespace SCJMapper_V2.Options
{
/// <summary>
/// set of parameters to tune the Joystick
@ -11,9 +13,10 @@ namespace SCJMapper_V2.Joystick
{
private static readonly log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod( ).DeclaringType );
private string m_nodetext = ""; // v_pitch - js1_x
private string m_action = ""; // v_pitch
private string m_cmdCtrl = ""; // js1_x, js1_y, js1_rotz ...
private string m_type = ""; // joystick OR xboxpad
private string m_class = ""; // joystick OR xboxpad
private int m_devInstanceNo = -1; // jsN - instance in XML
string m_option = ""; // the option name (level where it applies)
@ -21,8 +24,8 @@ namespace SCJMapper_V2.Joystick
private string m_deviceName = "";
private bool m_isStrafe = false; // default
// private bool m_senseEnabled = false; // default
// private string m_sense = "1.00";
// private bool m_senseEnabled = false; // default
// private string m_sense = "1.00";
private bool m_expEnabled = false; // default
private string m_exponent = "1.000";
@ -37,8 +40,9 @@ namespace SCJMapper_V2.Joystick
private DeviceOptionParameter m_deviceoption = null;
public DeviceTuningParameter( )
public DeviceTuningParameter( string optName )
{
m_option = optName;
}
#region Properties
@ -48,15 +52,15 @@ namespace SCJMapper_V2.Joystick
get { return m_device; }
set {
m_device = value;
m_type = "";
m_class = "";
m_devInstanceNo = -1;
if ( m_device == null ) return; // got a null device
if ( JoystickCls.IsDeviceClass( m_device.DevClass ) ) {
m_type = m_device.DevClass;
m_class = m_device.DevClass;
m_devInstanceNo = ( m_device as JoystickCls ).JSAssignment;
} else if ( Gamepad.GamepadCls.IsDeviceClass( m_device.DevClass ) ) {
m_type = m_device.DevClass;
} else if ( GamepadCls.IsDeviceClass( m_device.DevClass ) ) {
m_class = m_device.DevClass;
m_devInstanceNo = 1; // supports ONE gamepad
}
}
@ -74,10 +78,21 @@ namespace SCJMapper_V2.Joystick
set { m_deviceName = value; }
}
public string Action
public string DeviceClass
{
get { return m_action; }
set { m_action = value; DecomposeCommand( ); }
get { return m_class; }
}
public string OptionName
{
get { return m_option; }
}
public string NodeText
{
get { return m_nodetext; }
set { m_nodetext = value; DecomposeCommand( ); }
}
public string CommandCtrl
@ -97,26 +112,11 @@ namespace SCJMapper_V2.Joystick
get { return m_deviceoption; }
set {
m_deviceoption = value;
if ( m_deviceoption != null ) {
m_deviceoption.DeviceName = DeviceName; // must know too
m_deviceoption.CommandCtrl = CommandCtrl; // must know too
}
if ( m_deviceoption != null )
m_deviceoption.Action = m_action;
}
}
/*
public bool SensitivityUsed
{
get { return m_senseEnabled; }
set { m_senseEnabled = value; }
}
public string Sensitivity
{
get { return m_sense; }
set { m_sense = value; }
}
*/
public bool InvertUsed
{
get { return m_invertEnabled; }
@ -158,9 +158,9 @@ namespace SCJMapper_V2.Joystick
// reset some defaults
public void Reset( )
{
GameDevice = null;
//GameDevice = null;
Deviceoption = null;
Action = "";
NodeText = "";
}
@ -171,8 +171,8 @@ namespace SCJMapper_V2.Joystick
{
// populate from input
// something like "v_pitch - js1_x" OR "v_pitch - xi_thumbl" OR "v_pitch - ximod+xi_thumbl+xi_mod"
string cmd = ActionTreeNode.CommandFromNodeText( Action );
string action = ActionTreeNode.ActionFromNodeText( Action );
string cmd = ActionTreeNode.CommandFromNodeText( NodeText );
m_action = ActionTreeNode.ActionFromNodeText( NodeText );
m_cmdCtrl = "";
if ( !string.IsNullOrWhiteSpace( cmd ) ) {
// decomp gamepad entries - could have modifiers so check for contains...
@ -180,47 +180,24 @@ namespace SCJMapper_V2.Joystick
// gamepad
m_cmdCtrl = "xi_thumblx";
m_deviceName = m_device.DevName;
if ( action.Contains( "pitch" ) ) m_option = string.Format( "flight_move_pitch" );
else m_option = string.Format( "flight_move_yaw" );
} else if ( cmd.Contains( "xi_thumbly" ) ) {
// gamepad
m_cmdCtrl = "xi_thumbly";
m_deviceName = m_device.DevName;
if ( action.Contains( "pitch" ) ) m_option = string.Format( "flight_move_pitch" );
else m_option = string.Format( "flight_move_yaw" );
} else if ( cmd.Contains( "xi_thumbrx" ) ) {
// gamepad
m_cmdCtrl = "xi_thumbrx";
m_deviceName = m_device.DevName;
if ( action.Contains( "pitch" ) ) m_option = string.Format( "flight_move_pitch" );
else m_option = string.Format( "flight_move_yaw" );
} else if ( cmd.Contains( "xi_thumbry" ) ) {
// gamepad
m_cmdCtrl = "xi_thumbry";
m_deviceName = m_device.DevName;
if ( action.Contains( "pitch" ) ) m_option = string.Format( "flight_move_pitch" );
else m_option = string.Format( "flight_move_yaw" );
}
// assume joystick
else {
// get parts
m_cmdCtrl = JoystickCls.ActionFromJsCommand( cmd ); //js1_x -> x; js2_rotz -> rotz
m_deviceName = m_device.DevName;
if ( action.Contains( "pitch" ) ) {
m_option = string.Format( "flight_move_pitch" ); m_isStrafe = false;
} else if ( action.Contains( "yaw" ) ) {
m_option = string.Format( "flight_move_yaw" ); m_isStrafe = false;
} else if ( action.Contains( "roll" ) ) {
m_option = string.Format( "flight_move_roll" ); m_isStrafe = false;
}
// strafes
else if ( action.Contains( "vertical" ) ) {
m_option = string.Format( "flight_move_strafe_vertical" ); m_isStrafe = true;
} else if ( action.Contains( "lateral" ) ) {
m_option = string.Format( "flight_move_strafe_lateral" ); m_isStrafe = true;
} else if ( action.Contains( "longitudinal" ) ) {
m_option = string.Format( "flight_move_strafe_longitudinal" ); m_isStrafe = true;
} else m_option = string.Format( "????" ); // don't know what it is ...
}
}
}
@ -233,9 +210,10 @@ namespace SCJMapper_V2.Joystick
public string Options_toXML( )
{
if ( ( /*SensitivityUsed ||*/ ExponentUsed || InvertUsed || NonLinCurveUsed ) == false ) return ""; // not used
if ( DevInstanceNo < 1 ) return ""; // no device to assign it to..
string tmp = "";
tmp += string.Format( "\t<options type=\"{0}\" instance=\"{1}\">\n", m_type, m_devInstanceNo.ToString( ) );
tmp += string.Format( "\t<options type=\"{0}\" instance=\"{1}\">\n", m_class, m_devInstanceNo.ToString( ) );
tmp += string.Format( "\t\t<{0} ", m_option );
if ( InvertUsed ) {
@ -278,10 +256,9 @@ namespace SCJMapper_V2.Joystick
/// <returns></returns>
public Boolean Options_fromXML( XmlReader reader, string type, int instance )
{
m_type = type;
m_class = type;
string invert = "";
string sensitivity = "";
string exponent = "";
m_option = reader.Name;

@ -3,8 +3,9 @@ using System.Collections.Generic;
using System.Xml;
using System.IO;
using System.Xml.Linq;
using SCJMapper_V2.Joystick;
namespace SCJMapper_V2.Joystick
namespace SCJMapper_V2.Options
{
/// <summary>
/// Maintains an Deviceoptions - something like:
@ -26,22 +27,54 @@ namespace SCJMapper_V2.Joystick
private static readonly log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod( ).DeclaringType );
private static char ID_Delimiter = '⁞';
/// <summary>
/// Create a DeviceOption ID from dev Name and the command
/// </summary>
/// <param name="devName">The game device name as retrieved from XInput</param>
/// <param name="cmdCtrl">A device control that supports devOptions (all ananlog controls)</param>
/// <returns></returns>
public static string DevOptionID( string devName, string cmdCtrl )
{
// cmdCtrl can be anything
// v_flight_throttle_abs - js1_throttlez
// v_strafe_longitudinal - js1_y
// v_strafe_longitudinal - js1_roty
// v_strafe_longitudinal - xi1_shoulderl+thumbly
// v_strafe_longitudinal - xi1_thumbly
string cmd = cmdCtrl.Trim();
// messy...
if ( cmd.Contains( "throttle" ) ) cmd = cmd.Replace( "throttle", "" ); // this is not suitable for the devOption
if ( cmd.Contains( "throttle" ) ) cmd = cmd.Replace( "thumbl", "" ); // this is not suitable for the devOption
if ( cmd.Contains( "throttle" ) ) cmd = cmd.Replace( "thumbr", "" ); // this is not suitable for the devOption
if ( cmd.Contains( "_" ) ) {
int l = cmd.LastIndexOf("_");
cmd = cmd.Substring( l + 1 ); // assuming it is never the last one..
}
if ( cmd.Contains( "+" ) ) {
int l = cmd.LastIndexOf("+");
cmd = cmd.Substring( l + 1 ); // assuming it is never the last one..
}
return string.Format( "{0}{1}{2}", devName, ID_Delimiter, cmd );
}
List<string> m_stringOptions = new List<string>( );
private List<string> m_stringOptions = new List<string>( ); // collected options from XML that are not parsed
// ctor
public Deviceoptions( Options options )
public Deviceoptions( JoystickList jsList )
{
// create all devOptions for all devices found (they may or may no be used)
foreach ( JoystickCls js in jsList ) {
foreach ( string input in js.AnalogCommands ) {
string doid = DevOptionID(js.DevName, input);
if ( ! this.ContainsKey(doid)) {
this.Add( doid, new DeviceOptionParameter( js.DevName, input, "", "" ) ); // init with disabled defaults
} else {
log.WarnFormat( "cTor - DO_ID {0} exists (likely a duplicate device name e,g, vJoy ??)", doid );
}
}
}
}
@ -50,7 +83,16 @@ namespace SCJMapper_V2.Joystick
get { return ( m_stringOptions.Count + base.Count ); }
}
// provide access to Sense items
/// <summary>
/// Reset all Action strings in the dictionary
/// </summary>
public void ResetActions( )
{
foreach (KeyValuePair<string, DeviceOptionParameter> kv in this ) {
kv.Value.Action = "";
}
}
private string[] FormatXml( string xml )
{
@ -137,24 +179,26 @@ namespace SCJMapper_V2.Joystick
if ( !string.IsNullOrWhiteSpace( deadzone ) ) {
float testF;
if ( !float.TryParse( deadzone, out testF ) ) { // check for valid number in string
deadzone = "0.00";
deadzone = "0.000";
}
if ( !this.ContainsKey( doID ) ) {
this.Add( doID, new DeviceOptionParameter( name, input, deadzone, saturation ) );
}else {
} else {
// add deadzone value tp existing
this[doID].DeadzoneUsed = true;
this[doID].Deadzone = deadzone;
}
}
if ( !string.IsNullOrWhiteSpace( saturation ) ) {
float testF;
if ( !float.TryParse( saturation, out testF ) ) { // check for valid number in string
saturation = "1.00";
saturation = "1.000";
}
if ( !this.ContainsKey( doID ) ) {
this.Add( doID, new DeviceOptionParameter( name, input, deadzone, saturation ) );
} else {
// add saturation value tp existing
this[doID].SaturationUsed = true;
this[doID].Saturation = saturation;
}
}

@ -0,0 +1,716 @@
namespace SCJMapper_V2.Options
{
partial class FormOptions
{
/// <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 Windows Form 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( )
{
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormOptions));
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.tabC = new System.Windows.Forms.TabControl();
this.tabOptions = new System.Windows.Forms.TabPage();
this.lvOptionTree = new System.Windows.Forms.ListView();
this.tabDevOption = new System.Windows.Forms.TabPage();
this.lvDevOptions = new System.Windows.Forms.ListView();
this.pnlOptionInput = new System.Windows.Forms.Panel();
this.rbUsePts = new System.Windows.Forms.RadioButton();
this.rbUseExpo = new System.Windows.Forms.RadioButton();
this.rbUseNone = new System.Windows.Forms.RadioButton();
this.panel2 = new System.Windows.Forms.Panel();
this.rbLivePtExponent = new System.Windows.Forms.RadioButton();
this.lblLiveOutExponent = new System.Windows.Forms.Label();
this.lblLiveIn1 = new System.Windows.Forms.Label();
this.lblLiveOut1 = new System.Windows.Forms.Label();
this.cbxLiveInvert = new System.Windows.Forms.CheckBox();
this.lblLiveIn2 = new System.Windows.Forms.Label();
this.lblLiveOut2 = new System.Windows.Forms.Label();
this.lblLiveIn3 = new System.Windows.Forms.Label();
this.rbLivePt3 = new System.Windows.Forms.RadioButton();
this.lblLiveOut3 = new System.Windows.Forms.Label();
this.rbLivePt2 = new System.Windows.Forms.RadioButton();
this.label32 = new System.Windows.Forms.Label();
this.rbLivePt1 = new System.Windows.Forms.RadioButton();
this.label33 = new System.Windows.Forms.Label();
this.lblGraphSaturation = new System.Windows.Forms.Label();
this.lblGraphDeadzone = new System.Windows.Forms.Label();
this.lblLiveNodetext = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
this.pnlDevOptionInput = new System.Windows.Forms.Panel();
this.cbxUseSaturation = new System.Windows.Forms.CheckBox();
this.cbxUseDeadzone = new System.Windows.Forms.CheckBox();
this.panel3 = new System.Windows.Forms.Panel();
this.lblLiveOutSaturation = new System.Windows.Forms.Label();
this.tbSaturation = new System.Windows.Forms.TrackBar();
this.tbDeadzone = new System.Windows.Forms.TrackBar();
this.lblLiveOutDeadzone = new System.Windows.Forms.Label();
this.pnlPreview = new System.Windows.Forms.Panel();
this.btDebugStop = new System.Windows.Forms.Button();
this.panel4 = new System.Windows.Forms.Panel();
this.btExit = new System.Windows.Forms.Button();
this.cobDevices = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.tableLayoutPanel1.SuspendLayout();
this.tabC.SuspendLayout();
this.tabOptions.SuspendLayout();
this.tabDevOption.SuspendLayout();
this.pnlOptionInput.SuspendLayout();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit();
this.pnlDevOptionInput.SuspendLayout();
this.panel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tbSaturation)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbDeadzone)).BeginInit();
this.pnlPreview.SuspendLayout();
this.panel4.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 2;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 670F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.tabC, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.pnlOptionInput, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.pnlDevOptionInput, 1, 2);
this.tableLayoutPanel1.Controls.Add(this.pnlPreview, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.panel4, 1, 3);
this.tableLayoutPanel1.Location = new System.Drawing.Point(9, 9);
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 4;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 516F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 126F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(1008, 719);
this.tableLayoutPanel1.TabIndex = 0;
//
// tabC
//
this.tabC.Controls.Add(this.tabOptions);
this.tabC.Controls.Add(this.tabDevOption);
this.tabC.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabC.Location = new System.Drawing.Point(3, 3);
this.tabC.Name = "tabC";
this.tableLayoutPanel1.SetRowSpan(this.tabC, 3);
this.tabC.SelectedIndex = 0;
this.tabC.Size = new System.Drawing.Size(664, 661);
this.tabC.TabIndex = 3;
this.tabC.Selecting += new System.Windows.Forms.TabControlCancelEventHandler(this.tabC_Selecting);
this.tabC.Deselecting += new System.Windows.Forms.TabControlCancelEventHandler(this.tabC_Selecting);
//
// tabOptions
//
this.tabOptions.Controls.Add(this.lvOptionTree);
this.tabOptions.Location = new System.Drawing.Point(4, 22);
this.tabOptions.Name = "tabOptions";
this.tabOptions.Padding = new System.Windows.Forms.Padding(3);
this.tabOptions.Size = new System.Drawing.Size(656, 635);
this.tabOptions.TabIndex = 0;
this.tabOptions.Text = "Flight Options";
this.tabOptions.UseVisualStyleBackColor = true;
//
// lvOptionTree
//
this.lvOptionTree.Dock = System.Windows.Forms.DockStyle.Fill;
this.lvOptionTree.Location = new System.Drawing.Point(3, 3);
this.lvOptionTree.Name = "lvOptionTree";
this.lvOptionTree.Size = new System.Drawing.Size(650, 629);
this.lvOptionTree.TabIndex = 0;
this.lvOptionTree.UseCompatibleStateImageBehavior = false;
this.lvOptionTree.View = System.Windows.Forms.View.Details;
this.lvOptionTree.SelectedIndexChanged += new System.EventHandler(this.lvOptionTree_SelectedIndexChanged);
//
// tabDevOption
//
this.tabDevOption.Controls.Add(this.lvDevOptions);
this.tabDevOption.Location = new System.Drawing.Point(4, 22);
this.tabDevOption.Name = "tabDevOption";
this.tabDevOption.Padding = new System.Windows.Forms.Padding(3);
this.tabDevOption.Size = new System.Drawing.Size(656, 607);
this.tabDevOption.TabIndex = 1;
this.tabDevOption.Text = "Device Options";
this.tabDevOption.UseVisualStyleBackColor = true;
//
// lvDevOptions
//
this.lvDevOptions.Dock = System.Windows.Forms.DockStyle.Fill;
this.lvDevOptions.Location = new System.Drawing.Point(3, 3);
this.lvDevOptions.Name = "lvDevOptions";
this.lvDevOptions.Size = new System.Drawing.Size(650, 601);
this.lvDevOptions.TabIndex = 0;
this.lvDevOptions.UseCompatibleStateImageBehavior = false;
this.lvDevOptions.SelectedIndexChanged += new System.EventHandler(this.lvDevOptions_SelectedIndexChanged);
//
// pnlOptionInput
//
this.pnlOptionInput.BackColor = System.Drawing.Color.WhiteSmoke;
this.pnlOptionInput.Controls.Add(this.label1);
this.pnlOptionInput.Controls.Add(this.rbUsePts);
this.pnlOptionInput.Controls.Add(this.cobDevices);
this.pnlOptionInput.Controls.Add(this.rbUseExpo);
this.pnlOptionInput.Controls.Add(this.rbUseNone);
this.pnlOptionInput.Controls.Add(this.panel2);
this.pnlOptionInput.Controls.Add(this.lblGraphSaturation);
this.pnlOptionInput.Controls.Add(this.lblGraphDeadzone);
this.pnlOptionInput.Controls.Add(this.lblLiveNodetext);
this.pnlOptionInput.Controls.Add(this.label4);
this.pnlOptionInput.Controls.Add(this.chart1);
this.pnlOptionInput.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlOptionInput.Location = new System.Drawing.Point(673, 28);
this.pnlOptionInput.Name = "pnlOptionInput";
this.pnlOptionInput.Size = new System.Drawing.Size(332, 510);
this.pnlOptionInput.TabIndex = 6;
//
// rbUsePts
//
this.rbUsePts.AutoSize = true;
this.rbUsePts.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rbUsePts.Location = new System.Drawing.Point(13, 383);
this.rbUsePts.Name = "rbUsePts";
this.rbUsePts.Size = new System.Drawing.Size(58, 17);
this.rbUsePts.TabIndex = 57;
this.rbUsePts.Text = "Curve";
this.rbUsePts.UseVisualStyleBackColor = true;
this.rbUsePts.CheckedChanged += new System.EventHandler(this.rbPtAny_CheckedChanged);
//
// rbUseExpo
//
this.rbUseExpo.AutoSize = true;
this.rbUseExpo.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rbUseExpo.Location = new System.Drawing.Point(13, 341);
this.rbUseExpo.Name = "rbUseExpo";
this.rbUseExpo.Size = new System.Drawing.Size(78, 17);
this.rbUseExpo.TabIndex = 57;
this.rbUseExpo.Text = "Exponent";
this.rbUseExpo.UseVisualStyleBackColor = true;
this.rbUseExpo.CheckedChanged += new System.EventHandler(this.rbPtAny_CheckedChanged);
//
// rbUseNone
//
this.rbUseNone.AutoSize = true;
this.rbUseNone.Checked = true;
this.rbUseNone.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rbUseNone.Location = new System.Drawing.Point(13, 455);
this.rbUseNone.Name = "rbUseNone";
this.rbUseNone.Size = new System.Drawing.Size(55, 17);
this.rbUseNone.TabIndex = 56;
this.rbUseNone.TabStop = true;
this.rbUseNone.Text = "None";
this.rbUseNone.UseVisualStyleBackColor = true;
this.rbUseNone.CheckedChanged += new System.EventHandler(this.rbPtAny_CheckedChanged);
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.Gainsboro;
this.panel2.Controls.Add(this.rbLivePtExponent);
this.panel2.Controls.Add(this.lblLiveOutExponent);
this.panel2.Controls.Add(this.lblLiveIn1);
this.panel2.Controls.Add(this.lblLiveOut1);
this.panel2.Controls.Add(this.cbxLiveInvert);
this.panel2.Controls.Add(this.lblLiveIn2);
this.panel2.Controls.Add(this.lblLiveOut2);
this.panel2.Controls.Add(this.lblLiveIn3);
this.panel2.Controls.Add(this.rbLivePt3);
this.panel2.Controls.Add(this.lblLiveOut3);
this.panel2.Controls.Add(this.rbLivePt2);
this.panel2.Controls.Add(this.label32);
this.panel2.Controls.Add(this.rbLivePt1);
this.panel2.Controls.Add(this.label33);
this.panel2.Location = new System.Drawing.Point(103, 332);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(220, 144);
this.panel2.TabIndex = 55;
//
// rbLivePtExponent
//
this.rbLivePtExponent.AutoSize = true;
this.rbLivePtExponent.Checked = true;
this.rbLivePtExponent.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rbLivePtExponent.Location = new System.Drawing.Point(9, 9);
this.rbLivePtExponent.Name = "rbLivePtExponent";
this.rbLivePtExponent.Size = new System.Drawing.Size(81, 19);
this.rbLivePtExponent.TabIndex = 33;
this.rbLivePtExponent.TabStop = true;
this.rbLivePtExponent.Text = "Exponent:";
this.rbLivePtExponent.UseVisualStyleBackColor = true;
this.rbLivePtExponent.CheckedChanged += new System.EventHandler(this.rbPtAny_CheckedChanged);
//
// lblLiveOutExponent
//
this.lblLiveOutExponent.AutoSize = true;
this.lblLiveOutExponent.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblLiveOutExponent.Location = new System.Drawing.Point(107, 11);
this.lblLiveOutExponent.Name = "lblLiveOutExponent";
this.lblLiveOutExponent.Size = new System.Drawing.Size(34, 15);
this.lblLiveOutExponent.TabIndex = 9;
this.lblLiveOutExponent.Text = "0.000";
//
// lblLiveIn1
//
this.lblLiveIn1.AutoSize = true;
this.lblLiveIn1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblLiveIn1.Location = new System.Drawing.Point(84, 51);
this.lblLiveIn1.Name = "lblLiveIn1";
this.lblLiveIn1.Size = new System.Drawing.Size(28, 15);
this.lblLiveIn1.TabIndex = 18;
this.lblLiveIn1.Text = "0.25";
//
// lblLiveOut1
//
this.lblLiveOut1.AutoSize = true;
this.lblLiveOut1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblLiveOut1.Location = new System.Drawing.Point(137, 51);
this.lblLiveOut1.Name = "lblLiveOut1";
this.lblLiveOut1.Size = new System.Drawing.Size(28, 15);
this.lblLiveOut1.TabIndex = 19;
this.lblLiveOut1.Text = "0.25";
//
// cbxLiveInvert
//
this.cbxLiveInvert.AutoSize = true;
this.cbxLiveInvert.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cbxLiveInvert.Location = new System.Drawing.Point(9, 120);
this.cbxLiveInvert.Name = "cbxLiveInvert";
this.cbxLiveInvert.Size = new System.Drawing.Size(59, 17);
this.cbxLiveInvert.TabIndex = 54;
this.cbxLiveInvert.Text = "Invert";
this.cbxLiveInvert.UseVisualStyleBackColor = true;
this.cbxLiveInvert.CheckedChanged += new System.EventHandler(this.cbxInvert_CheckedChanged);
//
// lblLiveIn2
//
this.lblLiveIn2.AutoSize = true;
this.lblLiveIn2.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblLiveIn2.Location = new System.Drawing.Point(84, 74);
this.lblLiveIn2.Name = "lblLiveIn2";
this.lblLiveIn2.Size = new System.Drawing.Size(22, 15);
this.lblLiveIn2.TabIndex = 20;
this.lblLiveIn2.Text = "0.5";
//
// lblLiveOut2
//
this.lblLiveOut2.AutoSize = true;
this.lblLiveOut2.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblLiveOut2.Location = new System.Drawing.Point(137, 74);
this.lblLiveOut2.Name = "lblLiveOut2";
this.lblLiveOut2.Size = new System.Drawing.Size(22, 15);
this.lblLiveOut2.TabIndex = 21;
this.lblLiveOut2.Text = "0.5";
//
// lblLiveIn3
//
this.lblLiveIn3.AutoSize = true;
this.lblLiveIn3.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblLiveIn3.Location = new System.Drawing.Point(84, 97);
this.lblLiveIn3.Name = "lblLiveIn3";
this.lblLiveIn3.Size = new System.Drawing.Size(28, 15);
this.lblLiveIn3.TabIndex = 22;
this.lblLiveIn3.Text = "0.75";
//
// rbLivePt3
//
this.rbLivePt3.AutoSize = true;
this.rbLivePt3.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rbLivePt3.Location = new System.Drawing.Point(9, 95);
this.rbLivePt3.Name = "rbLivePt3";
this.rbLivePt3.Size = new System.Drawing.Size(67, 19);
this.rbLivePt3.TabIndex = 31;
this.rbLivePt3.Text = "Point 3:";
this.rbLivePt3.UseVisualStyleBackColor = true;
this.rbLivePt3.CheckedChanged += new System.EventHandler(this.rbPtAny_CheckedChanged);
//
// lblLiveOut3
//
this.lblLiveOut3.AutoSize = true;
this.lblLiveOut3.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblLiveOut3.Location = new System.Drawing.Point(137, 97);
this.lblLiveOut3.Name = "lblLiveOut3";
this.lblLiveOut3.Size = new System.Drawing.Size(28, 15);
this.lblLiveOut3.TabIndex = 23;
this.lblLiveOut3.Text = "0.75";
//
// rbLivePt2
//
this.rbLivePt2.AutoSize = true;
this.rbLivePt2.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rbLivePt2.Location = new System.Drawing.Point(9, 72);
this.rbLivePt2.Name = "rbLivePt2";
this.rbLivePt2.Size = new System.Drawing.Size(67, 19);
this.rbLivePt2.TabIndex = 30;
this.rbLivePt2.Text = "Point 2:";
this.rbLivePt2.UseVisualStyleBackColor = true;
this.rbLivePt2.CheckedChanged += new System.EventHandler(this.rbPtAny_CheckedChanged);
//
// label32
//
this.label32.AutoSize = true;
this.label32.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label32.Location = new System.Drawing.Point(84, 31);
this.label32.Name = "label32";
this.label32.Size = new System.Drawing.Size(35, 15);
this.label32.TabIndex = 27;
this.label32.Text = "IN(x)";
//
// rbLivePt1
//
this.rbLivePt1.AutoSize = true;
this.rbLivePt1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.rbLivePt1.Location = new System.Drawing.Point(9, 49);
this.rbLivePt1.Name = "rbLivePt1";
this.rbLivePt1.Size = new System.Drawing.Size(67, 19);
this.rbLivePt1.TabIndex = 29;
this.rbLivePt1.Text = "Point 1:";
this.rbLivePt1.UseVisualStyleBackColor = true;
this.rbLivePt1.CheckedChanged += new System.EventHandler(this.rbPtAny_CheckedChanged);
//
// label33
//
this.label33.AutoSize = true;
this.label33.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label33.Location = new System.Drawing.Point(130, 31);
this.label33.Name = "label33";
this.label33.Size = new System.Drawing.Size(46, 15);
this.label33.TabIndex = 28;
this.label33.Text = "OUT(y)";
//
// lblGraphSaturation
//
this.lblGraphSaturation.AutoSize = true;
this.lblGraphSaturation.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblGraphSaturation.Location = new System.Drawing.Point(289, 295);
this.lblGraphSaturation.Name = "lblGraphSaturation";
this.lblGraphSaturation.Size = new System.Drawing.Size(34, 15);
this.lblGraphSaturation.TabIndex = 53;
this.lblGraphSaturation.Text = "0.000";
//
// lblGraphDeadzone
//
this.lblGraphDeadzone.AutoSize = true;
this.lblGraphDeadzone.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblGraphDeadzone.Location = new System.Drawing.Point(10, 295);
this.lblGraphDeadzone.Name = "lblGraphDeadzone";
this.lblGraphDeadzone.Size = new System.Drawing.Size(34, 15);
this.lblGraphDeadzone.TabIndex = 52;
this.lblGraphDeadzone.Text = "0.000";
//
// lblLiveNodetext
//
this.lblLiveNodetext.AutoSize = true;
this.lblLiveNodetext.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblLiveNodetext.Location = new System.Drawing.Point(13, 313);
this.lblLiveNodetext.Name = "lblLiveNodetext";
this.lblLiveNodetext.Size = new System.Drawing.Size(16, 13);
this.lblLiveNodetext.TabIndex = 51;
this.lblLiveNodetext.Text = "...";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(68, 301);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(178, 13);
this.label4.TabIndex = 36;
this.label4.Text = "Select an option then click and drag";
//
// chart1
//
chartArea1.AxisX.Crossing = -1.7976931348623157E+308D;
chartArea1.AxisX.IsMarginVisible = false;
chartArea1.AxisX.LabelStyle.Enabled = false;
chartArea1.AxisX.MajorGrid.Interval = 0.2D;
chartArea1.AxisX.MajorGrid.IntervalType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Number;
chartArea1.AxisX.MajorTickMark.Interval = 0.2D;
chartArea1.AxisX.MajorTickMark.IntervalType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Number;
chartArea1.AxisX.Maximum = 1D;
chartArea1.AxisX.Minimum = 0D;
chartArea1.AxisX.MinorGrid.Interval = 0.1D;
chartArea1.AxisX.MinorGrid.IntervalType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Number;
chartArea1.AxisX.MinorTickMark.Interval = 0.1D;
chartArea1.AxisX.MinorTickMark.IntervalOffsetType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Number;
chartArea1.AxisY.Crossing = -1.7976931348623157E+308D;
chartArea1.AxisY.Interval = 5D;
chartArea1.AxisY.IsMarginVisible = false;
chartArea1.AxisY.LabelStyle.Enabled = false;
chartArea1.AxisY.MajorGrid.Interval = 0.2D;
chartArea1.AxisY.MajorGrid.IntervalType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Number;
chartArea1.AxisY.MajorTickMark.Interval = 0.2D;
chartArea1.AxisY.MajorTickMark.IntervalType = System.Windows.Forms.DataVisualization.Charting.DateTimeIntervalType.Number;
chartArea1.AxisY.Maximum = 1D;
chartArea1.AxisY.Minimum = 0D;
chartArea1.Name = "ChartArea1";
this.chart1.ChartAreas.Add(chartArea1);
this.chart1.Location = new System.Drawing.Point(16, 3);
this.chart1.Name = "chart1";
series1.ChartArea = "ChartArea1";
series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline;
series1.MarkerColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Circle;
series1.Name = "Series1";
this.chart1.Series.Add(series1);
this.chart1.Size = new System.Drawing.Size(301, 295);
this.chart1.TabIndex = 16;
this.chart1.Text = "chart1";
this.chart1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.chartPoint_MouseDown);
this.chart1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.chartPoint_MouseMove);
this.chart1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.chartPoint_MouseUp);
//
// pnlDevOptionInput
//
this.pnlDevOptionInput.BackColor = System.Drawing.Color.WhiteSmoke;
this.pnlDevOptionInput.Controls.Add(this.cbxUseSaturation);
this.pnlDevOptionInput.Controls.Add(this.cbxUseDeadzone);
this.pnlDevOptionInput.Controls.Add(this.panel3);
this.pnlDevOptionInput.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlDevOptionInput.Location = new System.Drawing.Point(673, 544);
this.pnlDevOptionInput.Name = "pnlDevOptionInput";
this.pnlDevOptionInput.Size = new System.Drawing.Size(332, 120);
this.pnlDevOptionInput.TabIndex = 7;
//
// cbxUseSaturation
//
this.cbxUseSaturation.AutoSize = true;
this.cbxUseSaturation.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cbxUseSaturation.Location = new System.Drawing.Point(13, 76);
this.cbxUseSaturation.Name = "cbxUseSaturation";
this.cbxUseSaturation.Size = new System.Drawing.Size(84, 17);
this.cbxUseSaturation.TabIndex = 57;
this.cbxUseSaturation.Text = "Saturation";
this.cbxUseSaturation.UseVisualStyleBackColor = true;
this.cbxUseSaturation.CheckedChanged += new System.EventHandler(this.cbxUseSaturation_CheckedChanged);
//
// cbxUseDeadzone
//
this.cbxUseDeadzone.AutoSize = true;
this.cbxUseDeadzone.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cbxUseDeadzone.Location = new System.Drawing.Point(13, 25);
this.cbxUseDeadzone.Name = "cbxUseDeadzone";
this.cbxUseDeadzone.Size = new System.Drawing.Size(83, 17);
this.cbxUseDeadzone.TabIndex = 56;
this.cbxUseDeadzone.Text = "Deadzone";
this.cbxUseDeadzone.UseVisualStyleBackColor = true;
this.cbxUseDeadzone.CheckedChanged += new System.EventHandler(this.cbxUseDeadzone_CheckedChanged);
//
// panel3
//
this.panel3.BackColor = System.Drawing.Color.Gainsboro;
this.panel3.Controls.Add(this.lblLiveOutSaturation);
this.panel3.Controls.Add(this.tbSaturation);
this.panel3.Controls.Add(this.tbDeadzone);
this.panel3.Controls.Add(this.lblLiveOutDeadzone);
this.panel3.Location = new System.Drawing.Point(103, 5);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(220, 109);
this.panel3.TabIndex = 55;
//
// lblLiveOutSaturation
//
this.lblLiveOutSaturation.AutoSize = true;
this.lblLiveOutSaturation.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblLiveOutSaturation.Location = new System.Drawing.Point(180, 71);
this.lblLiveOutSaturation.Name = "lblLiveOutSaturation";
this.lblLiveOutSaturation.Size = new System.Drawing.Size(34, 15);
this.lblLiveOutSaturation.TabIndex = 15;
this.lblLiveOutSaturation.Text = "0.000";
//
// tbSaturation
//
this.tbSaturation.Location = new System.Drawing.Point(9, 58);
this.tbSaturation.Maximum = 40;
this.tbSaturation.Name = "tbSaturation";
this.tbSaturation.Size = new System.Drawing.Size(165, 45);
this.tbSaturation.TabIndex = 14;
this.tbSaturation.TickFrequency = 5;
this.tbSaturation.TickStyle = System.Windows.Forms.TickStyle.Both;
this.tbSaturation.ValueChanged += new System.EventHandler(this.tbSlider_ValueChanged);
//
// tbDeadzone
//
this.tbDeadzone.Location = new System.Drawing.Point(9, 7);
this.tbDeadzone.Maximum = 40;
this.tbDeadzone.Name = "tbDeadzone";
this.tbDeadzone.Size = new System.Drawing.Size(165, 45);
this.tbDeadzone.TabIndex = 0;
this.tbDeadzone.TickFrequency = 5;
this.tbDeadzone.TickStyle = System.Windows.Forms.TickStyle.Both;
this.tbDeadzone.ValueChanged += new System.EventHandler(this.tbSlider_ValueChanged);
//
// lblLiveOutDeadzone
//
this.lblLiveOutDeadzone.AutoSize = true;
this.lblLiveOutDeadzone.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblLiveOutDeadzone.Location = new System.Drawing.Point(180, 20);
this.lblLiveOutDeadzone.Name = "lblLiveOutDeadzone";
this.lblLiveOutDeadzone.Size = new System.Drawing.Size(34, 15);
this.lblLiveOutDeadzone.TabIndex = 13;
this.lblLiveOutDeadzone.Text = "0.000";
//
// pnlPreview
//
this.pnlPreview.Controls.Add(this.btDebugStop);
this.pnlPreview.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlPreview.Location = new System.Drawing.Point(3, 670);
this.pnlPreview.Name = "pnlPreview";
this.pnlPreview.Size = new System.Drawing.Size(664, 46);
this.pnlPreview.TabIndex = 8;
//
// btDebugStop
//
this.btDebugStop.Location = new System.Drawing.Point(233, 3);
this.btDebugStop.Name = "btDebugStop";
this.btDebugStop.Size = new System.Drawing.Size(134, 27);
this.btDebugStop.TabIndex = 2;
this.btDebugStop.Text = "Debug Stop only";
this.btDebugStop.UseVisualStyleBackColor = true;
this.btDebugStop.Visible = false;
this.btDebugStop.Click += new System.EventHandler(this.button2_Click);
//
// panel4
//
this.panel4.AutoSize = true;
this.panel4.Controls.Add(this.btExit);
this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel4.Location = new System.Drawing.Point(673, 670);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(332, 46);
this.panel4.TabIndex = 9;
//
// btExit
//
this.btExit.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btExit.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btExit.Location = new System.Drawing.Point(193, 8);
this.btExit.Name = "btExit";
this.btExit.Size = new System.Drawing.Size(136, 32);
this.btExit.TabIndex = 0;
this.btExit.Text = "Done";
this.btExit.UseVisualStyleBackColor = true;
this.btExit.Click += new System.EventHandler(this.btExit_Click);
//
// cobDevices
//
this.cobDevices.DropDownWidth = 220;
this.cobDevices.FormattingEnabled = true;
this.cobDevices.Location = new System.Drawing.Point(103, 482);
this.cobDevices.Name = "cobDevices";
this.cobDevices.Size = new System.Drawing.Size(220, 21);
this.cobDevices.TabIndex = 55;
this.cobDevices.SelectedIndexChanged += new System.EventHandler(this.cobDevices_SelectedIndexChanged);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(10, 485);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(44, 13);
this.label1.TabIndex = 56;
this.label1.Text = "Device:";
//
// FormOptions
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1027, 737);
this.Controls.Add(this.tableLayoutPanel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FormOptions";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "SCJMapper - Options";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormOptions_FormClosing);
this.Load += new System.EventHandler(this.FormOptions_Load);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.tabC.ResumeLayout(false);
this.tabOptions.ResumeLayout(false);
this.tabDevOption.ResumeLayout(false);
this.pnlOptionInput.ResumeLayout(false);
this.pnlOptionInput.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit();
this.pnlDevOptionInput.ResumeLayout(false);
this.pnlDevOptionInput.PerformLayout();
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.tbSaturation)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tbDeadzone)).EndInit();
this.pnlPreview.ResumeLayout(false);
this.panel4.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.ListView lvOptionTree;
private System.Windows.Forms.Button btDebugStop;
private System.Windows.Forms.TabControl tabC;
private System.Windows.Forms.TabPage tabOptions;
private System.Windows.Forms.TabPage tabDevOption;
private System.Windows.Forms.ListView lvDevOptions;
private System.Windows.Forms.Panel pnlOptionInput;
private System.Windows.Forms.RadioButton rbUsePts;
private System.Windows.Forms.RadioButton rbUseExpo;
private System.Windows.Forms.RadioButton rbUseNone;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.RadioButton rbLivePtExponent;
private System.Windows.Forms.Label lblLiveOutExponent;
private System.Windows.Forms.Label lblLiveIn1;
private System.Windows.Forms.Label lblLiveOut1;
private System.Windows.Forms.CheckBox cbxLiveInvert;
private System.Windows.Forms.Label lblLiveIn2;
private System.Windows.Forms.Label lblLiveOut2;
private System.Windows.Forms.Label lblLiveIn3;
private System.Windows.Forms.RadioButton rbLivePt3;
private System.Windows.Forms.Label lblLiveOut3;
private System.Windows.Forms.RadioButton rbLivePt2;
private System.Windows.Forms.Label label32;
private System.Windows.Forms.RadioButton rbLivePt1;
private System.Windows.Forms.Label label33;
private System.Windows.Forms.Label lblGraphSaturation;
private System.Windows.Forms.Label lblGraphDeadzone;
private System.Windows.Forms.Label lblLiveNodetext;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.DataVisualization.Charting.Chart chart1;
private System.Windows.Forms.Panel pnlDevOptionInput;
private System.Windows.Forms.TrackBar tbDeadzone;
private System.Windows.Forms.Label lblLiveOutDeadzone;
private System.Windows.Forms.CheckBox cbxUseSaturation;
private System.Windows.Forms.CheckBox cbxUseDeadzone;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Label lblLiveOutSaturation;
private System.Windows.Forms.TrackBar tbSaturation;
private System.Windows.Forms.Panel pnlPreview;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.Button btExit;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox cobDevices;
}
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,408 @@
<?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>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAQEAAAAEAIAA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AAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAA////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAP//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////8=
</value>
</data>
</root>

@ -6,8 +6,9 @@ using System.Xml;
using System.IO;
using System.Xml.Linq;
using System.Windows.Forms;
using SCJMapper_V2.Joystick;
namespace SCJMapper_V2.Joystick
namespace SCJMapper_V2.Options
{
/// <summary>
/// Maintains an Options - something like:
@ -29,137 +30,73 @@ namespace SCJMapper_V2.Joystick
///
/// options are given per deviceClass and instance - it seems
/// </summary>
public class Options
public class OptionTree
{
private static readonly log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod( ).DeclaringType );
// Support only one set of independent options (string storage)
List<string> m_stringOptions = new List<string>( );
// Support only one set of TuningParameters (there is only ONE Joystick Pitch, Yaw, Roll control possible, they can be on different instances however)
DeviceTuningParameter m_tuningP = null; // pitch
DeviceTuningParameter m_tuningY = null; // yaw
DeviceTuningParameter m_tuningR = null; // roll
DeviceTuningParameter m_tuningVert = null; // strafe vertical
DeviceTuningParameter m_tuningLat = null; // strafe lateral
DeviceTuningParameter m_tuningLon = null; // strafe longitudinal
// Have to support Inverters for all possible JS Instances here - right now 4 are supported - provide them for all 12 we support..
public List<OptionsInvert> m_inverter = new List<OptionsInvert>( ); // all inverters
private List<CheckBox> m_invertCB = null; // Options owns and handles all Inversions
// bag for all tuning items - key is the option name
Dictionary<string,DeviceTuningParameter> m_tuning = new Dictionary<string, DeviceTuningParameter>();
// ctor
public Options( JoystickList jsList )
public OptionTree( )
{
m_tuningP = new DeviceTuningParameter( );
m_tuningY = new DeviceTuningParameter( );
m_tuningR = new DeviceTuningParameter( );
m_tuningVert = new DeviceTuningParameter( );
m_tuningLat = new DeviceTuningParameter( );
m_tuningLon = new DeviceTuningParameter( );
// create inverters (
for ( int i = 0; i < ( int )OptionsInvert.Inversions.I_LAST; i++ ) {
OptionsInvert inv = new OptionsInvert((OptionsInvert.Inversions)i);
m_inverter.Add( inv );
}
}
m_tuning.Add( "flight_move_pitch", new DeviceTuningParameter( "flight_move_pitch" ) );
m_tuning.Add( "flight_move_yaw", new DeviceTuningParameter( "flight_move_yaw" ) );
m_tuning.Add( "flight_move_roll", new DeviceTuningParameter( "flight_move_roll" ) );
m_tuning.Add( "flight_move_strafe_vertical", new DeviceTuningParameter( "flight_move_strafe_vertical" ) );
m_tuning.Add( "flight_move_strafe_lateral", new DeviceTuningParameter( "flight_move_strafe_lateral" ) );
m_tuning.Add( "flight_move_strafe_longitudinal", new DeviceTuningParameter( "flight_move_strafe_longitudinal" ) );
m_tuning.Add( "flight_throttle_abs", new DeviceTuningParameter( "flight_throttle_abs" ) );
m_tuning.Add( "flight_throttle_rel", new DeviceTuningParameter( "flight_throttle_rel" ) );
public int Count
{
get { return ( m_stringOptions.Count + ( ( m_tuningP != null ) ? 1 : 0 ) + ( ( m_tuningY != null ) ? 1 : 0 ) + ( ( m_tuningR != null ) ? 1 : 0 ) ); }
}
m_tuning.Add( "flight_aim_pitch", new DeviceTuningParameter( "flight_aim_pitch" ) );
m_tuning.Add( "flight_aim_yaw", new DeviceTuningParameter( "flight_aim_yaw" ) );
m_tuning.Add( "flight_view_pitch", new DeviceTuningParameter( "flight_view_pitch" ) );
m_tuning.Add( "flight_view_yaw", new DeviceTuningParameter( "flight_view_yaw" ) );
// provide access to Tuning items
m_tuning.Add( "turret_aim_pitch", new DeviceTuningParameter( "turret_aim_pitch" ) );
m_tuning.Add( "turret_aim_yaw", new DeviceTuningParameter( "turret_aim_yaw" ) );
/// <summary>
/// Returns the Pitch-Tuning item
/// </summary>
public DeviceTuningParameter TuneP
{
get { return m_tuningP; }
}
/// <summary>
/// Returns the Yaw-Tuning item
/// </summary>
public DeviceTuningParameter TuneY
{
get { return m_tuningY; }
}
/// <summary>
/// Returns the Roll-Tuning item
/// </summary>
public DeviceTuningParameter TuneR
{
get { return m_tuningR; }
}
// Gamepad specific
/* Cannot find out to what actions they relate to - left alone for now
m_tuning.Add( "fps_view_pitch", new DeviceTuningParameter( "fps_view_pitch" ) );
m_tuning.Add( "fps_view_yaw", new DeviceTuningParameter( "fps_view_yaw" ) );
/// <summary>
/// Returns the Strafe Vertical-Tuning item
/// </summary>
public DeviceTuningParameter TuneVert
{
get { return m_tuningVert; }
}
/// <summary>
/// Returns the Strafe Lateral-Tuning item
/// </summary>
public DeviceTuningParameter TuneLat
{
get { return m_tuningLat; }
}
/// <summary>
/// Returns the Strafe Longitudinal-Tuning item
/// </summary>
public DeviceTuningParameter TuneLon
{
get { return m_tuningLon; }
}
m_tuning.Add( "fps_move_lateral", new DeviceTuningParameter( "fps_move_lateral" ) );
m_tuning.Add( "fps_move_longitudinal", new DeviceTuningParameter( "fps_move_longitudinal" ) );
/// <summary>
/// Returns the inverter based on the enum given
/// </summary>
/// <param name="item">The inverter enum</param>
/// <returns>An Inverter object</returns>
public OptionsInvert Inverter( OptionsInvert.Inversions item )
{
// instance is 1.. - array is 0...
return m_inverter[( int )item];
m_tuning.Add( "mgv_view_pitch", new DeviceTuningParameter( "mgv_view_pitch" ) );
m_tuning.Add( "mgv_view_yaw", new DeviceTuningParameter( "mgv_view_yaw" ) );
*/
}
/// <summary>
/// Assign the GUI Invert Checkboxes for further handling
/// </summary>
public List<CheckBox> InvertCheckList
public int Count
{
set {
m_invertCB = value;
// assuming the ENUM sequence of Checkboxes here...
// Note: the flight Flight ones above are not handled twice i.e. are assigned below but not used
int i = 0;
foreach ( OptionsInvert inv in m_inverter ) {
inv.CBInvert = m_invertCB[i++];
}
}
get { return ( m_stringOptions.Count + 1 ); }
}
// provide access to Tuning items
/// <summary>
/// Clears all Inverters
/// Returns a tuning item for the asked option
/// </summary>
public void ResetInverter( )
/// <param name="optionName">The option to get</param>
/// <returns>A DeviceTuning item or null if it does not exist</returns>
public DeviceTuningParameter TuningItem( string optionName )
{
foreach ( OptionsInvert inv in m_inverter ) {
inv.Reset( );
}
if ( m_tuning.ContainsKey( optionName ) )
return m_tuning[optionName];
else
return null;
}
private string[] FormatXml( string xml )
{
try {
@ -191,25 +128,9 @@ namespace SCJMapper_V2.Joystick
}
// dump Tuning
r += m_tuningY.Options_toXML( );
r += m_tuningP.Options_toXML( );
r += m_tuningR.Options_toXML( );
r += m_tuningLat.Options_toXML( );
r += m_tuningVert.Options_toXML( );
r += m_tuningLon.Options_toXML( );
r += m_inverter[( int )OptionsInvert.Inversions.flight_aim_pitch].Options_toXML( );
r += m_inverter[( int )OptionsInvert.Inversions.flight_aim_yaw].Options_toXML( );
r += m_inverter[( int )OptionsInvert.Inversions.flight_view_pitch].Options_toXML( );
r += m_inverter[( int )OptionsInvert.Inversions.flight_view_yaw].Options_toXML( );
// r += m_inverter[( int )OptionsInvert.Inversions.flight_move_strafe_vertical].Options_toXML( );
// r += m_inverter[( int )OptionsInvert.Inversions.flight_move_strafe_lateral].Options_toXML( );
// r += m_inverter[( int )OptionsInvert.Inversions.flight_move_strafe_longitudinal].Options_toXML( );
r += m_inverter[( int )OptionsInvert.Inversions.flight_throttle].Options_toXML( );
foreach ( KeyValuePair<string, DeviceTuningParameter> kv in m_tuning ) {
r += kv.Value.Options_toXML( );
}
return r;
}
@ -304,34 +225,33 @@ namespace SCJMapper_V2.Joystick
while ( !reader.EOF ) {
if ( reader.Name.ToLowerInvariant( ) == "flight_move_pitch" ) {
m_tuningP.Options_fromXML( reader, type, int.Parse( instance ) );
m_tuning["flight_move_pitch"].Options_fromXML( reader, type, int.Parse( instance ) );
} else if ( reader.Name.ToLowerInvariant( ) == "flight_move_yaw" ) {
m_tuningY.Options_fromXML( reader, type, int.Parse( instance ) );
m_tuning["flight_move_yaw"].Options_fromXML( reader, type, int.Parse( instance ) );
} else if ( reader.Name.ToLowerInvariant( ) == "flight_move_roll" ) {
m_tuningR.Options_fromXML( reader, type, int.Parse( instance ) );
m_tuning["flight_move_roll"].Options_fromXML( reader, type, int.Parse( instance ) );
} else if ( reader.Name.ToLowerInvariant( ) == "flight_move_strafe_vertical" ) {
m_tuningVert.Options_fromXML( reader, type, int.Parse( instance ) );
//m_inverter[( int )OptionsInvert.Inversions.flight_move_strafe_vertical].Options_fromXML( reader, type, int.Parse( instance ) );
m_tuning["flight_move_strafe_vertical"].Options_fromXML( reader, type, int.Parse( instance ) );
} else if ( reader.Name.ToLowerInvariant( ) == "flight_move_strafe_lateral" ) {
m_tuningLat.Options_fromXML( reader, type, int.Parse( instance ) );
//m_inverter[( int )OptionsInvert.Inversions.flight_move_strafe_lateral].Options_fromXML( reader, type, int.Parse( instance ) );
m_tuning["flight_move_strafe_lateral"].Options_fromXML( reader, type, int.Parse( instance ) );
} else if ( reader.Name.ToLowerInvariant( ) == "flight_move_strafe_longitudinal" ) {
m_tuningLon.Options_fromXML( reader, type, int.Parse( instance ) );
//m_inverter[( int )OptionsInvert.Inversions.flight_move_strafe_longitudinal].Options_fromXML( reader, type, int.Parse( instance ) );
m_tuning["flight_move_strafe_longitudinal"].Options_fromXML( reader, type, int.Parse( instance ) );
} else if ( reader.Name.ToLowerInvariant( ) == "flight_throttle_abs" ) {
m_tuning["flight_throttle_abs"].Options_fromXML( reader, type, int.Parse( instance ) );
} else if ( reader.Name.ToLowerInvariant( ) == "flight_throttle_rel" ) {
m_tuning["flight_throttle_rel"].Options_fromXML( reader, type, int.Parse( instance ) );
} else if ( reader.Name.ToLowerInvariant( ) == "flight_aim_pitch" ) {
m_inverter[( int )OptionsInvert.Inversions.flight_aim_pitch].Options_fromXML( reader, type, int.Parse( instance ) );
m_tuning["flight_aim_pitch"].Options_fromXML( reader, type, int.Parse( instance ) );
} else if ( reader.Name.ToLowerInvariant( ) == "flight_aim_yaw" ) {
m_inverter[( int )OptionsInvert.Inversions.flight_aim_yaw].Options_fromXML( reader, type, int.Parse( instance ) );
m_tuning["flight_aim_yaw"].Options_fromXML( reader, type, int.Parse( instance ) );
} else if ( reader.Name.ToLowerInvariant( ) == "flight_view_pitch" ) {
m_inverter[( int )OptionsInvert.Inversions.flight_view_pitch].Options_fromXML( reader, type, int.Parse( instance ) );
m_tuning["flight_view_pitch"].Options_fromXML( reader, type, int.Parse( instance ) );
} else if ( reader.Name.ToLowerInvariant( ) == "flight_view_yaw" ) {
m_inverter[( int )OptionsInvert.Inversions.flight_view_yaw].Options_fromXML( reader, type, int.Parse( instance ) );
}
// Throttle abs/rel are treated the same and use the throttle group only
else if ( reader.Name.ToLowerInvariant( ) == "flight_throttle" ) {
m_inverter[( int )OptionsInvert.Inversions.flight_throttle].Options_fromXML( reader, type, int.Parse( instance ) );
m_tuning["flight_view_yaw"].Options_fromXML( reader, type, int.Parse( instance ) );
} else if ( reader.NodeType != XmlNodeType.EndElement ) {
//??
log.InfoFormat( "Options.fromXML: unknown node - {0} - stored as is", reader.Name );

@ -4,8 +4,10 @@ using System.Linq;
using System.Text;
using System.Xml;
using System.Windows.Forms;
using SCJMapper_V2.Joystick;
using SCJMapper_V2.Gamepad;
namespace SCJMapper_V2.Joystick
namespace SCJMapper_V2.Options
{
public class OptionsInvert
{
@ -74,7 +76,7 @@ namespace SCJMapper_V2.Joystick
m_type = m_device.DevClass;
m_devInstanceNo = ( m_device as JoystickCls ).JSAssignment;
}
else if ( Gamepad.GamepadCls.IsDeviceClass( m_device.DevClass ) ) {
else if ( GamepadCls.IsDeviceClass( m_device.DevClass ) ) {
m_type = m_device.DevClass;
m_devInstanceNo = 1; // supports ONE gamepad
}

@ -21,12 +21,17 @@ net40-full\log4net.dll<br>
<br>
DDS Skydome Images:<br>
<br>
Canyon, Highway, Shiodome, BigSight:<br>
Canyon, Highway, Shiodome, BigSight, LA Heliport:<br>
<br>
http://www.hdrlabs.com/sibl/archive.html<br>
sIBL Archive - Free HDRI sets for smart Image-Based Lighting<br>
<br>
OutThere1 made with Spacescape:<br>
Sunset<br>
https://commons.wikimedia.org/wiki/File:Afterglow_of_a_sunset.jpg<br>
This file is licensed under the Creative Commons Attribution 2.0 Generic license.<br>
At Toyomi fishermen's wharf, Tokyo.<br>
Author: Author Masato OHTA<br>
<br>
OutThere1 and 3 made with Spacescape:<br>
http://alexcpeterson.com/spacescape<br>
<br>

@ -121,11 +121,19 @@
</ItemGroup>
<ItemGroup>
<Compile Include="actions\ActionCommandCls.cs" />
<Compile Include="actions\ActionTreeEventArgs.cs" />
<Compile Include="actions\ActionTreeInputNode.cs" />
<Compile Include="actions\ActionTreeNode.cs" />
<Compile Include="appConfiguration.cs" />
<Compile Include="AppSettings.cs" />
<Compile Include="DeviceCls.cs" />
<Compile Include="DeviceList.cs" />
<Compile Include="Options\FormOptions.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Options\FormOptions.Designer.cs">
<DependentUpon>FormOptions.cs</DependentUpon>
</Compile>
<Compile Include="SC\SCActionMapList.cs" />
<Compile Include="Table\DS_ActionMap.cs" />
<Compile Include="Table\DS_ActionMaps.cs">
@ -143,7 +151,7 @@
<Compile Include="Table\FormTable.Designer.cs">
<DependentUpon>FormTable.cs</DependentUpon>
</Compile>
<Compile Include="Joystick\DeviceOptionParameter.cs" />
<Compile Include="Options\DeviceOptionParameter.cs" />
<Compile Include="Gamepad\GamepadCls.cs" />
<Compile Include="Joystick\JsReassingList.cs" />
<Compile Include="Keyboard\KeyboardCls.cs" />
@ -152,7 +160,7 @@
<Compile Include="MySounds.cs" />
<Compile Include="OGL\BezierSeries.cs" />
<Compile Include="OGL\CalcBezierCurve.cs" />
<Compile Include="Joystick\DeviceTuningParameter.cs" />
<Compile Include="Options\DeviceTuningParameter.cs" />
<Compile Include="OGL\CubicSpline.cs" />
<Compile Include="OGL\LoaderStatics.cs" />
<Compile Include="OGL\FormJSCalCurve.cs">
@ -161,12 +169,12 @@
<Compile Include="OGL\FormJSCalCurve.Designer.cs">
<DependentUpon>FormJSCalCurve.cs</DependentUpon>
</Compile>
<Compile Include="Joystick\Deviceoptions.cs" />
<Compile Include="Form1.cs">
<Compile Include="Options\Deviceoptions.cs" />
<Compile Include="FormMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
<Compile Include="FormMain.Designer.cs">
<DependentUpon>FormMain.cs</DependentUpon>
</Compile>
<Compile Include="Joystick\FormReassign.cs">
<SubType>Form</SubType>
@ -203,9 +211,9 @@
<Compile Include="Joystick\UC_JoyPanel.Designer.cs">
<DependentUpon>UC_JoyPanel.cs</DependentUpon>
</Compile>
<Compile Include="Joystick\Options.cs" />
<Compile Include="Options\OptionTree.cs" />
<Compile Include="OGL\LoaderDDS.cs" />
<Compile Include="Joystick\OptionsInvert.cs" />
<Compile Include="Options\OptionsInvert.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="OGL\RK4Integrator.cs" />
@ -223,10 +231,13 @@
<Compile Include="Gamepad\UC_GpadPanel.Designer.cs">
<DependentUpon>UC_GpadPanel.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
<EmbeddedResource Include="FormMain.resx">
<DependentUpon>FormMain.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Options\FormOptions.resx">
<DependentUpon>FormOptions.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Table\FormTable.resx">
<DependentUpon>FormTable.cs</DependentUpon>
</EmbeddedResource>

@ -17,7 +17,7 @@ using SCJMapper_V2.Keyboard;
using SCJMapper_V2.Mouse;
using SCJMapper_V2.Gamepad;
using SCJMapper_V2.Joystick;
using SCJMapper_V2.Options;
namespace SCJMapper_V2
{
@ -56,7 +56,7 @@ namespace SCJMapper_V2
private JoystickList m_joystickList = null;
private UICustHeader m_uiCustHeader = null;
private Options m_options = null; // options are given per deviceClass and instance - it seems
private OptionTree m_optionTree = null; // options are given per deviceClass and instance - it seems
private Deviceoptions m_deviceOptions = null;
private Modifiers m_modifiers = null;
@ -94,76 +94,19 @@ namespace SCJMapper_V2
// provide access to Tuning items of the Options obj to the owner
/// <summary>
/// Returns the X-Tuning item
/// </summary>
public DeviceTuningParameter TuningP
{
get { return m_options.TuneP; }
}
/// <summary>
/// Returns the Y-Tuning item
/// </summary>
public DeviceTuningParameter TuningY
{
get { return m_options.TuneY; }
}
/// <summary>
/// Returns the Z-Tuning item
/// </summary>
public DeviceTuningParameter TuningR
{
get { return m_options.TuneR; }
}
/// <summary>
/// Returns the StrafeLateral-Tuning item
/// </summary>
public DeviceTuningParameter TuningStrafeLateral
{
get { return m_options.TuneLat; }
}
/// <summary>
/// Returns the StrafeVertical-Tuning item
/// </summary>
public DeviceTuningParameter TuningStrafeVertical
{
get { return m_options.TuneVert; }
}
/// <summary>
/// Returns the StrafeLongitudinal-Tuning item
/// Returns the device tuning items - the OptionTree
/// </summary>
public DeviceTuningParameter TuningStrafeLongitudinal
{
get { return m_options.TuneLon; }
}
public OptionTree OptionTree { get { return m_optionTree; } }
/// <summary>
/// Returns the DeviceOptions containing the deadzones
/// </summary>
public Deviceoptions Deadzones
public Deviceoptions DeviceOptions
{
get { return m_deviceOptions; }
}
/// <summary>
/// Returns the Options item
/// </summary>
public Options Options
{
get { return m_options; }
}
/// <summary>
/// Assign the GUI Invert Checkboxes for further handling
/// </summary>
public List<CheckBox> InvertCheckList
{
set {
m_invertCB = value;
m_options.InvertCheckList = m_invertCB;
}
}
/// <summary>
/// Returns the assigned Modifiers
@ -198,8 +141,8 @@ namespace SCJMapper_V2
{
// create options objs
m_uiCustHeader = new UICustHeader( );
m_options = new Options( m_joystickList );
m_deviceOptions = new Deviceoptions( m_options );
m_optionTree = new OptionTree( );
m_deviceOptions = new Deviceoptions( m_joystickList );
m_modifiers = new Modifiers( );
}
@ -215,7 +158,7 @@ namespace SCJMapper_V2
newMaps.m_uiCustHeader = this.m_uiCustHeader;
newMaps.m_deviceOptions = this.m_deviceOptions;
newMaps.m_options = this.m_options;
newMaps.m_optionTree = this.m_optionTree;
newMaps.m_modifiers = this.m_modifiers;
for ( int i = 0; i < JoystickCls.JSnum_MAX; i++ ) {
@ -370,7 +313,7 @@ namespace SCJMapper_V2
r += m_uiCustHeader.toXML( ) + String.Format( "\n" );
// *** OPTIONS
if ( m_options.Count > 0 ) r += m_options.toXML( ) + String.Format( "\n" );
if ( m_optionTree.Count > 0 ) r += m_optionTree.toXML( ) + String.Format( "\n" );
// *** DEVICE OPTIONS
if ( m_deviceOptions.Count > 0 ) r += m_deviceOptions.toXML( ) + String.Format( "\n" );
@ -398,8 +341,6 @@ namespace SCJMapper_V2
log.Debug( "ActionMapsCls.fromXML - Entry" );
CreateNewOptions( ); // Reset those options...
m_options.InvertCheckList = m_invertCB;
m_options.ResetInverter( ); // have to reset when reading a new mapping
XmlReaderSettings settings = new XmlReaderSettings( );
settings.ConformanceLevel = ConformanceLevel.Fragment;
@ -445,7 +386,7 @@ namespace SCJMapper_V2
m_deviceOptions.fromXML( x );
} else if ( reader.Name.ToLowerInvariant( ) == "options" ) {
String x = reader.ReadOuterXml( );
m_options.fromXML( x );
m_optionTree.fromXML( x );
} else if ( reader.Name.ToLowerInvariant( ) == "modifiers" ) {
String x = reader.ReadOuterXml( );
m_modifiers.fromXML( x );

@ -12,7 +12,7 @@ using SCJMapper_V2.Keyboard;
using SCJMapper_V2.Mouse;
using SCJMapper_V2.Gamepad;
using SCJMapper_V2.Joystick;
using SCJMapper_V2.Options;
namespace SCJMapper_V2
{
@ -31,6 +31,13 @@ namespace SCJMapper_V2
static public Font FontActionActivated = null;
public event EventHandler<ActionTreeEventArgs> NodeSelectedEvent;
private void NodeSelected( string action, string ctrl)
{
NodeSelectedEvent?.Invoke( this, new ActionTreeEventArgs( action, ctrl ) );
}
public ActionMapsCls ActionMaps { get; set; } // the Action Maps and Actions
private TreeView m_MasterTree = new TreeView( ); // the master TreeView (mem only)
@ -48,28 +55,42 @@ namespace SCJMapper_V2
FontActionmap = new Font( m_ctrl.Font, FontStyle.Bold );
FontAction = new Font( m_ctrl.Font, FontStyle.Regular );
FontActionActivated = new Font( m_ctrl.Font, FontStyle.Underline );
m_ctrl.AfterSelect += M_ctrl_AfterSelect;
}
}
private Boolean m_showJoy = true;
private Boolean m_showGameP = true;
private Boolean m_showKbd = true;
private Boolean m_showMouse = true;
private Boolean m_showMappedOnly = false;
/// <summary>
/// If a node was selected, update it from the tree content
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void M_ctrl_AfterSelect( object sender, TreeViewEventArgs e )
{
NodeSelected( this.SelectedAction, this.SelectedCtrl );
}
private bool m_showJoy = true;
private bool m_showGameP = true;
private bool m_showKbd = true;
private bool m_showMouse = true;
private bool m_showMappedOnly = false;
/// <summary>
/// maintains the change status (gets reset by reloading the complete tree)
/// </summary>
public Boolean Dirty { get; set; }
public bool Dirty { get; set; }
/// <summary>
/// a comma separated list of actionmaps to ignore
/// </summary>
public String IgnoreMaps { get; set; }
public string IgnoreMaps { get; set; }
private String m_Filter = ""; // the tree content filter
private string m_Filter = ""; // the tree content filter
private JoystickList m_jsList = null;
private GamepadCls m_gamepad = null;
@ -107,7 +128,7 @@ namespace SCJMapper_V2
#region Properties
public Boolean CanAssignBinding
public bool CanAssignBinding
{
get {
if ( Ctrl.SelectedNode == null ) return false;
@ -115,7 +136,7 @@ namespace SCJMapper_V2
}
}
public Boolean CanBlendBinding
public bool CanBlendBinding
{
get {
if ( Ctrl.SelectedNode == null ) return false;
@ -123,7 +144,7 @@ namespace SCJMapper_V2
}
}
public Boolean CanClearBinding
public bool CanClearBinding
{
get {
if ( Ctrl.SelectedNode == null ) return false;
@ -132,7 +153,7 @@ namespace SCJMapper_V2
}
public Boolean CanAddBinding
public bool CanAddBinding
{
get {
if ( Ctrl.SelectedNode == null ) return false;
@ -140,7 +161,7 @@ namespace SCJMapper_V2
}
}
public Boolean CanDelBinding
public bool CanDelBinding
{
get {
if ( Ctrl.SelectedNode == null ) return false;
@ -148,7 +169,7 @@ namespace SCJMapper_V2
}
}
public Boolean IsMappedAction
public bool IsMappedAction
{
get {
if ( ( Ctrl.SelectedNode.Level == 0 ) || ( Ctrl.SelectedNode.Level > 2 ) ) return false; // not on node
@ -160,7 +181,7 @@ namespace SCJMapper_V2
}
public Boolean ShowAction( ActionCls.ActionDevice actDev, string input )
public bool ShowAction( ActionCls.ActionDevice actDev, string input )
{
if ( ActionCls.IsBlendedInput( input ) && m_showMappedOnly ) return false;
switch ( actDev ) {
@ -192,7 +213,7 @@ namespace SCJMapper_V2
// show stuff
FilterTree( );
FindAndSelectCtrlByName( matn.Name );
// jump to the latest
// jump to the latest if a new one was added
if ( Ctrl.SelectedNode.LastNode != null ) {
Ctrl.SelectedNode = Ctrl.SelectedNode.LastNode;
}
@ -229,19 +250,6 @@ namespace SCJMapper_V2
UpdateSelectedItem( "", ActionCls.ActionDevice.AD_Unknown, false );
}
/// <summary>
/// Assign the GUI Invert Checkboxes for further handling
/// </summary>
public List<CheckBox> InvertCheckList
{
set {
if ( ActionMaps != null ) ActionMaps.InvertCheckList = value; // just propagate if possible
else {
log.Error( "ActionTree-InvertCheckList: Program error - ActionMaps not yet created" );
}
}
}
/// <summary>
/// Gets the JS device that is used for one of the Inversion Items supported
@ -251,9 +259,9 @@ namespace SCJMapper_V2
private DeviceCls GetActionInstance( OptionsInvert.Inversions item )
{
// must get the jsN information used for Options
String nodeText = "";
string nodeText = "";
nodeText = FindAction( OptionsInvert.MappedActions[( int )item].Map, OptionsInvert.MappedActions[( int )item].Action );
if ( !String.IsNullOrWhiteSpace( nodeText ) ) {
if ( !string.IsNullOrWhiteSpace( nodeText ) ) {
DeviceCls dev = m_jsList.Find_jsN( JoystickCls.JSNum( ActionTreeNode.CommandFromNodeText( nodeText ) ) );
if ( dev != null ) return dev;
else {
@ -266,27 +274,14 @@ namespace SCJMapper_V2
return null;
}
/// <summary>
/// Collects and forwards the device information (instances) to the consuming invert Options
/// </summary>
private void UpdateDeviceInformation( )
{
// must get the jsN information used for Options Inverters
for ( int item = 0; item < ( int )OptionsInvert.Inversions.I_LAST; item++ ) {
ActionMaps.Options.Inverter( ( OptionsInvert.Inversions )item ).GameDevice = GetActionInstance( ( OptionsInvert.Inversions )item );
}
}
/// <summary>
/// Dumps the actions to an XML String
/// Dumps the actions to an XML string
/// </summary>
/// <returns>A string containing the XML</returns>
public String toXML( String fileName )
public string toXML( string fileName )
{
if ( ActionMaps != null ) {
// must update the devices and instances for inversion before dumping the XML
UpdateDeviceInformation( );
return ActionMaps.toXML( fileName ); // just propagate if possible
} else {
log.Error( "ActionTree-toXML: Program error - ActionMaps not yet created" );
@ -363,9 +358,9 @@ namespace SCJMapper_V2
if ( topNode == null ) topNode = tnMap;
// have to search nodes of nodes
Boolean allHidden = true;
bool allHidden = true;
foreach ( ActionTreeNode stn in tn.Nodes ) {
if ( ( stn.Tag != null ) && ( ( Boolean )stn.Tag == true ) ) {
if ( ( stn.Tag != null ) && ( ( bool )stn.Tag == true ) ) {
; // don't create it i.e hide it - though you cannot hide TreeViewNodes at all...
} else {
ActionTreeNode tnAction = new ActionTreeNode( stn ); tnMap.Nodes.Add( tnAction ); // copy level 1 nodes
@ -382,6 +377,7 @@ namespace SCJMapper_V2
if ( topNode != null ) Ctrl.TopNode = topNode; // set view to topnode
Ctrl.EndUpdate( ); // enable GUI update
NodeSelected( this.SelectedAction, this.SelectedCtrl );
}
@ -391,7 +387,7 @@ namespace SCJMapper_V2
/// </summary>
private void FilterTree( )
{
Boolean hidden = !String.IsNullOrEmpty( m_Filter ); // hide only if there is a find string
bool hidden = !string.IsNullOrEmpty( m_Filter ); // hide only if there is a find string
foreach ( ActionTreeNode tn in m_MasterTree.Nodes ) {
// have to search nodes of nodes
foreach ( ActionTreeNode stn in tn.Nodes ) {
@ -412,7 +408,7 @@ namespace SCJMapper_V2
/// Filters entries with given criteria
/// </summary>
/// <param name="filter">The text snip to filter</param>
public void FilterTree( String filter )
public void FilterTree( string filter )
{
m_Filter = filter;
FilterTree( );
@ -425,7 +421,7 @@ namespace SCJMapper_V2
/// </summary>
/// <param name="defaultProfileName">The name of the profile to load (w extension)</param>
/// <param name="applyDefaults">True if default mappings should be carried on</param>
public void LoadProfileTree( String defaultProfileName, Boolean applyDefaults )
public void LoadProfileTree( string defaultProfileName, bool applyDefaults )
{
log.Debug( "LoadProfileTree - Entry" );
@ -454,9 +450,9 @@ namespace SCJMapper_V2
// so all actions are shown in the ActionTreeNode and no ActionTreeNode childs must be created here
// however we create the ActionCommand for each entry that is supported - even if it is not mapped (input= "")
using ( TextReader sr = txReader ) {
String buf = sr.ReadLine( );
while ( !String.IsNullOrEmpty( buf ) ) {
String[] elem = buf.Split( new char[] { ';', ',' }, StringSplitOptions.None );
string buf = sr.ReadLine( );
while ( !string.IsNullOrEmpty( buf ) ) {
string[] elem = buf.Split( new char[] { ';', ',' }, StringSplitOptions.None );
if ( elem.Length > 1 ) {
if ( !IgnoreMaps.Contains( "," + elem[0] + "," ) ) {
// must have 2 elements min
@ -464,17 +460,17 @@ namespace SCJMapper_V2
acm = new ActionMapCls( ); acm.name = elem[0]; // get actionmap name
// process items
for ( int ei = 1; ei < elem.Length; ei += 4 ) { // step 2 - action;defaultBinding;defaultActivationMode;defMultiTap come in as quadrupples
if ( !String.IsNullOrEmpty( elem[ei] ) ) {
if ( !string.IsNullOrEmpty( elem[ei] ) ) {
// default assignments
String action = elem[ei].Substring( 1 );
String defBinding = elem[ei + 1];
string action = elem[ei].Substring( 1 );
string defBinding = elem[ei + 1];
string defActivationModeName = elem[ei + 2];
int defMultiTap = int.Parse( elem[ei + 3] );
// need to create a ActivationMode here
ActivationMode defActivationMode = new ActivationMode( defActivationModeName, defMultiTap );
String devID = elem[ei].Substring( 0, 1 );
String device = ActionCls.DeviceClassFromTag( devID );
string devID = elem[ei].Substring( 0, 1 );
string device = ActionCls.DeviceClassFromTag( devID );
// visual item for the action
cn = new ActionTreeNode( "UNDEF" ); cn.Name = elem[ei]; cn.Action = action; cn.BackColor = Color.White; // name with the key it to find it..
@ -507,7 +503,7 @@ namespace SCJMapper_V2
} else if ( ac.actionDevice == ActionCls.ActionDevice.AD_Gamepad ) {
acc.DevID = GamepadCls.DeviceID;
if ( applyDefaults ) {
if ( !String.IsNullOrEmpty( ac.defBinding ) ) {
if ( !string.IsNullOrEmpty( ac.defBinding ) ) {
acc.DevInput = ac.defBinding;
cn.Command = ac.defBinding; cn.BackColor = GamepadCls.XiColor( );
}
@ -515,7 +511,7 @@ namespace SCJMapper_V2
} else if ( ac.actionDevice == ActionCls.ActionDevice.AD_Keyboard ) {
acc.DevID = KeyboardCls.DeviceID;
if ( applyDefaults ) {
if ( !String.IsNullOrEmpty( ac.defBinding ) ) {
if ( !string.IsNullOrEmpty( ac.defBinding ) ) {
acc.DevInput = ac.defBinding;
cn.Command = ac.defBinding; cn.BackColor = KeyboardCls.KbdColor( );
}
@ -523,7 +519,7 @@ namespace SCJMapper_V2
} else if ( ac.actionDevice == ActionCls.ActionDevice.AD_Mouse ) { // 20151220BM: add mouse device (from AC 2.0 defaultProfile usage)
acc.DevID = MouseCls.DeviceID;
if ( applyDefaults ) {
if ( !String.IsNullOrEmpty( ac.defBinding ) ) {
if ( !string.IsNullOrEmpty( ac.defBinding ) ) {
acc.DevInput = ac.defBinding;
cn.Command = ac.defBinding; cn.BackColor = MouseCls.MouseColor( );
}
@ -617,7 +613,9 @@ namespace SCJMapper_V2
acc.ActivationMode = ActivationModes.Instance.ActivationModeByName( newActivationModeName );
}
atn.UpdateAction( acc ); UpdateMasterNode( atn );
NodeSelected( this.SelectedAction, this.SelectedCtrl ); // virtual event - as the selection does not change
Dirty = true;
} else if ( Ctrl.SelectedNode.Level == 2 ) {
// this is a child of an action with further commands
ActionTreeNode patn = ( Ctrl.SelectedNode.Parent as ActionTreeNode ); // the parent treenode from a level 2
@ -633,6 +631,7 @@ namespace SCJMapper_V2
acc.ActivationMode = ActivationModes.Instance.ActivationModeByName( newActivationModeName );
}
atn.UpdateAction( acc ); UpdateMasterNode( atn );
NodeSelected( this.SelectedAction, this.SelectedCtrl ); // virtual event - as the selection does not change
Dirty = true;
}
}
@ -644,7 +643,7 @@ namespace SCJMapper_V2
/// First apply to the GUI tree where the selection happend then copy it over to master tree
/// </summary>
/// <param name="input">The new Text property</param>
public Boolean UpdateSelectedItem( String input, ActionCls.ActionDevice inKind, Boolean checkKind )
public bool UpdateSelectedItem( string input, ActionCls.ActionDevice inKind, bool checkKind )
{
if ( Ctrl.SelectedNode == null ) return false; // ERROR exit
if ( ( Ctrl.SelectedNode.Level == 0 ) || ( Ctrl.SelectedNode.Level > 2 ) ) return false; // ERROR exit
@ -662,7 +661,9 @@ namespace SCJMapper_V2
// have it - continue
ac.UpdateCommandFromInput( ActionCls.DevInput( input, inKind ), acc.NodeIndex + 1 );
atn.UpdateAction( acc ); UpdateMasterNode( atn );
NodeSelected( this.SelectedAction, this.SelectedCtrl ); // virtual event - as the selection does not change
Dirty = true;
} else if ( Ctrl.SelectedNode.Level == 2 ) {
// this is a child of an action with further commands
ActionTreeNode patn = ( Ctrl.SelectedNode.Parent as ActionTreeNode ); // the parent treenode from a level 2
@ -679,6 +680,7 @@ namespace SCJMapper_V2
// have it - continue
ac.UpdateCommandFromInput( ActionCls.DevInput( input, inKind ), acc.NodeIndex + 1 );
atn.UpdateAction( acc ); UpdateMasterNode( atn );
NodeSelected( this.SelectedAction, this.SelectedCtrl ); // virtual event - as the selection does not change
Dirty = true;
}
return true;
@ -691,7 +693,7 @@ namespace SCJMapper_V2
/// <param name="actionKey">The action</param>
/// <param name="devInput">The input</param>
/// <returns>An actionCommand or null if not found</returns>
private ActionCommandCls FindActionInputObject( String actionMap, String actionKey, String devInput )
private ActionCommandCls FindActionInputObject( string actionMap, string actionKey, string devInput )
{
//log.Debug( "FindActionInputObject - Entry" );
// Apply the input to the ActionTree
@ -713,7 +715,7 @@ namespace SCJMapper_V2
/// <param name="actionKey">The action</param>
/// <param name="input">The input</param>
/// <returns>An actionCommand or null if not found</returns>
private ActionCommandCls FindActionInputObject( ActionTree tree, String actionMap, String actionKey, int index )
private ActionCommandCls FindActionInputObject( ActionTree tree, string actionMap, string actionKey, int index )
{
//log.Debug( "FindActionInputObject - Entry" );
// Apply the input to the ActionTree
@ -737,7 +739,7 @@ namespace SCJMapper_V2
/// <param name="actionMap">The actionmap name</param>
/// <param name="action">The action</param>
/// <returns>An action or null if not found</returns>
private ActionCls FindActionObject( String actionMap, String action )
private ActionCls FindActionObject( string actionMap, string action )
{
//log.Debug( "FindActionObject - Entry" );
// Apply the input to the ActionTree
@ -759,7 +761,7 @@ namespace SCJMapper_V2
/// <param name="showGamepad">True to show Gamepad actions</param>
/// <param name="showKeyboard">True to show Keyboard actions</param>
/// <param name="showMappedOnly">True to show mapped actions only </param>
public void DefineShowOptions( Boolean showJoystick, Boolean showGamepad, Boolean showKeyboard, Boolean showMouse, Boolean showMappedOnly )
public void DefineShowOptions( bool showJoystick, bool showGamepad, bool showKeyboard, bool showMouse, bool showMappedOnly )
{
m_showJoy = showJoystick;
m_showGameP = showGamepad;
@ -784,7 +786,7 @@ namespace SCJMapper_V2
// find the item to reload into the treeview
foreach ( ActionCls ac in acm ) {
ActionTreeNode matn = ( ActionTreeNode )mtn.Nodes[ac.key]; // get the action node
Boolean first=true;
bool first=true;
// refresh commands
foreach ( ActionCommandCls acc in ac.inputList ) {
try {
@ -804,6 +806,7 @@ namespace SCJMapper_V2
} catch {
; // key not found
}
NodeSelected( this.SelectedAction, this.SelectedCtrl );
Dirty = true;
} // foreach
}
@ -822,16 +825,17 @@ namespace SCJMapper_V2
/// this method is applied to the GUI TreeView only
/// </summary>
/// <param name="m_MasterTree">The string to find</param>
public void FindAndSelectActionKey( String actionmap, String actionKey, int nodeIndex )
public void FindAndSelectActionKey( string actionmap, string actionKey, int nodeIndex )
{
log.Debug( "FindAndSelectActionKey - Entry" );
foreach ( ActionTreeNode tn in Ctrl.Nodes ) {
if ( String.IsNullOrEmpty( actionmap ) || ( tn.Text == actionmap ) ) {
if ( string.IsNullOrEmpty( actionmap ) || ( tn.Text == actionmap ) ) {
// have to search nodes of nodes
foreach ( ActionTreeNode stn in tn.Nodes ) {
if ( stn.Name == actionKey ) {
if ( nodeIndex < 0 ) {
if ( Ctrl.SelectedNode == stn ) NodeSelected( this.SelectedAction, this.SelectedCtrl );
Ctrl.SelectedNode = stn;
Ctrl.SelectedNode.EnsureVisible( );
} else {
@ -839,6 +843,7 @@ namespace SCJMapper_V2
int ni = 0;
foreach ( ActionTreeInputNode sstn in stn.Nodes ) {
if ( ni++ == nodeIndex ) {
if ( Ctrl.SelectedNode == sstn ) NodeSelected( this.SelectedAction, this.SelectedCtrl );
Ctrl.SelectedNode = sstn;
Ctrl.SelectedNode.EnsureVisible( );
return; // exit all loops
@ -858,7 +863,7 @@ namespace SCJMapper_V2
/// this method is applied to the GUI TreeView only
/// </summary>
/// <param name="m_MasterTree">The string to find</param>
public void FindAndSelectCtrl( String ctrl )
public void FindAndSelectCtrl( string ctrl )
{
log.Debug( "FindAndSelectCtrl - Entry" );
@ -866,6 +871,7 @@ namespace SCJMapper_V2
// have to search nodes of nodes
foreach ( ActionTreeNode stn in tn.Nodes ) {
if ( stn.Text.Contains( ctrl ) ) {
if ( Ctrl.SelectedNode == stn ) NodeSelected( this.SelectedAction, this.SelectedCtrl );
Ctrl.SelectedNode = stn;
Ctrl.SelectedNode.EnsureVisible( );
return; // exit all loops
@ -873,6 +879,7 @@ namespace SCJMapper_V2
// have to search nodes of nodes
foreach ( ActionTreeInputNode sstn in stn.Nodes ) {
if ( sstn.Text.Contains( ctrl ) ) {
if ( Ctrl.SelectedNode == sstn ) NodeSelected( this.SelectedAction, this.SelectedCtrl );
Ctrl.SelectedNode = sstn;
Ctrl.SelectedNode.EnsureVisible( );
return; // exit all loops
@ -888,7 +895,7 @@ namespace SCJMapper_V2
/// this method is applied to the GUI TreeView only
/// </summary>
/// <param name="m_MasterTree">The string to find</param>
public void FindAndSelectCtrlByName( String ctrlName )
public void FindAndSelectCtrlByName( string ctrlName )
{
log.Debug( "FindAndSelectCtrlByName - Entry" );
@ -896,6 +903,7 @@ namespace SCJMapper_V2
// have to search nodes of nodes
foreach ( ActionTreeNode stn in tn.Nodes ) {
if ( stn.Name == ctrlName ) {
if ( Ctrl.SelectedNode == stn ) NodeSelected( this.SelectedAction, this.SelectedCtrl );
Ctrl.SelectedNode = stn;
Ctrl.SelectedNode.EnsureVisible( );
return; // exit all loops
@ -903,6 +911,7 @@ namespace SCJMapper_V2
// have to search nodes of nodes
foreach ( ActionTreeInputNode sstn in stn.Nodes ) {
if ( sstn.Name == ctrlName ) {
if ( Ctrl.SelectedNode == sstn ) NodeSelected( this.SelectedAction, this.SelectedCtrl );
Ctrl.SelectedNode = sstn;
Ctrl.SelectedNode.EnsureVisible( );
return; // exit all loops
@ -918,12 +927,12 @@ namespace SCJMapper_V2
/// </summary>
/// <param name="actionmap">The actionmap to find the string</param>
/// <param name="text">The string to find</param>
public String FindActionKey( String actionmap, String actionKey )
public string FindActionKey( string actionmap, string actionKey )
{
log.Debug( "FindActionKey - Entry" );
foreach ( ActionTreeNode tn in Ctrl.Nodes ) {
if ( String.IsNullOrEmpty( actionmap ) || ( tn.Text == actionmap ) ) {
if ( string.IsNullOrEmpty( actionmap ) || ( tn.Text == actionmap ) ) {
// have to search nodes of nodes
foreach ( ActionTreeNode stn in tn.Nodes ) {
if ( stn.Name == actionKey ) {
@ -940,12 +949,12 @@ namespace SCJMapper_V2
/// </summary>
/// <param name="actionmap">The actionmap to find the string</param>
/// <param name="text">The string to find</param>
public String FindAction( String actionmap, String action )
public string FindAction( string actionmap, string action )
{
log.Debug( "FindAction - Entry" );
foreach ( ActionTreeNode tn in Ctrl.Nodes ) {
if ( String.IsNullOrEmpty( actionmap ) || ( tn.Text == actionmap ) ) {
if ( string.IsNullOrEmpty( actionmap ) || ( tn.Text == actionmap ) ) {
// have to search nodes of nodes
foreach ( ActionTreeNode stn in tn.Nodes ) {
if ( stn.Action == action ) {
@ -961,7 +970,7 @@ namespace SCJMapper_V2
/// Find a control that contains the Action
/// </summary>
/// <param name="text">The string to find</param>
public String FindAction( String action )
public string FindAction( string action )
{
return FindAction( "", action );
}
@ -972,12 +981,12 @@ namespace SCJMapper_V2
/// </summary>
/// <param name="actionmap">The actionmap to find the string</param>
/// <param name="text">The string to find</param>
public String FindCommand( String actionmap, String command )
public string FindCommand( string actionmap, string command )
{
log.Debug( "FindCommand - Entry" );
foreach ( ActionTreeNode tn in Ctrl.Nodes ) {
if ( String.IsNullOrEmpty( actionmap ) || ( tn.Text == actionmap ) ) {
if ( string.IsNullOrEmpty( actionmap ) || ( tn.Text == actionmap ) ) {
// have to search nodes of nodes
foreach ( ActionTreeNode stn in tn.Nodes ) {
foreach ( ActionTreeInputNode istn in stn.Nodes ) {
@ -995,7 +1004,7 @@ namespace SCJMapper_V2
/// Find a control that contains the Command
/// </summary>
/// <param name="text">The string to find</param>
public String FindCommand( String command )
public string FindCommand( string command )
{
return FindCommand( "", command );
}
@ -1006,12 +1015,12 @@ namespace SCJMapper_V2
/// </summary>
/// <param name="actionmap">The actionmap to find the string</param>
/// <param name="text">The string to find</param>
public String FindText( String actionmap, String text )
public string FindText( string actionmap, string text )
{
log.Debug( "FindText - Entry" );
foreach ( ActionTreeNode tn in m_MasterTree.Nodes ) {
if ( String.IsNullOrEmpty( actionmap ) || ( tn.Text == actionmap ) ) {
if ( string.IsNullOrEmpty( actionmap ) || ( tn.Text == actionmap ) ) {
// have to search nodes of nodes
foreach ( ActionTreeNode stn in tn.Nodes ) {
if ( stn.Text.Contains( text ) ) {
@ -1027,7 +1036,7 @@ namespace SCJMapper_V2
/// Find a control that contains the Text
/// </summary>
/// <param name="text">The string to find</param>
public String FindText( String text )
public string FindText( string text )
{
return FindText( "", text );
}
@ -1036,7 +1045,7 @@ namespace SCJMapper_V2
/// <summary>
/// Returns the Action name of the selected item
/// </summary>
public String SelectedAction
public string SelectedAction
{
get {
if ( Ctrl.SelectedNode == null ) return "";
@ -1053,7 +1062,7 @@ namespace SCJMapper_V2
/// <summary>
/// Returns the ActionID (DS_ActionMap) of the selected item
/// </summary>
public String SelectedActionID
public string SelectedActionID
{
get {
if ( Ctrl.SelectedNode == null ) return "";
@ -1088,6 +1097,22 @@ namespace SCJMapper_V2
}
}
/// <summary>
/// Returns the dev control of the selected item
/// </summary>
public string SelectedCtrl
{
get {
if ( Ctrl.SelectedNode == null ) return "";
if ( Ctrl.SelectedNode.Level == 1 ) {
ActionTreeNode matn = FindMasterAction( ( ActionTreeNode )Ctrl.SelectedNode );
return ActionTreeNode.CommandFromNodeText( matn.Text );
} else if ( Ctrl.SelectedNode.Level == 2 ) {
ActionTreeNode matn = FindMasterAction( ( ActionTreeNode )Ctrl.SelectedNode.Parent ); // the parent treenode
return ActionTreeNode.CommandFromNodeText( matn.Text );
} else return "";
}
}
/// <summary>
/// Update from all edits in the dataset DS_ActionMaps
@ -1121,6 +1146,7 @@ namespace SCJMapper_V2
if ( countChanges > 0 ) {
dsa.AcceptChanges( );
NodeSelected( this.SelectedAction, this.SelectedCtrl );
nTree.Dirty = true;
return nTree;
} else {
@ -1135,39 +1161,39 @@ namespace SCJMapper_V2
/// Reports a summary list of the mapped items
/// </summary>
/// <returns></returns>
public String ReportActions( )
public string ReportActions( )
{
log.Debug( "FindCtrl - ReportActions" );
String repList = "";
string repList = "";
// JS assignments
for ( int i = 0; i < JoystickCls.JSnum_MAX; i++ ) {
if ( !String.IsNullOrEmpty( ActionMaps.jsN[i] ) ) repList += String.Format( "** js{0} = {1}\n", i + 1, ActionMaps.jsN[i] );
if ( !string.IsNullOrEmpty( ActionMaps.jsN[i] ) ) repList += string.Format( "** js{0} = {1}\n", i + 1, ActionMaps.jsN[i] );
}
// now the mapped actions
const int padAction = 42;
const int padDevice = 4;
const int padInput = 25;
repList += String.Format( "\n" );
repList += String.Format( " {0}+- {1} _ {2}#-[{4}] {3}\n\n", "Action".PadRight( padAction ), "Dev".PadRight( padDevice ), "Binding".PadRight( padInput ), "Activation", "T" ); // col description line
repList += string.Format( "\n" );
repList += string.Format( " {0}+- {1} _ {2}#-[{4}] {3}\n\n", "Action".PadRight( padAction ), "Dev".PadRight( padDevice ), "Binding".PadRight( padInput ), "Activation", "T" ); // col description line
foreach ( ActionMapCls acm in ActionMaps ) {
String rep = String.Format( "*** {0}\n", acm.name );
string rep = string.Format( "*** {0}\n", acm.name );
repList += rep;
foreach ( ActionCls ac in acm ) {
foreach ( ActionCommandCls acc in ac.inputList ) {
if ( ShowAction( ac.actionDevice, acc.Input ) ) {
if ( !String.IsNullOrEmpty( acc.Input ) /* && !( acc.Input == DeviceCls.BlendedInput )*/ ) {
if ( !string.IsNullOrEmpty( acc.Input ) /* && !( acc.Input == DeviceCls.BlendedInput )*/ ) {
if ( acc.DevInput == ac.defBinding ) {
rep = String.Format( " {0} . {1} _ {2}", ac.name.PadRight( padAction ), acc.DevID.PadRight( padDevice ), acc.Input.PadRight( padInput ) );
rep = string.Format( " {0} . {1} _ {2}", ac.name.PadRight( padAction ), acc.DevID.PadRight( padDevice ), acc.Input.PadRight( padInput ) );
} else {
rep = String.Format( " {0} + {1} _ {2}", ac.name.PadRight( padAction ), acc.DevID.PadRight( padDevice ), acc.Input.PadRight( padInput ) ); // my binding
rep = string.Format( " {0} + {1} _ {2}", ac.name.PadRight( padAction ), acc.DevID.PadRight( padDevice ), acc.Input.PadRight( padInput ) ); // my binding
}
if ( acc.ActivationMode == ActivationMode.Default ) {
rep += String.Format( " . [{1}] {0}\n", ac.defActivationMode.Name, ac.defActivationMode.MultiTap );
rep += string.Format( " . [{1}] {0}\n", ac.defActivationMode.Name, ac.defActivationMode.MultiTap );
} else {
rep += String.Format( " # [{1}] {0}\n", acc.ActivationMode.Name, acc.ActivationMode.MultiTap );
rep += string.Format( " # [{1}] {0}\n", acc.ActivationMode.Name, acc.ActivationMode.MultiTap );
}
repList += rep;
@ -1175,7 +1201,7 @@ namespace SCJMapper_V2
}
}
}
repList += String.Format( "\n" ); // actionmap spacer
repList += string.Format( "\n" ); // actionmap spacer
}
return repList;
}
@ -1185,14 +1211,14 @@ namespace SCJMapper_V2
/// Reports a summary list of the mapped items
/// </summary>
/// <returns></returns>
public String ReportActionsCSV( bool listModifiers )
public string ReportActionsCSV( bool listModifiers )
{
log.Debug( "FindCtrl - ReportActions2" );
String repList = "";
string repList = "";
// JS assignments
for ( int i = 0; i < JoystickCls.JSnum_MAX; i++ ) {
if ( !String.IsNullOrEmpty( ActionMaps.jsN[i] ) ) repList += String.Format( "** js{0} = {1}\n", i + 1, ActionMaps.jsN[i] );
if ( !string.IsNullOrEmpty( ActionMaps.jsN[i] ) ) repList += string.Format( "** js{0} = {1}\n", i + 1, ActionMaps.jsN[i] );
}
// now the mapped actions
@ -1229,7 +1255,7 @@ namespace SCJMapper_V2
if ( !string.IsNullOrEmpty( action ) ) {
// compose one action
rep += string.Format( "{0};{1};{2};{3};{4};{5};{6}\n", kbA, moA, xbA, jsA[0], jsA[1], jsA[2], jsA[3] ); // should be one line now
repList += String.Format( "{0}", rep ); // add to list
repList += string.Format( "{0}", rep ); // add to list
}
// action changed - restart collection
action = ac.name;
@ -1248,7 +1274,7 @@ namespace SCJMapper_V2
foreach ( ActionCommandCls acc in ac.inputList ) {
// this is for add binds
if ( ShowAction( ac.actionDevice, acc.Input ) ) {
if ( !String.IsNullOrEmpty( acc.Input ) ) {
if ( !string.IsNullOrEmpty( acc.Input ) ) {
// set modified - note: don't add trailing semicolons as the are applied in the output formatting
string aTag = "modified"; //default or modified
string aMode = string.Format( "modified;{0};{1}", ac.defActivationMode.Name, ac.defActivationMode.MultiTap );
@ -1284,7 +1310,7 @@ namespace SCJMapper_V2
// add the last one
// compose one action
rep += string.Format( "{0};{1};{2};{3};{4};{5};{6}\n", kbA, moA, xbA, jsA[0], jsA[1], jsA[2], jsA[3] ); // should be one line now
repList += String.Format( "{0}", rep ); // add to list
repList += string.Format( "{0}", rep ); // add to list
return repList;
}

@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SCJMapper_V2
{
/// <summary>
/// Event class to automate selection,
/// returns the selected items in the ActionTree
/// </summary>
public class ActionTreeEventArgs : EventArgs
{
public string SelectedAction { get; set; }
public string SelectedCtrl { get; set; }
public ActionTreeEventArgs(string action, string ctrl )
{
SelectedAction = action;
SelectedCtrl = ctrl;
}
}
}
Loading…
Cancel
Save