V 2.47 - BETA Build 82

- add Mode to create SCJoyServer Command items from action tree
- add Saving ActionTree to a json file in <User>\Documents\SCJM\file.scjn.json for other tools (easier than XML)
- updated Rework for Device Monitor
- fix Ignore buttons from Settings not properly handled
pull/104/head
bm98 4 years ago
parent ce1463d0db
commit d728596592

@ -140,6 +140,7 @@
this.meDumpLogfile = new System.Windows.Forms.ToolStripMenuItem();
this.meDumpDefaultProfile = new System.Windows.Forms.ToolStripMenuItem();
this.meDumpActiontreeAsXML = new System.Windows.Forms.ToolStripMenuItem();
this.meDumpSCJoyServerCommands = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
this.msBtShow = new System.Windows.Forms.ToolStripDropDownButton();
this.meShowToggleTable = new System.Windows.Forms.ToolStripMenuItem();
@ -543,6 +544,7 @@
this.treeView1.Size = new System.Drawing.Size(374, 640);
this.treeView1.TabIndex = 16;
this.treeView1.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseClick);
this.treeView1.NodeMouseDoubleClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView1_NodeMouseDoubleClick);
//
// cmAddDel
//
@ -1277,7 +1279,7 @@
//
this.meResetDefaults.Image = global::SCJMapper_V2.Properties.Resources.RSI;
this.meResetDefaults.Name = "meResetDefaults";
this.meResetDefaults.Size = new System.Drawing.Size(169, 38);
this.meResetDefaults.Size = new System.Drawing.Size(196, 38);
this.meResetDefaults.Tag = "§";
this.meResetDefaults.Text = "Reset defaults !";
this.meResetDefaults.Click += new System.EventHandler(this.meResetDefaults_Click);
@ -1286,7 +1288,7 @@
//
this.meResetEmpty.Image = global::SCJMapper_V2.Properties.Resources.NPad;
this.meResetEmpty.Name = "meResetEmpty";
this.meResetEmpty.Size = new System.Drawing.Size(169, 38);
this.meResetEmpty.Size = new System.Drawing.Size(196, 38);
this.meResetEmpty.Tag = "§";
this.meResetEmpty.Text = "Reset empty !";
this.meResetEmpty.Click += new System.EventHandler(this.meResetEmpty_Click);
@ -1302,7 +1304,8 @@
this.meDumpMappingList,
this.meDumpLogfile,
this.meDumpDefaultProfile,
this.meDumpActiontreeAsXML});
this.meDumpActiontreeAsXML,
this.meDumpSCJoyServerCommands});
this.msBtDump.Image = global::SCJMapper_V2.Properties.Resources.Info;
this.msBtDump.ImageTransparentColor = System.Drawing.Color.Magenta;
this.msBtDump.Name = "msBtDump";
@ -1314,7 +1317,7 @@
// meDumpMappingList
//
this.meDumpMappingList.Name = "meDumpMappingList";
this.meDumpMappingList.Size = new System.Drawing.Size(206, 22);
this.meDumpMappingList.Size = new System.Drawing.Size(238, 22);
this.meDumpMappingList.Tag = "§";
this.meDumpMappingList.Text = "Dump Mapping List";
this.meDumpMappingList.Click += new System.EventHandler(this.meDumpMappingList_Click);
@ -1322,7 +1325,7 @@
// meDumpLogfile
//
this.meDumpLogfile.Name = "meDumpLogfile";
this.meDumpLogfile.Size = new System.Drawing.Size(206, 22);
this.meDumpLogfile.Size = new System.Drawing.Size(238, 22);
this.meDumpLogfile.Tag = "§";
this.meDumpLogfile.Text = "Dump Logfile";
this.meDumpLogfile.Click += new System.EventHandler(this.meDumpLogfile_Click);
@ -1330,7 +1333,7 @@
// meDumpDefaultProfile
//
this.meDumpDefaultProfile.Name = "meDumpDefaultProfile";
this.meDumpDefaultProfile.Size = new System.Drawing.Size(206, 22);
this.meDumpDefaultProfile.Size = new System.Drawing.Size(238, 22);
this.meDumpDefaultProfile.Tag = "§";
this.meDumpDefaultProfile.Text = "Dump DefaultProfile";
this.meDumpDefaultProfile.Click += new System.EventHandler(this.meDumpDefaultProfile_Click);
@ -1338,11 +1341,18 @@
// meDumpActiontreeAsXML
//
this.meDumpActiontreeAsXML.Name = "meDumpActiontreeAsXML";
this.meDumpActiontreeAsXML.Size = new System.Drawing.Size(206, 22);
this.meDumpActiontreeAsXML.Size = new System.Drawing.Size(238, 22);
this.meDumpActiontreeAsXML.Tag = "§";
this.meDumpActiontreeAsXML.Text = "Dump Actiontree as XML";
this.meDumpActiontreeAsXML.Click += new System.EventHandler(this.meDumpActiontreeAsXML_Click);
//
// meDumpSCJoyServerCommands
//
this.meDumpSCJoyServerCommands.Name = "meDumpSCJoyServerCommands";
this.meDumpSCJoyServerCommands.Size = new System.Drawing.Size(238, 22);
this.meDumpSCJoyServerCommands.Text = "Dump SCJoyServer Commands";
this.meDumpSCJoyServerCommands.Click += new System.EventHandler(this.meDumpSCJoyServerCommands_Click);
//
// toolStripSeparator5
//
this.toolStripSeparator5.Name = "toolStripSeparator5";
@ -1707,6 +1717,7 @@
private System.Windows.Forms.ToolStripMenuItem meShowDeviceMonitoringDialog;
private System.Windows.Forms.Label lblPTU;
private System.Windows.Forms.ToolStripMenuItem meShowLayoutDialog;
private System.Windows.Forms.ToolStripMenuItem meDumpSCJoyServerCommands;
}
}

@ -39,6 +39,8 @@ namespace SCJMapper_V2
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;
private bool m_dumpSCJScommands = false; // allow dumping SCJoyServer Commands into the XML Pane while true
///<remarks>
/// Holds the ActionTree that manages the TreeView and the action lists
@ -119,7 +121,7 @@ namespace SCJMapper_V2
/// <returns>The jsN string - can be jsx, js1..jsN</returns>
private string JSStr()
{
UC_JoyPanel jp = (UC_JoyPanel)( tc1.SelectedTab?.Controls["UC_JoyPanel"] );
UC_JoyPanel jp = (UC_JoyPanel)( tc1.SelectedTab?.Controls["UC_JoyPanel"] );
return jp?.JsName;
}
@ -243,7 +245,7 @@ namespace SCJMapper_V2
#region Main Form Handling
public void splash()
{
Application.Run( new AboutBox( ) );
Application.Run( new AboutBox( ) );
}
private Thread SplashT = null;
@ -442,9 +444,12 @@ namespace SCJMapper_V2
cbxShowMouse.Checked = AppSettings.Instance.ShowMouse;
cbxShowMappedOnly.Checked = AppSettings.Instance.ShowMapped;
// now update the contents according to new settings
foreach ( JoystickCls j in DeviceInst.JoystickListRef ) j.ApplySettings( );
// init current Joystick
int jsIndex = -1;
if ( tc1.SelectedTab!=null)
if ( tc1.SelectedTab != null )
jsIndex = (int)tc1.SelectedTab.Tag; // gets the index into the JS list
if ( jsIndex >= 0 ) DeviceInst.JoystickInst = DeviceInst.JoystickListRef[jsIndex];
@ -509,7 +514,7 @@ namespace SCJMapper_V2
Font f;
Brush backBrush = new SolidBrush( MyColors.TabColor[m_tabMap[e.Index]] );
Brush foreBrush = new SolidBrush( Color.Black );
Brush foreBrush = new SolidBrush( Color.Black );
//The draw call sends all tabs to draw, the selected one needs to be with Bold font
@ -698,7 +703,7 @@ namespace SCJMapper_V2
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( "" );
tc1.TabPages.Add( "" );
uUC_JoyPanelNew = new UC_JoyPanel( ); tc1.TabPages[tabs].Controls.Add( uUC_JoyPanelNew );
Tx.LocalizeControlTree( uUC_JoyPanelNew );
uUC_JoyPanelNew.Size = UC_JoyPanel.Size; uUC_JoyPanelNew.Location = UC_JoyPanel.Location;
@ -782,6 +787,7 @@ namespace SCJMapper_V2
private void Grab()
{
log.Debug( "Grab - Entry" );
m_dumpSCJScommands = false; // disable this one
m_AT.ActionMaps.fromXML( rtb.Text );
@ -836,6 +842,7 @@ namespace SCJMapper_V2
private void Dump()
{
log.Debug( "Dump - Entry" );
m_dumpSCJScommands = false; // disable this one
AutoTabXML_Assignment( EATabXML.Tab_XML );
@ -915,6 +922,20 @@ namespace SCJMapper_V2
}
}
private void treeView1_NodeMouseDoubleClick( object sender, TreeNodeMouseClickEventArgs e )
{
if ( !m_dumpSCJScommands ) return; // disabled
if ( e.Button == MouseButtons.Left ) {
if ( e.Node.Level > 0 ) {
string cmd = SCJServer.SCJScmd.GetCommand( e.Node );
if ( !string.IsNullOrEmpty( cmd ) ) {
rtb.Text += $"{cmd}\n";
}
}
}
}
// Action Tree Event - manages the de/selection of a node
private void M_AT_NodeSelectedEvent( object sender, ActionTreeEventArgs e )
{
@ -1010,6 +1031,8 @@ namespace SCJMapper_V2
private void meResetDefaults_Click( object sender, EventArgs e )
{
m_dumpSCJScommands = false; // disable this one
// start over and if chosen, load defaults from SC game
InitActionTree( true );
rtb.Text = "";
@ -1019,6 +1042,8 @@ namespace SCJMapper_V2
private void meResetEmpty_Click( object sender, EventArgs e )
{
m_dumpSCJScommands = false; // disable this one
// start over
cbxShowMappedOnly.Checked = false; // else it might get empty..
InitActionTree( false );
@ -1159,7 +1184,7 @@ namespace SCJMapper_V2
private void meShowLayoutDialog_Click( object sender, EventArgs e )
{
// sanity check for the layout folder
if (! Directory.Exists( TheUser.LayoutsDir ) ) {
if ( !Directory.Exists( TheUser.LayoutsDir ) ) {
MessageBox.Show( this, $"Layout folder is missing - should be: {TheUser.LayoutsDir}" );
}
else {
@ -1171,6 +1196,14 @@ namespace SCJMapper_V2
}
}
private void meDumpSCJoyServerCommands_Click( object sender, EventArgs e )
{
// clear the XML pane and allow double clicks to create commands from the action
rtb.Clear( );
m_dumpSCJScommands = true; // enable this one
rtb.Text = "Doubleclick items in the Action Tree to create commands\n\n";
}
// *** Settings
@ -1250,6 +1283,8 @@ namespace SCJMapper_V2
private void meDefaultsLoadAndGrab_Click( object sender, EventArgs e )
{
m_dumpSCJScommands = false; // disable this one
// start over
InitActionTree( true );
rtb.Text = SCMappings.Mapping( AppSettings.Instance.DefMappingName );
@ -1264,6 +1299,8 @@ namespace SCJMapper_V2
private void meResetLoadAndGrab_Click( object sender, EventArgs e )
{
m_dumpSCJScommands = false; // disable this one
// start over
InitActionTree( false );
rtb.Text = SCMappings.Mapping( AppSettings.Instance.DefMappingName );
@ -1277,6 +1314,8 @@ namespace SCJMapper_V2
private void meLoadAndGrab_Click( object sender, EventArgs e )
{
m_dumpSCJScommands = false; // disable this one
rtb.Text = SCMappings.Mapping( AppSettings.Instance.DefMappingName );
Grab( );
if ( SCMappings.IsUserMapping( AppSettings.Instance.DefMappingName ) ) {
@ -1289,6 +1328,8 @@ namespace SCJMapper_V2
private void meLoad_Click( object sender, EventArgs e )
{
m_dumpSCJScommands = false; // disable this one
rtb.Text = SCMappings.Mapping( AppSettings.Instance.DefMappingName );
if ( SCMappings.IsUserMapping( AppSettings.Instance.DefMappingName ) ) {
txMappingName.Text = AppSettings.Instance.DefMappingName;
@ -1526,13 +1567,15 @@ namespace SCJMapper_V2
AppSettings.Instance.MyMappingName = txMappingName.Text; AppSettings.Instance.Save( );// last used - persist
txMappingName.BackColor = MyColors.SuccessColor;
// autosave our XML
string xmlList = string.Format( "<!-- {0} - SC Joystick Mapping ({1}) --> \n{2}", DateTime.Now, txMappingName.Text,
m_AT.ReportActionsXML( ) );
// autosave our XML for other activities
string xmlList = $"<!-- {DateTime.Now} - SC Joystick Mapping ({txMappingName.Text}) --> \n{m_AT.ReportActionsXML( )}";
using ( StreamWriter sw = File.CreateText( TheUser.MappingXmlFileName( txMappingName.Text ) ) ) {
sw.Write( xmlList );
}
// autosave our Json for other activities
var jexport = m_AT.ReportActionsJson( );
jexport.Comment = $"{DateTime.Now} - SC Joystick Mapping ({txMappingName.Text})";
jexport.WriteToFile( TheUser.MappingJsonFileName( txMappingName.Text ) );
}
}
else {
@ -1901,7 +1944,9 @@ namespace SCJMapper_V2
m_AT.FindAndSelectActionKey( e.Actionmap, e.Actionkey, e.Nodeindex );
}
#endregion
}
}

@ -128,7 +128,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAA8
EAAAAk1TRnQBSQFMAgEBCQEAAXABFAFwARQBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
EAAAAk1TRnQBSQFMAgEBCQEAAZABFAGQARQBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAATADAAEBAQABCAYAAQwYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@ -582,7 +582,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACy
HQAAAk1TRnQBSQFMAgEBBAEAATABAgEwAQIBMAEAATABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
HQAAAk1TRnQBSQFMAgEBBAEAAVABAgFQAQIBMAEAATABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABwAMAAWADAAEBAQABCAYAAUgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

@ -112,6 +112,18 @@ namespace SCJMapper_V2
return Path.Combine( UserDir, mapName + ".scjm.xml" );
}
/// <summary>
/// Returns the mapping file name + path into our user dir
/// </summary>
/// <param name="mapName">The mapping name</param>
/// <returns>A fully qualified filename</returns>
static public string MappingJsonFileName( string mapName )
{
log.Debug( "MappingJsonFileName - Entry" );
return Path.Combine( UserDir, mapName + ".scjm.json" );
}
/// <summary>
/// Create a backupfile from the given file

@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Serialization;
namespace SCJMapper_V2.Actions.Json
{
[DataContract]
class JAction
{
/*
{ "action": "aname", "action_tx": "translated_name",
"rebind": [
{ "input" : "command" },
{ "input" : "command" }
]
},
*/
[DataMember( Name = "action_tx" )]
public string ActionTX { get; set; } = "";
[DataMember( Name = "action" )]
public string Action { get; set; } = "";
[DataMember( Name = "rebind" )]
public List<JCommand> Rebind { get; set; } = new List<JCommand>();
}
}

@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Serialization;
namespace SCJMapper_V2.Actions.Json
{
[DataContract]
class JActionmap
{
/*
{
"actionmap": "amapname", "actionmap_tx": "translated_amapname",
"actions": [
]
}
*/
[DataMember( Name = "actionmap_tx" )]
public string ActionmapTX { get; set; }
[DataMember( Name = "actionmap" )]
public string Actionmap { get; set; } = "";
[DataMember( Name = "actions" )]
public List<JAction> Actions { get; set; } = new List<JAction>( );
}
}

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Serialization;
namespace SCJMapper_V2.Actions.Json
{
[DataContract]
class JCommand
{
/*
{ "input" : "command" },
*/
[DataMember( Name = "input" )]
public string Input { get; set; } = "";
}
}

@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;
using System.Text;
using System.Threading.Tasks;
namespace SCJMapper_V2.Actions.Json
{
[DataContract]
class JExport
{
/*
{
"_comment": "comment",
"maps" : [
]
}
*/
[DataMember( Name = "_comment" )]
public string Comment { get; set; } = "";
[DataMember( Name = "maps" )]
public List<JActionmap> Maps { get; set; } = new List<JActionmap>( );
// non Json serializing
public bool WriteToFile( string filename )
{
try {
var jsonSerializer = new DataContractJsonSerializer( typeof( JExport ) );
using ( var tw = File.Create( filename ) ) {
jsonSerializer.WriteObject( tw, this );
}
}
#pragma warning disable CS0168 // Variable is declared but never used
catch ( Exception e ) {
#pragma warning restore CS0168 // Variable is declared but never used
return false;
}
return true;
}
}
}

@ -68,11 +68,15 @@ namespace SCJMapper_V2.Devices.Joystick
public static void DecompJsCommand( string jsCmd, out string jsTag, out string sAction )
{
// can be jsN_hat1_down ....
jsTag = ""; sAction = "";
string[] e = jsCmd.Split( new char[] { '_' }, StringSplitOptions.RemoveEmptyEntries );
if ( e.Length > 1 ) {
jsTag = e[0].Trim( ) + "_";
sAction = e[1].Trim( );
if ( e.Length > 2 ) {
sAction += "_" + e[2].Trim( );
}
}
}
@ -383,7 +387,7 @@ namespace SCJMapper_V2.Devices.Joystick
/// <summary>
/// The ProductGUID property
/// </summary>
public override string DevGUID { get { return "{" + m_device.Information.ProductGuid.ToString().ToUpperInvariant() + "}"; } }
public override string DevGUID { get { return "{" + m_device.Information.ProductGuid.ToString( ).ToUpperInvariant( ) + "}"; } }
/// <summary>
/// The JS Instance GUID for multiple device support (VJoy gets 2 of the same name)
/// </summary>
@ -561,7 +565,7 @@ namespace SCJMapper_V2.Devices.Joystick
ResetButtons( m_ignoreButtons );
// read ignore buttons
string igs = "";
switch ( m_joystickNumber ) {
switch ( m_joystickNumber + 1 ) { // bug alert, m_joystickNumber is 0 based...
case 1: igs = AppSettings.Instance.IgnoreJS1; break;
case 2: igs = AppSettings.Instance.IgnoreJS2; break;
case 3: igs = AppSettings.Instance.IgnoreJS3; break;

@ -77,7 +77,7 @@ namespace SCJMapper_V2.Devices.Monitor
DeviceInst.MouseRef?.PushActiveState( );
DeviceInst.JoystickListRef.PushActiveState( );
DxMonitorThread dxMonitorThread = new DxMonitorThread( this );
var dxMonitorThread = new DxMonitorThread( this );
m_monitoringThread = new Thread( dxMonitorThread.Run );
m_monitoringThread.Start( );
@ -100,6 +100,7 @@ namespace SCJMapper_V2.Devices.Monitor
{
public string Input = "";
public bool IsAxis = false; // true if an Axis is reported
public bool Pressed = false; // true if activated (buttons, keys)
}
/// <summary>
@ -135,12 +136,15 @@ namespace SCJMapper_V2.Devices.Monitor
string m_prevKbdMod = string.Empty;
string m_prevKbd = string.Empty;
bool m_kbdEmpty = false;
string m_prevMouse = string.Empty;
string m_prevMouseMod = string.Empty;
bool m_mouseEmpty = false;
string m_prevGamepad = string.Empty;
string m_prevGamepadMod = string.Empty;
bool m_gamepadEmpty = false;
string[] m_prevJoystick = new string[12] { "", "", "", "", "", "", "", "", "", "", "", "" };
string[] m_prevJoystickMod = new string[12] { "", "", "", "", "", "", "", "", "", "", "", "" };
bool[] m_joystickEmpty = new bool[12] { false, false, false, false, false, false, false, false, false, false, false, false };
@ -163,7 +167,9 @@ namespace SCJMapper_V2.Devices.Monitor
KeyboardIn.Input = string.Empty;
input = DeviceInst.KeyboardRef?.GetCurrentInput( ); // key only
KeyboardIn.Pressed = false; // to start with
if ( !string.IsNullOrEmpty( input ) ) {
KeyboardIn.Pressed = true;
// still pressed or newly pressed
if ( m_prevKbd == input ) {
// still pressed
@ -186,7 +192,9 @@ namespace SCJMapper_V2.Devices.Monitor
MouseIn.Input = string.Empty;
input = DeviceInst.MouseRef?.GetCurrentInput( );
MouseIn.Pressed = false;
if ( !string.IsNullOrEmpty( input ) ) {
MouseIn.Pressed = true;
// still pressed or newly pressed
if ( m_prevMouse == input ) {
// still pressed
@ -210,7 +218,9 @@ namespace SCJMapper_V2.Devices.Monitor
GamepadIn.Input = string.Empty;
input = DeviceInst.GamepadRef?.GetCurrentInput( );
GamepadIn.Pressed = false;
if ( !string.IsNullOrEmpty( input ) ) {
GamepadIn.Pressed = true;
// still pressed or newly pressed
if ( m_prevGamepad == input ) {
// still pressed
@ -236,7 +246,9 @@ namespace SCJMapper_V2.Devices.Monitor
foreach ( var js in DeviceInst.JoystickListRef ) {
JoystickIn[js.DevInstance].Input = string.Empty; // indicates no change
input = js.GetCurrentInput( ); // we get either a code or an empty string if released
JoystickIn[js.DevInstance].Pressed = false;
if ( !string.IsNullOrEmpty( input ) ) {
JoystickIn[js.DevInstance].Pressed = true;
// still pressed or newly pressed
if ( m_prevJoystick[js.DevInstance] == input ) {
// still pressed

@ -48,28 +48,48 @@
this.IL = new System.Windows.Forms.ImageList(this.components);
this.lbxOther = new System.Windows.Forms.RichTextBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.flpToggle = new System.Windows.Forms.FlowLayoutPanel();
this.uC_Toggle1 = new SCJMapper_V2.Devices.Monitor.UC_Toggle();
this.uC_Toggle2 = new SCJMapper_V2.Devices.Monitor.UC_Toggle();
this.uC_Toggle3 = new SCJMapper_V2.Devices.Monitor.UC_Toggle();
this.uC_Toggle4 = new SCJMapper_V2.Devices.Monitor.UC_Toggle();
this.uC_Toggle5 = new SCJMapper_V2.Devices.Monitor.UC_Toggle();
this.uC_Toggle6 = new SCJMapper_V2.Devices.Monitor.UC_Toggle();
this.uC_Toggle7 = new SCJMapper_V2.Devices.Monitor.UC_Toggle();
this.uC_Toggle8 = new SCJMapper_V2.Devices.Monitor.UC_Toggle();
this.uC_Toggle9 = new SCJMapper_V2.Devices.Monitor.UC_Toggle();
this.uC_Toggle10 = new SCJMapper_V2.Devices.Monitor.UC_Toggle();
this.panel1 = new System.Windows.Forms.Panel();
this.chkReport = new System.Windows.Forms.CheckBox();
this.chkMonitorMouse = new System.Windows.Forms.CheckBox();
this.lblJ_07 = new System.Windows.Forms.Label();
this.txJoystick07 = new System.Windows.Forms.TextBox();
this.txJoystick06 = new System.Windows.Forms.TextBox();
this.txJoystick05 = new System.Windows.Forms.TextBox();
this.txJoystick04 = new System.Windows.Forms.TextBox();
this.lblJ_06 = new System.Windows.Forms.Label();
this.lblJ_05 = new System.Windows.Forms.Label();
this.lblJ_04 = new System.Windows.Forms.Label();
this.lblJ_08 = new System.Windows.Forms.Label();
this.txJoystick08 = new System.Windows.Forms.TextBox();
this.lblJ_09 = new System.Windows.Forms.Label();
this.txJoystick09 = new System.Windows.Forms.TextBox();
this.lblJ_10 = new System.Windows.Forms.Label();
this.txJoystick10 = new System.Windows.Forms.TextBox();
this.lblJ_11 = new System.Windows.Forms.Label();
this.txJoystick11 = new System.Windows.Forms.TextBox();
this.groupBox1.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.flpToggle.SuspendLayout();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.lblJ_11);
this.groupBox1.Controls.Add(this.txJoystick11);
this.groupBox1.Controls.Add(this.lblJ_10);
this.groupBox1.Controls.Add(this.txJoystick10);
this.groupBox1.Controls.Add(this.lblJ_09);
this.groupBox1.Controls.Add(this.txJoystick09);
this.groupBox1.Controls.Add(this.lblJ_08);
this.groupBox1.Controls.Add(this.txJoystick08);
this.groupBox1.Controls.Add(this.lblJ_07);
this.groupBox1.Controls.Add(this.txJoystick07);
this.groupBox1.Controls.Add(this.txJoystick06);
this.groupBox1.Controls.Add(this.txJoystick05);
this.groupBox1.Controls.Add(this.txJoystick04);
this.groupBox1.Controls.Add(this.lblJ_06);
this.groupBox1.Controls.Add(this.lblJ_05);
this.groupBox1.Controls.Add(this.lblJ_04);
this.groupBox1.Controls.Add(this.lblJ_03);
this.groupBox1.Controls.Add(this.txJoystick03);
this.groupBox1.Controls.Add(this.txJoystick02);
@ -90,7 +110,7 @@
this.groupBox1.Margin = new System.Windows.Forms.Padding(5, 3, 3, 3);
this.groupBox1.Name = "groupBox1";
this.tableLayoutPanel1.SetRowSpan(this.groupBox1, 2);
this.groupBox1.Size = new System.Drawing.Size(519, 144);
this.groupBox1.Size = new System.Drawing.Size(519, 244);
this.groupBox1.TabIndex = 6;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "...";
@ -99,7 +119,7 @@
//
this.lblJ_03.AutoSize = true;
this.lblJ_03.ForeColor = System.Drawing.Color.Gainsboro;
this.lblJ_03.Location = new System.Drawing.Point(278, 108);
this.lblJ_03.Location = new System.Drawing.Point(14, 161);
this.lblJ_03.Name = "lblJ_03";
this.lblJ_03.Size = new System.Drawing.Size(56, 13);
this.lblJ_03.TabIndex = 8;
@ -110,7 +130,7 @@
this.txJoystick03.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
this.txJoystick03.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txJoystick03.ForeColor = System.Drawing.Color.Gainsboro;
this.txJoystick03.Location = new System.Drawing.Point(363, 105);
this.txJoystick03.Location = new System.Drawing.Point(99, 158);
this.txJoystick03.Name = "txJoystick03";
this.txJoystick03.ReadOnly = true;
this.txJoystick03.Size = new System.Drawing.Size(145, 22);
@ -121,7 +141,7 @@
this.txJoystick02.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
this.txJoystick02.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txJoystick02.ForeColor = System.Drawing.Color.Gainsboro;
this.txJoystick02.Location = new System.Drawing.Point(363, 77);
this.txJoystick02.Location = new System.Drawing.Point(99, 134);
this.txJoystick02.Name = "txJoystick02";
this.txJoystick02.ReadOnly = true;
this.txJoystick02.Size = new System.Drawing.Size(145, 22);
@ -132,7 +152,7 @@
this.txJoystick01.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
this.txJoystick01.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txJoystick01.ForeColor = System.Drawing.Color.Gainsboro;
this.txJoystick01.Location = new System.Drawing.Point(363, 49);
this.txJoystick01.Location = new System.Drawing.Point(99, 110);
this.txJoystick01.Name = "txJoystick01";
this.txJoystick01.ReadOnly = true;
this.txJoystick01.Size = new System.Drawing.Size(145, 22);
@ -143,7 +163,7 @@
this.txJoystick00.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
this.txJoystick00.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txJoystick00.ForeColor = System.Drawing.Color.Gainsboro;
this.txJoystick00.Location = new System.Drawing.Point(363, 21);
this.txJoystick00.Location = new System.Drawing.Point(99, 86);
this.txJoystick00.Name = "txJoystick00";
this.txJoystick00.ReadOnly = true;
this.txJoystick00.Size = new System.Drawing.Size(145, 22);
@ -154,7 +174,7 @@
this.txGamepad.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
this.txGamepad.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txGamepad.ForeColor = System.Drawing.Color.Gainsboro;
this.txGamepad.Location = new System.Drawing.Point(99, 77);
this.txGamepad.Location = new System.Drawing.Point(99, 49);
this.txGamepad.Name = "txGamepad";
this.txGamepad.ReadOnly = true;
this.txGamepad.Size = new System.Drawing.Size(145, 22);
@ -165,7 +185,7 @@
this.txMouse.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
this.txMouse.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txMouse.ForeColor = System.Drawing.Color.Gainsboro;
this.txMouse.Location = new System.Drawing.Point(99, 49);
this.txMouse.Location = new System.Drawing.Point(363, 21);
this.txMouse.Name = "txMouse";
this.txMouse.ReadOnly = true;
this.txMouse.Size = new System.Drawing.Size(145, 22);
@ -186,7 +206,7 @@
//
this.lblJ_02.AutoSize = true;
this.lblJ_02.ForeColor = System.Drawing.Color.Gainsboro;
this.lblJ_02.Location = new System.Drawing.Point(278, 80);
this.lblJ_02.Location = new System.Drawing.Point(14, 137);
this.lblJ_02.Name = "lblJ_02";
this.lblJ_02.Size = new System.Drawing.Size(56, 13);
this.lblJ_02.TabIndex = 0;
@ -196,7 +216,7 @@
//
this.lblJ_01.AutoSize = true;
this.lblJ_01.ForeColor = System.Drawing.Color.Gainsboro;
this.lblJ_01.Location = new System.Drawing.Point(278, 52);
this.lblJ_01.Location = new System.Drawing.Point(14, 113);
this.lblJ_01.Name = "lblJ_01";
this.lblJ_01.Size = new System.Drawing.Size(56, 13);
this.lblJ_01.TabIndex = 0;
@ -206,7 +226,7 @@
//
this.lblJ_00.AutoSize = true;
this.lblJ_00.ForeColor = System.Drawing.Color.Gainsboro;
this.lblJ_00.Location = new System.Drawing.Point(278, 24);
this.lblJ_00.Location = new System.Drawing.Point(14, 89);
this.lblJ_00.Name = "lblJ_00";
this.lblJ_00.Size = new System.Drawing.Size(56, 13);
this.lblJ_00.TabIndex = 0;
@ -216,7 +236,7 @@
//
this.lblGamepad.AutoSize = true;
this.lblGamepad.ForeColor = System.Drawing.Color.Gainsboro;
this.lblGamepad.Location = new System.Drawing.Point(6, 80);
this.lblGamepad.Location = new System.Drawing.Point(6, 52);
this.lblGamepad.Name = "lblGamepad";
this.lblGamepad.Size = new System.Drawing.Size(56, 13);
this.lblGamepad.TabIndex = 0;
@ -226,7 +246,7 @@
//
this.lblMouse.AutoSize = true;
this.lblMouse.ForeColor = System.Drawing.Color.Gainsboro;
this.lblMouse.Location = new System.Drawing.Point(6, 52);
this.lblMouse.Location = new System.Drawing.Point(270, 24);
this.lblMouse.Name = "lblMouse";
this.lblMouse.Size = new System.Drawing.Size(42, 13);
this.lblMouse.TabIndex = 0;
@ -275,7 +295,7 @@
this.lbxOther.ForeColor = System.Drawing.Color.Gainsboro;
this.lbxOther.Location = new System.Drawing.Point(3, 253);
this.lbxOther.Name = "lbxOther";
this.lbxOther.Size = new System.Drawing.Size(698, 125);
this.lbxOther.Size = new System.Drawing.Size(698, 369);
this.lbxOther.TabIndex = 7;
this.lbxOther.Text = "";
//
@ -284,162 +304,21 @@
this.tableLayoutPanel1.ColumnCount = 2;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 170F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.lbxOther, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.lbxOther, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.groupBox1, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.flpToggle, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.btTogMonitor, 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 4;
this.tableLayoutPanel1.RowCount = 3;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 70F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 80F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 180F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(704, 381);
this.tableLayoutPanel1.Size = new System.Drawing.Size(704, 625);
this.tableLayoutPanel1.TabIndex = 8;
//
// flpToggle
//
this.tableLayoutPanel1.SetColumnSpan(this.flpToggle, 2);
this.flpToggle.Controls.Add(this.uC_Toggle1);
this.flpToggle.Controls.Add(this.uC_Toggle2);
this.flpToggle.Controls.Add(this.uC_Toggle3);
this.flpToggle.Controls.Add(this.uC_Toggle4);
this.flpToggle.Controls.Add(this.uC_Toggle5);
this.flpToggle.Controls.Add(this.uC_Toggle6);
this.flpToggle.Controls.Add(this.uC_Toggle7);
this.flpToggle.Controls.Add(this.uC_Toggle8);
this.flpToggle.Controls.Add(this.uC_Toggle9);
this.flpToggle.Controls.Add(this.uC_Toggle10);
this.flpToggle.Dock = System.Windows.Forms.DockStyle.Fill;
this.flpToggle.Location = new System.Drawing.Point(3, 153);
this.flpToggle.Name = "flpToggle";
this.flpToggle.Size = new System.Drawing.Size(698, 94);
this.flpToggle.TabIndex = 10;
//
// uC_Toggle1
//
this.uC_Toggle1.BackColor = System.Drawing.Color.Transparent;
this.uC_Toggle1.Dock = System.Windows.Forms.DockStyle.Top;
this.uC_Toggle1.Label = "";
this.uC_Toggle1.Location = new System.Drawing.Point(0, 0);
this.uC_Toggle1.Margin = new System.Windows.Forms.Padding(0);
this.uC_Toggle1.Name = "uC_Toggle1";
this.uC_Toggle1.Size = new System.Drawing.Size(64, 95);
this.uC_Toggle1.Switch = false;
this.uC_Toggle1.TabIndex = 0;
//
// uC_Toggle2
//
this.uC_Toggle2.BackColor = System.Drawing.Color.Transparent;
this.uC_Toggle2.Dock = System.Windows.Forms.DockStyle.Top;
this.uC_Toggle2.Label = "";
this.uC_Toggle2.Location = new System.Drawing.Point(64, 0);
this.uC_Toggle2.Margin = new System.Windows.Forms.Padding(0);
this.uC_Toggle2.Name = "uC_Toggle2";
this.uC_Toggle2.Size = new System.Drawing.Size(64, 95);
this.uC_Toggle2.Switch = false;
this.uC_Toggle2.TabIndex = 1;
//
// uC_Toggle3
//
this.uC_Toggle3.BackColor = System.Drawing.Color.Transparent;
this.uC_Toggle3.Dock = System.Windows.Forms.DockStyle.Top;
this.uC_Toggle3.Label = "";
this.uC_Toggle3.Location = new System.Drawing.Point(128, 0);
this.uC_Toggle3.Margin = new System.Windows.Forms.Padding(0);
this.uC_Toggle3.Name = "uC_Toggle3";
this.uC_Toggle3.Size = new System.Drawing.Size(64, 95);
this.uC_Toggle3.Switch = false;
this.uC_Toggle3.TabIndex = 2;
//
// uC_Toggle4
//
this.uC_Toggle4.BackColor = System.Drawing.Color.Transparent;
this.uC_Toggle4.Dock = System.Windows.Forms.DockStyle.Top;
this.uC_Toggle4.Label = "";
this.uC_Toggle4.Location = new System.Drawing.Point(192, 0);
this.uC_Toggle4.Margin = new System.Windows.Forms.Padding(0);
this.uC_Toggle4.Name = "uC_Toggle4";
this.uC_Toggle4.Size = new System.Drawing.Size(64, 95);
this.uC_Toggle4.Switch = false;
this.uC_Toggle4.TabIndex = 3;
//
// uC_Toggle5
//
this.uC_Toggle5.BackColor = System.Drawing.Color.Transparent;
this.uC_Toggle5.Dock = System.Windows.Forms.DockStyle.Top;
this.uC_Toggle5.Label = "";
this.uC_Toggle5.Location = new System.Drawing.Point(256, 0);
this.uC_Toggle5.Margin = new System.Windows.Forms.Padding(0);
this.uC_Toggle5.Name = "uC_Toggle5";
this.uC_Toggle5.Size = new System.Drawing.Size(64, 95);
this.uC_Toggle5.Switch = false;
this.uC_Toggle5.TabIndex = 4;
//
// uC_Toggle6
//
this.uC_Toggle6.BackColor = System.Drawing.Color.Transparent;
this.uC_Toggle6.Dock = System.Windows.Forms.DockStyle.Top;
this.uC_Toggle6.Label = "";
this.uC_Toggle6.Location = new System.Drawing.Point(320, 0);
this.uC_Toggle6.Margin = new System.Windows.Forms.Padding(0);
this.uC_Toggle6.Name = "uC_Toggle6";
this.uC_Toggle6.Size = new System.Drawing.Size(64, 95);
this.uC_Toggle6.Switch = false;
this.uC_Toggle6.TabIndex = 5;
//
// uC_Toggle7
//
this.uC_Toggle7.BackColor = System.Drawing.Color.Transparent;
this.uC_Toggle7.Dock = System.Windows.Forms.DockStyle.Top;
this.uC_Toggle7.Label = "";
this.uC_Toggle7.Location = new System.Drawing.Point(384, 0);
this.uC_Toggle7.Margin = new System.Windows.Forms.Padding(0);
this.uC_Toggle7.Name = "uC_Toggle7";
this.uC_Toggle7.Size = new System.Drawing.Size(64, 95);
this.uC_Toggle7.Switch = false;
this.uC_Toggle7.TabIndex = 6;
//
// uC_Toggle8
//
this.uC_Toggle8.BackColor = System.Drawing.Color.Transparent;
this.uC_Toggle8.Dock = System.Windows.Forms.DockStyle.Top;
this.uC_Toggle8.Label = "";
this.uC_Toggle8.Location = new System.Drawing.Point(448, 0);
this.uC_Toggle8.Margin = new System.Windows.Forms.Padding(0);
this.uC_Toggle8.Name = "uC_Toggle8";
this.uC_Toggle8.Size = new System.Drawing.Size(64, 95);
this.uC_Toggle8.Switch = false;
this.uC_Toggle8.TabIndex = 7;
//
// uC_Toggle9
//
this.uC_Toggle9.BackColor = System.Drawing.Color.Transparent;
this.uC_Toggle9.Dock = System.Windows.Forms.DockStyle.Top;
this.uC_Toggle9.Label = "";
this.uC_Toggle9.Location = new System.Drawing.Point(512, 0);
this.uC_Toggle9.Margin = new System.Windows.Forms.Padding(0);
this.uC_Toggle9.Name = "uC_Toggle9";
this.uC_Toggle9.Size = new System.Drawing.Size(64, 95);
this.uC_Toggle9.Switch = false;
this.uC_Toggle9.TabIndex = 8;
//
// uC_Toggle10
//
this.uC_Toggle10.BackColor = System.Drawing.Color.Transparent;
this.uC_Toggle10.Dock = System.Windows.Forms.DockStyle.Top;
this.uC_Toggle10.Label = "";
this.uC_Toggle10.Location = new System.Drawing.Point(576, 0);
this.uC_Toggle10.Margin = new System.Windows.Forms.Padding(0);
this.uC_Toggle10.Name = "uC_Toggle10";
this.uC_Toggle10.Size = new System.Drawing.Size(64, 95);
this.uC_Toggle10.Switch = false;
this.uC_Toggle10.TabIndex = 9;
//
// panel1
//
this.panel1.Controls.Add(this.chkReport);
@ -447,7 +326,7 @@
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(3, 73);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(164, 74);
this.panel1.Size = new System.Drawing.Size(164, 174);
this.panel1.TabIndex = 11;
//
// chkReport
@ -474,12 +353,180 @@
this.chkMonitorMouse.Text = "Monitor mouse axis";
this.chkMonitorMouse.UseVisualStyleBackColor = true;
//
// lblJ_07
//
this.lblJ_07.AutoSize = true;
this.lblJ_07.ForeColor = System.Drawing.Color.Gainsboro;
this.lblJ_07.Location = new System.Drawing.Point(278, 114);
this.lblJ_07.Name = "lblJ_07";
this.lblJ_07.Size = new System.Drawing.Size(56, 13);
this.lblJ_07.TabIndex = 16;
this.lblJ_07.Text = "Joystick-7";
//
// txJoystick07
//
this.txJoystick07.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
this.txJoystick07.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txJoystick07.ForeColor = System.Drawing.Color.Gainsboro;
this.txJoystick07.Location = new System.Drawing.Point(363, 111);
this.txJoystick07.Name = "txJoystick07";
this.txJoystick07.ReadOnly = true;
this.txJoystick07.Size = new System.Drawing.Size(145, 22);
this.txJoystick07.TabIndex = 15;
//
// txJoystick06
//
this.txJoystick06.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
this.txJoystick06.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txJoystick06.ForeColor = System.Drawing.Color.Gainsboro;
this.txJoystick06.Location = new System.Drawing.Point(363, 87);
this.txJoystick06.Name = "txJoystick06";
this.txJoystick06.ReadOnly = true;
this.txJoystick06.Size = new System.Drawing.Size(145, 22);
this.txJoystick06.TabIndex = 14;
//
// txJoystick05
//
this.txJoystick05.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
this.txJoystick05.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txJoystick05.ForeColor = System.Drawing.Color.Gainsboro;
this.txJoystick05.Location = new System.Drawing.Point(99, 206);
this.txJoystick05.Name = "txJoystick05";
this.txJoystick05.ReadOnly = true;
this.txJoystick05.Size = new System.Drawing.Size(145, 22);
this.txJoystick05.TabIndex = 13;
//
// txJoystick04
//
this.txJoystick04.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
this.txJoystick04.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txJoystick04.ForeColor = System.Drawing.Color.Gainsboro;
this.txJoystick04.Location = new System.Drawing.Point(99, 182);
this.txJoystick04.Name = "txJoystick04";
this.txJoystick04.ReadOnly = true;
this.txJoystick04.Size = new System.Drawing.Size(145, 22);
this.txJoystick04.TabIndex = 12;
//
// lblJ_06
//
this.lblJ_06.AutoSize = true;
this.lblJ_06.ForeColor = System.Drawing.Color.Gainsboro;
this.lblJ_06.Location = new System.Drawing.Point(278, 90);
this.lblJ_06.Name = "lblJ_06";
this.lblJ_06.Size = new System.Drawing.Size(56, 13);
this.lblJ_06.TabIndex = 9;
this.lblJ_06.Text = "Joystick-6";
//
// lblJ_05
//
this.lblJ_05.AutoSize = true;
this.lblJ_05.ForeColor = System.Drawing.Color.Gainsboro;
this.lblJ_05.Location = new System.Drawing.Point(14, 209);
this.lblJ_05.Name = "lblJ_05";
this.lblJ_05.Size = new System.Drawing.Size(56, 13);
this.lblJ_05.TabIndex = 10;
this.lblJ_05.Text = "Joystick-5";
//
// lblJ_04
//
this.lblJ_04.AutoSize = true;
this.lblJ_04.ForeColor = System.Drawing.Color.Gainsboro;
this.lblJ_04.Location = new System.Drawing.Point(14, 185);
this.lblJ_04.Name = "lblJ_04";
this.lblJ_04.Size = new System.Drawing.Size(56, 13);
this.lblJ_04.TabIndex = 11;
this.lblJ_04.Text = "Joystick-4";
//
// lblJ_08
//
this.lblJ_08.AutoSize = true;
this.lblJ_08.ForeColor = System.Drawing.Color.Gainsboro;
this.lblJ_08.Location = new System.Drawing.Point(278, 138);
this.lblJ_08.Name = "lblJ_08";
this.lblJ_08.Size = new System.Drawing.Size(56, 13);
this.lblJ_08.TabIndex = 18;
this.lblJ_08.Text = "Joystick-8";
//
// txJoystick08
//
this.txJoystick08.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
this.txJoystick08.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txJoystick08.ForeColor = System.Drawing.Color.Gainsboro;
this.txJoystick08.Location = new System.Drawing.Point(363, 135);
this.txJoystick08.Name = "txJoystick08";
this.txJoystick08.ReadOnly = true;
this.txJoystick08.Size = new System.Drawing.Size(145, 22);
this.txJoystick08.TabIndex = 17;
//
// lblJ_09
//
this.lblJ_09.AutoSize = true;
this.lblJ_09.ForeColor = System.Drawing.Color.Gainsboro;
this.lblJ_09.Location = new System.Drawing.Point(278, 162);
this.lblJ_09.Name = "lblJ_09";
this.lblJ_09.Size = new System.Drawing.Size(56, 13);
this.lblJ_09.TabIndex = 20;
this.lblJ_09.Text = "Joystick-9";
//
// txJoystick09
//
this.txJoystick09.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
this.txJoystick09.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txJoystick09.ForeColor = System.Drawing.Color.Gainsboro;
this.txJoystick09.Location = new System.Drawing.Point(363, 159);
this.txJoystick09.Name = "txJoystick09";
this.txJoystick09.ReadOnly = true;
this.txJoystick09.Size = new System.Drawing.Size(145, 22);
this.txJoystick09.TabIndex = 19;
//
// lblJ_10
//
this.lblJ_10.AutoSize = true;
this.lblJ_10.ForeColor = System.Drawing.Color.Gainsboro;
this.lblJ_10.Location = new System.Drawing.Point(278, 186);
this.lblJ_10.Name = "lblJ_10";
this.lblJ_10.Size = new System.Drawing.Size(62, 13);
this.lblJ_10.TabIndex = 22;
this.lblJ_10.Text = "Joystick-10";
//
// txJoystick10
//
this.txJoystick10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
this.txJoystick10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txJoystick10.ForeColor = System.Drawing.Color.Gainsboro;
this.txJoystick10.Location = new System.Drawing.Point(363, 183);
this.txJoystick10.Name = "txJoystick10";
this.txJoystick10.ReadOnly = true;
this.txJoystick10.Size = new System.Drawing.Size(145, 22);
this.txJoystick10.TabIndex = 21;
//
// lblJ_11
//
this.lblJ_11.AutoSize = true;
this.lblJ_11.ForeColor = System.Drawing.Color.Gainsboro;
this.lblJ_11.Location = new System.Drawing.Point(278, 210);
this.lblJ_11.Name = "lblJ_11";
this.lblJ_11.Size = new System.Drawing.Size(62, 13);
this.lblJ_11.TabIndex = 24;
this.lblJ_11.Text = "Joystick-11";
//
// txJoystick11
//
this.txJoystick11.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
this.txJoystick11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txJoystick11.ForeColor = System.Drawing.Color.Gainsboro;
this.txJoystick11.Location = new System.Drawing.Point(363, 207);
this.txJoystick11.Name = "txJoystick11";
this.txJoystick11.ReadOnly = true;
this.txJoystick11.Size = new System.Drawing.Size(145, 22);
this.txJoystick11.TabIndex = 23;
//
// FormDeviceMonitor
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
this.ClientSize = new System.Drawing.Size(704, 381);
this.ClientSize = new System.Drawing.Size(704, 625);
this.Controls.Add(this.tableLayoutPanel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
this.MinimumSize = new System.Drawing.Size(720, 420);
@ -491,7 +538,6 @@
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.tableLayoutPanel1.ResumeLayout(false);
this.flpToggle.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
@ -520,18 +566,23 @@
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.ImageList IL;
private System.Windows.Forms.CheckBox chkMonitorMouse;
private System.Windows.Forms.FlowLayoutPanel flpToggle;
private UC_Toggle uC_Toggle1;
private UC_Toggle uC_Toggle2;
private UC_Toggle uC_Toggle3;
private UC_Toggle uC_Toggle4;
private UC_Toggle uC_Toggle5;
private UC_Toggle uC_Toggle6;
private UC_Toggle uC_Toggle7;
private UC_Toggle uC_Toggle8;
private UC_Toggle uC_Toggle9;
private UC_Toggle uC_Toggle10;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.CheckBox chkReport;
private System.Windows.Forms.Label lblJ_07;
private System.Windows.Forms.TextBox txJoystick07;
private System.Windows.Forms.TextBox txJoystick06;
private System.Windows.Forms.TextBox txJoystick05;
private System.Windows.Forms.TextBox txJoystick04;
private System.Windows.Forms.Label lblJ_06;
private System.Windows.Forms.Label lblJ_05;
private System.Windows.Forms.Label lblJ_04;
private System.Windows.Forms.Label lblJ_11;
private System.Windows.Forms.TextBox txJoystick11;
private System.Windows.Forms.Label lblJ_10;
private System.Windows.Forms.TextBox txJoystick10;
private System.Windows.Forms.Label lblJ_09;
private System.Windows.Forms.TextBox txJoystick09;
private System.Windows.Forms.Label lblJ_08;
private System.Windows.Forms.TextBox txJoystick08;
}
}

@ -24,28 +24,7 @@ namespace SCJMapper_V2.Devices.Monitor
private DeviceMonitoring m_dx = null;
private ActionTree m_atRef = null;
private DeviceMonitoring.DxDeviceStates m_prevStates = new DeviceMonitoring.DxDeviceStates( );
private class TogWrap
{
public UC_Toggle Toggle = null;
public string Cmd = "";
public string Label = "";
public TogWrap( UC_Toggle tog, string cmd, string lbl )
{
Toggle = tog;
Cmd = cmd;
Label = lbl;
Toggle.Label = Label;
}
}
private Dictionary<string, TogWrap> m_toggles = new Dictionary<string, TogWrap>( );
private enum Togs
{
Freelook
}
private List<TextBox> m_jTx = new List<TextBox>( );
public ActionTree ActionTree { set => m_atRef = value; }
@ -55,6 +34,7 @@ namespace SCJMapper_V2.Devices.Monitor
}
private void FormDeviceMonitor_Load( object sender, EventArgs e )
{
Tx.LocalizeControlTree( this );
@ -65,20 +45,23 @@ namespace SCJMapper_V2.Devices.Monitor
lblJ_01.Text = Tx.Translate( "xJoystick" ) + "-1";
lblJ_02.Text = Tx.Translate( "xJoystick" ) + "-2";
lblJ_03.Text = Tx.Translate( "xJoystick" ) + "-3";
// get Toggles
var t = new TogWrap( uC_Toggle1, "v_view_freelook_mode", "Freelook" ); m_toggles.Add( t.Cmd, t );
t = new TogWrap( uC_Toggle2, "v_ifcs_toggle_esp", "ESP" ); m_toggles.Add( t.Cmd, t );
t = new TogWrap( uC_Toggle3, "v_toggle_landing_system", "Landing System" ); m_toggles.Add( t.Cmd, t );
t = new TogWrap( uC_Toggle4, "v_toggle_weapon_gimbal_lock", "Gimbal Lock Tgt" ); m_toggles.Add( t.Cmd, t );
t = new TogWrap( uC_Toggle5, "v_target_toggle_pinned_focused", "Pin focused" ); m_toggles.Add( t.Cmd, t );
t = new TogWrap( uC_Toggle6, "v_power_toggle_group_1", "Pwr Shields" ); m_toggles.Add( t.Cmd, t );
t = new TogWrap( uC_Toggle7, "v_power_toggle_group_2", "Pwr Weapons" ); m_toggles.Add( t.Cmd, t );
t = new TogWrap( uC_Toggle8, "v_power_toggle_group_3", "Pwr Drive" ); m_toggles.Add( t.Cmd, t );
t = new TogWrap( uC_Toggle9, "v_power_toggle", "Power" ); m_toggles.Add( t.Cmd, t );
t = new TogWrap( uC_Toggle10, "v_toggle_running_lights", "Lights" ); m_toggles.Add( t.Cmd, t );
lblJ_04.Text = Tx.Translate( "xJoystick" ) + "-4";
lblJ_05.Text = Tx.Translate( "xJoystick" ) + "-5";
lblJ_06.Text = Tx.Translate( "xJoystick" ) + "-6";
lblJ_07.Text = Tx.Translate( "xJoystick" ) + "-7";
lblJ_08.Text = Tx.Translate( "xJoystick" ) + "-8";
lblJ_09.Text = Tx.Translate( "xJoystick" ) + "-9";
lblJ_10.Text = Tx.Translate( "xJoystick" ) + "-10";
lblJ_11.Text = Tx.Translate( "xJoystick" ) + "-11";
// get enumerated access for the joy text boxes
m_jTx.Add( txJoystick00 ); m_jTx.Add( txJoystick01 ); m_jTx.Add( txJoystick02 ); m_jTx.Add( txJoystick03 ); m_jTx.Add( txJoystick04 ); m_jTx.Add( txJoystick05 );
m_jTx.Add( txJoystick06 ); m_jTx.Add( txJoystick07 ); m_jTx.Add( txJoystick08 ); m_jTx.Add( txJoystick09 ); m_jTx.Add( txJoystick10 ); m_jTx.Add( txJoystick11 );
// start with List
chkReport.Checked = true;
// Dx stuff
m_dx = new DeviceMonitoring( );
m_dx.DxDeviceEvent += M_dx_DxDeviceEvent;
// start with monitoring OFF
@ -86,11 +69,14 @@ namespace SCJMapper_V2.Devices.Monitor
UpdateMonitor( );
}
private Queue<DeviceMonitoring.DxDeviceStates> m_dxQueue = new Queue<DeviceMonitoring.DxDeviceStates>( );
// can be called from non UI thread
private void M_dx_DxDeviceEvent( object sender, DxDeviceEventArgs e )
{
m_dxQueue.Enqueue( e.DeviceStates );
this.Invoke( (MethodInvoker)delegate {
UpdateDeviceLabels( e.DeviceStates );
UpdateDeviceLabels( );
} );
}
@ -119,49 +105,61 @@ namespace SCJMapper_V2.Devices.Monitor
m_dx.ReportEvents = false;
}
}
private void UpdateDeviceLabels( DeviceMonitoring.DxDeviceStates states )
/// <summary>
/// Update the GUI elements in the Form Thread
/// </summary>
private void UpdateDeviceLabels()
{
if ( !string.IsNullOrEmpty( states.KeyboardIn.Input ) ) {
txKeyboard.Text = states.KeyboardIn.Input;
UpdateAssignmentList( states.KeyboardIn.Input );
}
if ( !string.IsNullOrEmpty( states.MouseIn.Input ) ) {
if ( chkMonitorMouse.Checked ) {
txMouse.Text = states.MouseIn.Input;
UpdateAssignmentList( states.MouseIn.Input );
// process all received events
while ( m_dxQueue.Count > 0 ) {
var states = m_dxQueue.Dequeue( );
// Keyboard
if ( !string.IsNullOrEmpty( states.KeyboardIn.Input ) ) {
txKeyboard.Text = states.KeyboardIn.Input;
UpdateAssignmentList( states.KeyboardIn.Input );
}
else {
if ( states.MouseIn.IsAxis == false ) {
// only non axis..
// txKeyboard.Text = "";
}
// Mouse
if ( !string.IsNullOrEmpty( states.MouseIn.Input ) ) {
if ( chkMonitorMouse.Checked ) {
txMouse.Text = states.MouseIn.Input;
UpdateAssignmentList( states.MouseIn.Input );
}
else {
if ( states.MouseIn.IsAxis == false ) {
// only non axis..
txMouse.Text = states.MouseIn.Input;
UpdateAssignmentList( states.MouseIn.Input );
}
}
}
else {
// txMouse.Text = "";
}
// Gamepad
if ( !string.IsNullOrEmpty( states.GamepadIn.Input ) ) {
txGamepad.Text = states.GamepadIn.Input;
UpdateAssignmentList( states.GamepadIn.Input );
}
else {
// txGamepad.Text = "";
}
// all Joysticks
for ( int jsDev = 0; jsDev < m_jTx.Count; jsDev++ ) {
if ( !string.IsNullOrEmpty( states.JoystickIn[jsDev].Input ) ) {
m_jTx[jsDev].Text = states.JoystickIn[jsDev].Input;
UpdateAssignmentList( states.JoystickIn[jsDev].Input );
}
else {
// m_jTx[jsDev].Text = "";
}
}
}
if ( !string.IsNullOrEmpty( states.GamepadIn.Input ) ) {
txGamepad.Text = states.GamepadIn.Input;
UpdateAssignmentList( states.GamepadIn.Input );
}
int jsDev = 0;
if ( !string.IsNullOrEmpty( states.JoystickIn[jsDev].Input ) ) {
txJoystick00.Text = states.JoystickIn[jsDev].Input;
UpdateAssignmentList( states.JoystickIn[jsDev].Input );
}
jsDev = 1;
if ( !string.IsNullOrEmpty( states.JoystickIn[jsDev].Input ) ) {
txJoystick01.Text = states.JoystickIn[jsDev].Input;
UpdateAssignmentList( states.JoystickIn[jsDev].Input );
}
jsDev = 2;
if ( !string.IsNullOrEmpty( states.JoystickIn[jsDev].Input ) ) {
txJoystick02.Text = states.JoystickIn[jsDev].Input;
UpdateAssignmentList( states.JoystickIn[jsDev].Input );
}
jsDev = 3;
if ( !string.IsNullOrEmpty( states.JoystickIn[jsDev].Input ) ) {
txJoystick03.Text = states.JoystickIn[jsDev].Input;
UpdateAssignmentList( states.JoystickIn[jsDev].Input );
}
}
@ -170,15 +168,10 @@ namespace SCJMapper_V2.Devices.Monitor
if ( string.IsNullOrEmpty( devInput ) ) return;
var actions = m_atRef.GetAllActions( devInput );
// cheap
foreach ( var t in m_toggles ) {
if ( actions.Contains( t.Key ) ) {
t.Value.Toggle.ToggleState( );
}
}
if ( chkReport.Checked ) {
// show list
RTF.RTFformatter RTF = new RTF.RTFformatter { RColor = SCJMapper_V2.RTF.RTFformatter.ERColor.ERC_Gainsborow };
var RTF = new RTF.RTFformatter { RColor = SCJMapper_V2.RTF.RTFformatter.ERColor.ERC_Gainsborow };
m_atRef.ListAllActionsRTF( devInput, RTF, true );
// have to check if throttle is used and if - add those to the list
string altDevInput = JoystickCls.MakeThrottle( devInput, true );

@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABE
DwAAAk1TRnQBSQFMAgEBAgEAAbABAAGwAQABMAEAATABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
DwAAAk1TRnQBSQFMAgEBAgEAAcABAAHAAQABMAEAATABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABwAMAATADAAEBAQABCAYAASQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

@ -1,70 +0,0 @@
namespace SCJMapper_V2.Devices.Monitor
{
partial class UC_LED
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose( bool disposing )
{
if ( disposing && ( components != null ) ) {
components.Dispose( );
}
base.Dispose( disposing );
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UC_LED));
this.IL = new System.Windows.Forms.ImageList(this.components);
this.SuspendLayout();
//
// IL
//
this.IL.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("IL.ImageStream")));
this.IL.TransparentColor = System.Drawing.Color.Transparent;
this.IL.Images.SetKeyName(0, "LED-Round_off.png");
this.IL.Images.SetKeyName(1, "LED-Round_red.png");
this.IL.Images.SetKeyName(2, "LED-Round_green.png");
this.IL.Images.SetKeyName(3, "LED-Round_blue.png");
this.IL.Images.SetKeyName(4, "LED-Round_amber.png");
this.IL.Images.SetKeyName(5, "LED-Rect_off.png");
this.IL.Images.SetKeyName(6, "LED-Rect_red.png");
this.IL.Images.SetKeyName(7, "LED-Rect_green.png");
this.IL.Images.SetKeyName(8, "LED-Rect_blue.png");
this.IL.Images.SetKeyName(9, "LED-Rect_amber.png");
//
// UC_LED
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Transparent;
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.DoubleBuffered = true;
this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Name = "UC_LED";
this.Size = new System.Drawing.Size(128, 128);
this.Load += new System.EventHandler(this.UC_LEDRound_Load);
this.Click += new System.EventHandler(this.UC_LED_Click);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.ImageList IL;
}
}

@ -1,52 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace SCJMapper_V2.Devices.Monitor
{
public partial class UC_LED : UserControl
{
private const int c_RoundOffset = 0;
private const int c_RectOffset = 5; // rect images start
private int m_colorOffset = 0;
private const int c_OFF = 4; // Amber
private const int c_ON = 2; // Green
public UC_LED()
{
InitializeComponent( );
}
private void UC_LEDRound_Load( object sender, EventArgs e )
{
this.BackgroundImage = IL.Images[m_colorOffset + ( ( m_switch ) ? c_ON : c_OFF )];
}
private bool m_switch = false;
private bool m_rectShape = false;
/// <summary>
/// Set the switch and its appearance
/// </summary>
public bool Switch { get => m_switch; set { m_switch = value; BackgroundImage = IL.Images[m_colorOffset + ( ( m_switch ) ? c_ON : c_OFF )]; } }
public void ON() { Switch = true; }
public void OFF() { Switch = false; }
/// <summary>
/// Selects the shape (true=Rect; false=Round)
/// </summary>
public bool RectShape { get => m_rectShape; set { m_rectShape = value; m_colorOffset = ( m_rectShape ) ? c_RectOffset : c_RoundOffset; } }
private void UC_LED_Click( object sender, EventArgs e )
{
Switch = !m_switch;
}
}
}

File diff suppressed because it is too large Load Diff

@ -1,63 +0,0 @@
namespace SCJMapper_V2.Devices.Monitor
{
partial class UC_SwitchRect
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose( bool disposing )
{
if ( disposing && ( components != null ) ) {
components.Dispose( );
}
base.Dispose( disposing );
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UC_SwitchRect));
this.IL = new System.Windows.Forms.ImageList(this.components);
this.SuspendLayout();
//
// IL
//
this.IL.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("IL.ImageStream")));
this.IL.TransparentColor = System.Drawing.Color.Transparent;
this.IL.Images.SetKeyName(0, "OFF");
this.IL.Images.SetKeyName(1, "ON");
//
// UC_SwitchRect
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Transparent;
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.CausesValidation = false;
this.DoubleBuffered = true;
this.Margin = new System.Windows.Forms.Padding(0);
this.Name = "UC_SwitchRect";
this.Size = new System.Drawing.Size(128, 128);
this.Load += new System.EventHandler(this.UC_SwitchRect_Load);
this.Click += new System.EventHandler(this.UC_SwitchRect_Click);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.ImageList IL;
}
}

@ -1,39 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace SCJMapper_V2.Devices.Monitor
{
public partial class UC_SwitchRect : UserControl
{
public UC_SwitchRect()
{
InitializeComponent( );
}
private void UC_SwitchRect_Load( object sender, EventArgs e )
{
this.BackgroundImage = IL.Images[( m_switch ) ? "ON" : "OFF"];
}
private bool m_switch = false;
/// <summary>
/// Set the switch and its appearance
/// </summary>
public bool Switch { get => m_switch; set { m_switch = value; BackgroundImage = IL.Images[( m_switch ) ? "ON" : "OFF"]; } }
// toggle
private void UC_SwitchRect_Click( object sender, EventArgs e )
{
Switch = !m_switch;
}
}
}

@ -1,311 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="IL.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="IL.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABM
KgAAAk1TRnQBSQFMAgEBAgEAARABAAEQAQABgAEAAYABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
BAABAgIAAYADAAEBAQABCAcAAQEXAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMC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B4A4AAQcB4A4A
AQcgAAHgDgABBwHgDgABByAAAcAOAAEDAcAOAAEDIAABwA4AAQMBwA4AAQMgAAGADgABAQGADgABASAA
AYAOAAEBAYAOAAEBIAABgA4AAQEBgA4AAQEgAAGADgABAQGADgABASAAAYAOAAEBAYAOAAEBIAABgA4A
AQEBgA4AAQEgAAGADgABAQGADgABASAAAYAOAAEBAYAOAAEBIAABgA4AAQEBgA4AAQEgAAGADgABAQGA
DgABASAAAYAOAAEBAYAOAAEBIAABgA4AAQEBgA4AAQEgAAGADgABAQGADgABASAAAYAOAAEBAYAOAAEB
IAABgA4AAQEBgA4AAQEgAAGADgABAQGADgABASAAAYAOAAEBAYAOAAEBIAABgA4AAQEBgA4AAQEgAAGA
DgABAQGADgABASAAAYAOAAEBAYAOAAEBIAABgA4AAQEBgA4AAQEgAAGADgABAQGADgABASAAAYAOAAEB
AYAOAAEBIAABgA4AAQEBgA4AAQEgAAGADgABAQGADgABASAAAYAOAAEBAYAOAAEBIAABgA4AAQEBgA4A
AQEgAAGADgABAQGADgABASAAAYAOAAEBAYAOAAEBIAABgA4AAQEBgA4AAQEgAAGADgABAQGADgABASAA
AYAOAAEBAYAOAAEBIAABgA4AAQEBgA4AAQEgAAGADgABAQGADgABASAAAYAOAAEBAYAOAAEBIAABgA4A
AQEBgA4AAQEgAAGADgABAQGADgABASAAAYAOAAEBAYAOAAEBIAABgA4AAQEBgA4AAQEgAAGADgABAQGA
DgABASAAAYAOAAEBAYAOAAEBIAABgA4AAQEBgA4AAQEgAAGADgABAQGADgABASAAAYAOAAEBAYAOAAEB
IAABgA4AAQEBgA4AAQEgAAGADgABAQGADgABASAAAYAOAAEBAYAOAAEBIAABgA4AAQEBgA4AAQEgAAGA
DgABAQGADgABASAAAYAOAAEBAYAOAAEBIAABgA4AAQEBgA4AAQEgAAGADgABAQGADgABASAAAYAOAAEB
AYAOAAEBIAABgA4AAQEBgA4AAQEgAAGADgABAQGADgABASAAAYAOAAEBAYAOAAEBIAABgA4AAQEBgA4A
AQEgAAGADgABAQGADgABASAAAYAOAAEBAYAOAAEBIAABgA4AAQEBgA4AAQEgAAGADgABAQGADgABASAA
AYAOAAEBAYAOAAEBIAABgA4AAQEBgA4AAQEgAAGADgABAQGADgABASAAAYAOAAEBAYAOAAEBIAABgA4A
AQEBgA4AAQEgAAGADgABAQGADgABASAAAYAOAAEBAYAOAAEBIAABgA4AAQEBgA4AAQEgAAGADgABAQGA
DgABASAAAYAOAAEBAYAOAAEBIAABgA4AAQEBgA4AAQEgAAGADgABAQGADgABASAAAYAOAAEBAYAOAAEB
IAABgA4AAQEBgA4AAQEgAAGADgABAQGADgABASAAAYAOAAEBAYAOAAEBIAABgA4AAQEBgA4AAQEgAAGA
DgABAQGADgABASAAAYAOAAEBAYAOAAEBIAABgA4AAQEBgA4AAQEgAAGADgABAQGADgABASAAAYAOAAEB
AYAOAAEBIAABgA4AAQEBgA4AAQEgAAGADgABAQGADgABASAAAYAOAAEBAYAOAAEBIAABgA4AAQEBgA4A
AQEgAAGADgABAQGADgABASAAAYAOAAEBAYAOAAEBIAABgA4AAQEBgA4AAQEgAAGADgABAQGADgABASAA
AYAOAAEBAYAOAAEBIAABgA4AAQEBgA4AAQEgAAGADgABAQGADgABASAAAYAOAAEBAYAOAAEBIAABgA4A
AQEBgA4AAQEgAAGADgABAQGADgABASAAAYAOAAEBAYAOAAEBIAABgA4AAQEBgA4AAQEgAAGADgABAQGA
DgABASAAAYAOAAEBAYAOAAEBIAABwA4AAQMBwA4AAQMgAAHADgABAwHADgABAyAAAeAOAAEHAeAOAAEH
IAAB4A4AAQcB4A4AAQcgAAHwDgABDwHwDgABDyAAAfwOAAE/AfwOAAE/IAAB/w4AAv8OAAH/IAAg/yAA
IP8gACD/IAAg/yAAIP8gACD/IAAg/yAAIP8gACD/IAAL
</value>
</data>
</root>

@ -1,94 +0,0 @@
namespace SCJMapper_V2.Devices.Monitor
{
partial class UC_Toggle
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose( bool disposing )
{
if ( disposing && ( components != null ) ) {
components.Dispose( );
}
base.Dispose( disposing );
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UC_Toggle));
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.lblContent = new System.Windows.Forms.Label();
this.ucLed = new SCJMapper_V2.Devices.Monitor.UC_LED();
this.flowLayoutPanel1.SuspendLayout();
this.SuspendLayout();
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.Controls.Add(this.ucLed);
this.flowLayoutPanel1.Controls.Add(this.lblContent);
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flowLayoutPanel1.ForeColor = System.Drawing.Color.Gainsboro;
this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 3);
this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(64, 95);
this.flowLayoutPanel1.TabIndex = 0;
//
// lblContent
//
this.lblContent.Dock = System.Windows.Forms.DockStyle.Top;
this.lblContent.Location = new System.Drawing.Point(0, 40);
this.lblContent.Margin = new System.Windows.Forms.Padding(0);
this.lblContent.Name = "lblContent";
this.lblContent.Size = new System.Drawing.Size(62, 51);
this.lblContent.TabIndex = 1;
this.lblContent.Text = "label1";
this.lblContent.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// ucLed
//
this.ucLed.BackColor = System.Drawing.Color.Transparent;
this.ucLed.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("ucLed.BackgroundImage")));
this.ucLed.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.ucLed.Dock = System.Windows.Forms.DockStyle.Left;
this.ucLed.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ucLed.Location = new System.Drawing.Point(0, 0);
this.ucLed.Margin = new System.Windows.Forms.Padding(0);
this.ucLed.Name = "ucLed";
this.ucLed.RectShape = false;
this.ucLed.Size = new System.Drawing.Size(62, 40);
this.ucLed.Switch = false;
this.ucLed.TabIndex = 0;
//
// UC_Toggle
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Transparent;
this.Controls.Add(this.flowLayoutPanel1);
this.Name = "UC_Toggle";
this.Size = new System.Drawing.Size(64, 95);
this.flowLayoutPanel1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private UC_LED ucLed;
private System.Windows.Forms.Label lblContent;
}
}

@ -1,32 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace SCJMapper_V2.Devices.Monitor
{
public partial class UC_Toggle : UserControl
{
public UC_Toggle()
{
InitializeComponent( );
ucLed.RectShape = true;
}
public bool Switch { get => ucLed.Switch; set => ucLed.Switch = value; }
public string Label { get => lblContent.Text; set => lblContent.Text = value; }
public void ToggleState()
{
ucLed.Switch = !ucLed.Switch;
}
}
}

@ -1,340 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="ucLed.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAX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VEYhVEYhVEYhVEYhVEYhVEY
hVEYhVEYhVEYhVEYhVEYhVEYhVEYhVEYhXEWDIfj/wE7zRDKTZKqNwAAAABJRU5ErkJggg==
</value>
</data>
</root>

@ -49,7 +49,9 @@ namespace SCJMapper_V2.Layout
var jsonResults = objResponse as DeviceFile;
return jsonResults;
}
#pragma warning disable CS0168 // Variable is declared but never used
catch ( Exception e ) {
#pragma warning restore CS0168 // Variable is declared but never used
return null;
}
}

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion( "2.46.0.81" )]
[assembly: AssemblyFileVersion( "2.46.0.81" )]
[assembly: AssemblyVersion( "2.47.0.82" )]
[assembly: AssemblyFileVersion( "2.47.0.82" )]

@ -50,6 +50,11 @@ Scanned for viruses before packing...
cassini@burri-web.org
Changelog:
V 2.47 - BETA Build 82
- add Mode to create SCJoyServer Command items from action tree
- add Saving ActionTree to a json file in <User>\Documents\SCJM\file.scjn.json for other tools (easier than XML)
- updated Rework for Device Monitor
- fix Ignore buttons from Settings not properly handled
V 2.46 - BETA Build 81
- add Some more Layout files for devices
- update Layout to work with keyboard and mouse

@ -58,7 +58,9 @@ namespace SCJMapper_V2.p4kFile
}
}
}
#pragma warning disable CS0168 // Variable is declared but never used
catch (Exception e) {
#pragma warning restore CS0168 // Variable is declared but never used
m_itemValid = false;
m_recordOffset = -1;
}

@ -30,7 +30,9 @@ namespace SCJMapper_V2.p4kFile
var ret = new DateTime( year, month, day, hour, min, sec );
return ret;
}
#pragma warning disable CS0168 // Variable is declared but never used
catch ( Exception e ) {
#pragma warning restore CS0168 // Variable is declared but never used
return new DateTime( 1970, 1, 1 );
}
}

@ -27,8 +27,8 @@
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>81</ApplicationRevision>
<ApplicationVersion>2.46.0.81</ApplicationVersion>
<ApplicationRevision>82</ApplicationRevision>
<ApplicationVersion>2.47.0.82</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
@ -138,6 +138,10 @@
<Compile Include="Actions\ActionTreeNode.cs" />
<Compile Include="AApp\appConfiguration.cs" />
<Compile Include="AApp\AppSettings.cs" />
<Compile Include="Actions\Json\JAction.cs" />
<Compile Include="Actions\Json\JActionmap.cs" />
<Compile Include="Actions\Json\JCommand.cs" />
<Compile Include="Actions\Json\JExport.cs" />
<Compile Include="Common\CloneableItems.cs" />
<Compile Include="Common\Commons.cs" />
<Compile Include="Common\WinApi.cs" />
@ -153,24 +157,6 @@
<Compile Include="Devices\Monitor\FormDeviceMonitor.Designer.cs">
<DependentUpon>FormDeviceMonitor.cs</DependentUpon>
</Compile>
<Compile Include="Devices\Monitor\UC_LED.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Devices\Monitor\UC_LED.Designer.cs">
<DependentUpon>UC_LED.cs</DependentUpon>
</Compile>
<Compile Include="Devices\Monitor\UC_SwitchRect.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Devices\Monitor\UC_SwitchRect.Designer.cs">
<DependentUpon>UC_SwitchRect.cs</DependentUpon>
</Compile>
<Compile Include="Devices\Monitor\UC_Toggle.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Devices\Monitor\UC_Toggle.Designer.cs">
<DependentUpon>UC_Toggle.cs</DependentUpon>
</Compile>
<Compile Include="Devices\Options\FormOptions.cs">
<SubType>Form</SubType>
</Compile>
@ -202,6 +188,9 @@
<Compile Include="Layout\ShapeItemList.cs" />
<Compile Include="Layout\ShapeKey.cs" />
<Compile Include="RTF\RTFformatter.cs" />
<Compile Include="SCJServer\JoystickCodes.cs" />
<Compile Include="SCJServer\KbdCodes.cs" />
<Compile Include="SCJServer\SCJScmd.cs" />
<Compile Include="SC\Modifiers.cs" />
<Compile Include="SC\p4kFile\p4kDirectory.cs" />
<Compile Include="SC\p4kFile\p4kDirectoryEntry.cs" />
@ -336,15 +325,6 @@
<EmbeddedResource Include="Devices\Monitor\FormDeviceMonitor.resx">
<DependentUpon>FormDeviceMonitor.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Devices\Monitor\UC_LED.resx">
<DependentUpon>UC_LED.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Devices\Monitor\UC_SwitchRect.resx">
<DependentUpon>UC_SwitchRect.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Devices\Monitor\UC_Toggle.resx">
<DependentUpon>UC_Toggle.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="AApp\FormMain.resx">
<DependentUpon>FormMain.cs</DependentUpon>
<SubType>Designer</SubType>

@ -0,0 +1,81 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SCJMapper_V2.SCJServer
{
/// <summary>
/// Translates Joystick stuff
/// </summary>
class JoystickCodes
{
/*
Joystick:
Axis: { "A": {"Direction": "X|Y|Z", "Value": number, "JNo": j, "Ext1": "extstr", "Ext2": "extstr", "Ext3": "extstr"} }
- number => 0..1000 (normalized)
RotAxis: { "R": {"Direction": "X|Y|Z", "Value": number, "JNo": j, "Ext1": "extstr", "Ext2": "extstr", "Ext3": "extstr"} }
- number => 0..1000 (normalized)
Slider: { "S": {"Index": 1|2, "Value": number, "JNo": j, "Ext1": "extstr", "Ext2": "extstr", "Ext3": "extstr"} }
- number => 0..1000 (normalized)
POV: { "P": {"Index": 1|2|3|4, "Direction": "c | u | r | d | l", "JNo": j, "Ext1": "extstr", "Ext2": "extstr", "Ext3": "extstr" } }
- Index n=> 1..MaxPOV (setup of vJoy, max = 4)
- Direction either of the chars (center (released), up, right, donw, left)
Button: { "B": {"Index": n, "Mode": "p|r|t|s|d", "Delay": msec, "JNo": j, "Ext1": "extstr", "Ext2": "extstr", "Ext3": "extstr" } }
- Button Index n => 1..VJ_MAXBUTTON (setup of vJoy - SC supports 60)
- Mode optional - either of the chars (see below)
- Mode: [mode] (p)ress, (r)elease, (t)ap, (s)hort tap, (d)ouble tap (default=tap - short tap is a tap with almost no delay)
- Delay: [delay] nnnn milliseconds, optional for Tap and Double Tap (default=150 VJCommand.DEFAULT_DELAY, max 20_000 msec)
- JNo: [joyNumber] >0 Joystick number (default=1)
*/
public static string FromJsAction( string jsAction, int jsN )
{
/*
button38
y
rotz
slider1
hat1_down
*/
if ( jsAction.StartsWith( "button" ) ) {
if ( int.TryParse( jsAction.Replace( "button", "" ), out int bNum ) ) {
return $"{{ \"B\":{{ \"Index\": {bNum}, \"Mode\": \"t\", \"JNo\": {jsN} }} }}";
}
else return "";
}
if ( jsAction.StartsWith( "rot" ) ) {
string dir = jsAction.Replace( "rot", "" );
return $"{{ \"R\":{{ \"Direction\": {dir.ToUpperInvariant( )}, \"Value\": NNN, \"JNo\": {jsN} }} }}";
}
if ( jsAction.StartsWith( "slider" ) ) {
if ( int.TryParse( jsAction.Replace( "slider", "" ), out int bNum ) ) {
return $"{{ \"S\":{{ \"Index\": {bNum}, \"Value\": NNN, \"JNo\": {jsN} }} }}";
}
else return "";
}
if ( jsAction.StartsWith( "hat" ) ) {
string[] e = jsAction.Split( new char[] { '_' } );
if ( int.TryParse( e[0].Replace( "hat", "" ), out int bNum ) ) {
return $"{{ \"P\":{{ \"Index\": {bNum}, \"Direction\": \"{e[1].Substring( 0, 1 )}\", \"JNo\": {jsN} }} }}\n"
+ $" {{ \"P\":{{ \"Index\": {bNum}, \"Direction\": \"c\", \"JNo\": {jsN} }} }}"; // add the center one as well
}
else return "";
}
// remains Axis x,y,z
if ( jsAction == "x" || jsAction == "y" || jsAction == "z" ) {
return $"{{ \"A\":{{ \"Direction\": {jsAction.ToUpperInvariant( )}, \"Value\": NNN, \"JNo\": {jsN} }} }}";
}
return "";
}
}
}

@ -0,0 +1,157 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SCJMapper_V2.SCJServer
{
/// <summary>
/// Convert from game key codes to VK_ codes (WinUser names for the server)
/// </summary>
class KbdCodes
{
public static string FromSCKeyboardMod( string scMod )
{
if ( scMod == "lalt" ) return "la&";
if ( scMod == "ralt" ) return "ra&";
if ( scMod == "lctrl" ) return "lc&";
if ( scMod == "rctrl" ) return "rc&";
if ( scMod == "lshift" ) return "ls&";
if ( scMod == "rshift" ) return "rd&";
return "";
}
/// <summary>
/// Converts from SC command to VK_ command
/// </summary>
/// <param name="scKey">A single SC game keyname</param>
/// <returns>The VK_Code of this key</returns>
static public string FromSCKeyboardCmd( string scKey )
{
switch ( scKey ) {
// handle modifiers first
case "lalt": return "VK_LALT";
case "ralt": return "VK_RALT";
case "lshift": return "VK_LSHIFT";
case "rshift": return "VK_RSHIFT";
case "lctrl": return "VK_LCONTROL";
case "rctrl": return "VK_RCONTROL";
// function keys first
case "f1": return "VK_F1";
case "f2": return "VK_F2";
case "f3": return "VK_F3";
case "f4": return "VK_F4";
case "f5": return "VK_F5";
case "f6": return "VK_F6";
case "f7": return "VK_F7";
case "f8": return "VK_F8";
case "f9": return "VK_F9";
case "f10": return "VK_F10";
case "f11": return "VK_F11";
case "f12": return "VK_F12";
case "f13": return "VK_F13";
case "f14": return "VK_F14";
case "f15": return "VK_F15";
// all keys where the DX name does not match the SC name
// Numpad
case "numlock": return "VK_NUMLOCK";
case "np_divide": return "VK_NP_DIVIDE";
case "np_multiply": return "VK_NP_MULTIPLY";
case "np_subtract": return "VK_NP_SUBTRACT";
case "np_add": return "VK_NP_ADD";
case "np_period": return "VK_NP_PERIOD";
case "np_enter": return "VK_NP_ENTER";
case "np_0": return "VK_NP_0";
case "np_1": return "VK_NP_1";
case "np_2": return "VK_NP_2";
case "np_3": return "VK_NP_3";
case "np_4": return "VK_NP_4";
case "np_5": return "VK_NP_5";
case "np_6": return "VK_NP_6";
case "np_7": return "VK_NP_7";
case "np_8": return "VK_NP_8";
case "np_9": return "VK_NP_9";
// Digits
case "0": return "VK_0";
case "1": return "VK_1";
case "2": return "VK_2";
case "3": return "VK_3";
case "4": return "VK_4";
case "5": return "VK_5";
case "6": return "VK_6";
case "7": return "VK_7";
case "8": return "VK_8";
case "9": return "VK_9";
// letters - the easy way..
case "a": return "VK_A";
case "b": return "VK_B";
case "c": return "VK_C";
case "d": return "VK_D";
case "e": return "VK_E";
case "f": return "VK_F";
case "g": return "VK_G";
case "h": return "VK_H";
case "i": return "VK_I";
case "j": return "VK_J";
case "k": return "VK_K";
case "l": return "VK_L";
case "m": return "VK_M";
case "n": return "VK_N";
case "o": return "VK_O";
case "p": return "VK_P";
case "q": return "VK_Q";
case "r": return "VK_R";
case "s": return "VK_S";
case "t": return "VK_T";
case "u": return "VK_U";
case "v": return "VK_V";
case "w": return "VK_W";
case "x": return "VK_X";
case "y": return "VK_Y";
case "z": return "VK_Z";
// navigation
case "insert": return "VK_INSERT";
case "home": return "VK_HOME";
case "delete": return "VK_DELETE";
case "end": return "VK_END";
case "pgup": return "VK_PGUP";
case "pgdown": return "VK_PGDN";
case "print": return "VK_PRINTSCREEN";
case "scrolllock": return "VK_SCROLLOCK";
case "pause": return "VK_PAUSE";
// Arrows
case "up": return "VK_UPARROW";
case "down": return "VK_DOWNARROW";
case "left": return "VK_LEFTARROW";
case "right": return "VK_RIGHTARROW";
// non letters
case "escape": return "VK_ESCAPE";
case "minus": return "VK_MINUS";
case "equals": return "VK_EQUALS";
case "backspace": return "VK_BACK";
case "tab": return "VK_TAB";
case "lbracket": return "VK_LBRACKET";
case "rbracket": return "VK_RBRACKET";
case "enter": return "VK_RETURN";
case "capslock": return "VK_CAPSLOCK";
case "backslash": return "VK_BACKSLASH";
case "comma": return "VK_COMMA";
case "period": return "VK_PERIOD";
case "slash": return "VK_SLASH";
case "space": return "VK_SPACE";
case "semicolon": return "VK_SEMICOLON";
case "apostrophe": return "VK_APOSTROPHE";
// all where the lowercase DX name matches the SC name
default:
return "";
}
}
}
}

@ -0,0 +1,118 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using SCJMapper_V2.Actions;
namespace SCJMapper_V2.SCJServer
{
/// <summary>
/// Create SCJoyServer Commands from the selected item
/// </summary>
class SCJScmd
{
/*
Should be something like:
Joystick:
Axis: { "A": {"Direction": "X|Y|Z", "Value": number, "JNo": j, "Ext1": "extstr", "Ext2": "extstr", "Ext3": "extstr"} }
- number => 0..1000 (normalized)
RotAxis: { "R": {"Direction": "X|Y|Z", "Value": number, "JNo": j, "Ext1": "extstr", "Ext2": "extstr", "Ext3": "extstr"} }
- number => 0..1000 (normalized)
Slider: { "S": {"Index": 1|2, "Value": number, "JNo": j, "Ext1": "extstr", "Ext2": "extstr", "Ext3": "extstr"} }
- number => 0..1000 (normalized)
POV: { "P": {"Index": 1|2|3|4, "Direction": "c | u | r | d | l", "JNo": j, "Ext1": "extstr", "Ext2": "extstr", "Ext3": "extstr" } }
- Index n=> 1..MaxPOV (setup of vJoy, max = 4)
- Direction either of the chars (center (released), up, right, donw, left)
Button: { "B": {"Index": n, "Mode": "p|r|t|s|d", "Delay": msec, "JNo": j, "Ext1": "extstr", "Ext2": "extstr", "Ext3": "extstr" } }
- Button Index n => 1..VJ_MAXBUTTON (setup of vJoy - SC supports 60)
- Mode optional - either of the chars (see below)
Keyboard:
Key: { "K": {"VKcodeEx": "keyName", "VKcode": n, "Mode": "p|r|t|s|d", "Modifier": "mod", "Delay": msec, "Ext1": "extstr", "Ext2": "extstr", "Ext3": "extstr" } }
- VKcodeEx "s" either a number n=> 1..255 or a WinUser VK_.. literal (see separate Reference file)
- VKcode n=> 1..255 WinUser VK_.. (see separate Reference file)
if both are found the VKcodeEx item gets priority and the VKcode element is ignored
if none is found the command is ignored
- Mode optional - either of the chars (see below)
- Modifier optional - a set of codes (see below)
- Mode: [mode] (p)ress, (r)elease, (t)ap, (s)hort tap, (d)ouble tap (default=tap - short tap is a tap with almost no delay)
- Modifier: [mod[&mod]] (n)one, (lc)trl, (rc)trl, (la)lt, (ra)lt, (ls)hift, (rs)hift (default=none - concat modifiers with & char)
- Delay: [delay] nnnn milliseconds, optional for Tap and Double Tap (default=150 VJCommand.DEFAULT_DELAY, max 20_000 msec)
- JNo: [joyNumber] >0 Joystick number (default=1)
- Ext1.3: [string] Optional user extensions that must be handled by the caller
e.g.
{ "K": {"VKcodeEx": "VK_B", "Mode": "t", "Modifier": "lc"}}
{ "B": {"Index": 21 }}
*/
private static string GetKeyCommand( ActionTreeNode node )
{
string fullPath = node.FullPath;
string action = node.Action;
string command = node.Command.Replace("kb1_",""); // needs some fiddling..
// kb1_ralt+l
string[] e = command.Split( new char[] { '+' } );
// a number of modifiers and the key char
string key = KbdCodes.FromSCKeyboardCmd( e[e.Length-1] );
string mod = "";
for ( int i= 0; i<e.Length-1; i++ ) {
mod += KbdCodes.FromSCKeyboardMod( e[i] );
}
if ( !string.IsNullOrEmpty( mod ) ) mod = mod.Substring( 0, mod.Length - 1 ); // kill last &
string cmd = $"{fullPath}\"\n {{ \"K\": {{ \"VKCodeEx\": \"{key}\", \"Mode\": \"t\", \"Modifier\": \"{mod}\" }}}}\n";
return cmd;
}
private static string GetJoyCommand( ActionTreeNode node )
{
string fullPath = node.FullPath;
string command = node.Command;
string action = Devices.Joystick.JoystickCls.ActionFromJsCommand(command);
int jsN = Devices.Joystick.JoystickCls.JSNum( command );
string cmd = "";
string jscmd = JoystickCodes.FromJsAction( action, jsN );
if ( !string.IsNullOrEmpty( jscmd ) ) {
cmd = $"{fullPath}\"\n {jscmd}\n";
}
return cmd;
}
/// <summary>
/// Create a command for SCJoyServer use
/// </summary>
/// <param name="node">The clicked node</param>
/// <returns>A string</returns>
public static string GetCommand( TreeNode node )
{
if ( node is ActionTreeNode ) {
var aNode = node as ActionTreeNode;
if ( !aNode.IsMappedAction ) return "";
if ( aNode.IsDisabledAction ) return "";
if ( aNode.IsKeyboardAction ) {
return GetKeyCommand( aNode );
}else if ( aNode.IsJoystickAction ) {
return GetJoyCommand( aNode );
}
else {
return "";
}
}
return "";
}
}
}

@ -44,8 +44,7 @@ namespace SCJMapper_V2.Actions
// call when a selection is updated (finds the items in the master tree for the currently selected Ctrl)
private void NodeSelected()
{
string action = ""; string ctrl = "";
SelectedActionCtrl( out action, out ctrl );
SelectedActionCtrl( out string action, out string ctrl );
NodeSelected( action, ctrl );
}
@ -263,7 +262,7 @@ namespace SCJMapper_V2.Actions
ActionTreeNode matn = FindMasterAction( (ActionTreeNode)Ctrl.SelectedNode );
ActionCls ac = FindActionObject( matn.Parent.Name, matn.Name ); // the related action
// make new items
ActionTreeInputNode matin = new ActionTreeInputNode( "UNDEF" ) {
var matin = new ActionTreeInputNode( "UNDEF" ) {
ImageKey = "Add"
};
matin.Update( matn );
@ -423,7 +422,7 @@ namespace SCJMapper_V2.Actions
// traverse the master tree and build the GUI tree from it
foreach ( ActionTreeNode tn in m_MasterTree.Nodes ) {
ActionTreeNode tnMap = new ActionTreeNode( tn ); Ctrl.Nodes.Add( tnMap ); // copy level 0 nodes
var tnMap = new ActionTreeNode( tn ); Ctrl.Nodes.Add( tnMap ); // copy level 0 nodes
if ( topNode == null ) topNode = tnMap;
// have to search nodes of nodes
@ -433,9 +432,9 @@ namespace SCJMapper_V2.Actions
; // 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
var tnAction = new ActionTreeNode( stn ); tnMap.Nodes.Add( tnAction ); // copy level 1 nodes
foreach ( ActionTreeInputNode istn in stn.Nodes ) {
ActionTreeInputNode tnActionInput = new ActionTreeInputNode( istn ); tnAction.Nodes.Add( tnActionInput ); // copy level 2 nodes
var tnActionInput = new ActionTreeInputNode( istn ); tnAction.Nodes.Add( tnActionInput ); // copy level 2 nodes
}
allHidden = false;
}
@ -507,7 +506,7 @@ namespace SCJMapper_V2.Actions
m_MasterTree.Nodes.Clear( );
// read the action items into the TreeView
DProfileReader dpReader = new DProfileReader( ); // we may read a profile
var dpReader = new DProfileReader( ); // we may read a profile
TextReader txReader = null;
dpReader.fromXML( SCDefaultProfile.DefaultProfile( ) );
@ -650,7 +649,7 @@ namespace SCJMapper_V2.Actions
/// <returns>A ActivationModes list - first element is the default, second the selected Mode</returns>
public ActivationModes ActivationModeSelectedItem()
{
ActivationModes am = new ActivationModes( ActivationMode.Default, ActivationMode.Default );// policy: get the default first, then the attached one - dummy answer
var am = new ActivationModes( ActivationMode.Default, ActivationMode.Default );// policy: get the default first, then the attached one - dummy answer
if ( Ctrl.SelectedNode == null ) return am; // ERROR exit
if ( ( Ctrl.SelectedNode.Level == 0 ) || ( Ctrl.SelectedNode.Level > 2 ) ) return am;
@ -659,7 +658,7 @@ namespace SCJMapper_V2.Actions
// has a parent - must be level 1 or 2
if ( Ctrl.SelectedNode.Level == 1 ) {
// this is the main node with Action Cmd
ActionTreeNode atn = ( Ctrl.SelectedNode as ActionTreeNode ); // the treenode from a level 1
var atn = ( Ctrl.SelectedNode as ActionTreeNode ); // the treenode from a level 1
ActionCls ac = FindActionObject( atn.Parent.Name, atn.Name ); if ( ac == null ) return am; // ERROR exit
// ActionCommandCls acc = ac.FindActionInputObject( ActionTreeNode.CommandFromNodeText( atn.Text ) ); if ( acc == null ) return am; // ERROR exit
ActionCommandCls acc = ac.FindActionInputObject( atn.Command ); if ( acc == null ) return am; // ERROR exit
@ -668,8 +667,8 @@ namespace SCJMapper_V2.Actions
}
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
ActionTreeNode atn = ( Ctrl.SelectedNode as ActionTreeNode ); // the treenode from a level 1
var patn = ( Ctrl.SelectedNode.Parent as ActionTreeNode ); // the parent treenode
var atn = ( Ctrl.SelectedNode as ActionTreeNode ); // the treenode from a level 1
// the related action
ActionCls ac = FindActionObject( patn.Parent.Name, patn.Name ); if ( ac == null ) return am; // ERROR exit
ActionCommandCls acc = ac.FindActionInputObject( atn.Index ); if ( acc == null ) return am; // ERROR exit
@ -693,7 +692,7 @@ namespace SCJMapper_V2.Actions
// has a parent - must be level 1 or 2
if ( Ctrl.SelectedNode.Level == 1 ) {
// this is the main node with Action Cmd
ActionTreeNode atn = ( Ctrl.SelectedNode as ActionTreeNode ); // the treenode from a level 1
var atn = ( Ctrl.SelectedNode as ActionTreeNode ); // the treenode from a level 1
ActionCls ac = FindActionObject( atn.Parent.Name, atn.Name ); if ( ac == null ) return; // ERROR exit
ActionCommandCls acc = ac.FindActionInputObject( atn.Command ); if ( acc == null ) return; // ERROR exit
// new am is either a named one or the Default from Profile (which is the default from the Action due to multiTaps..)
@ -710,8 +709,8 @@ namespace SCJMapper_V2.Actions
}
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
ActionTreeNode atn = ( Ctrl.SelectedNode as ActionTreeNode ); // the treenode from a level 2
var patn = ( Ctrl.SelectedNode.Parent as ActionTreeNode ); // the parent treenode from a level 2
var atn = ( Ctrl.SelectedNode as ActionTreeNode ); // the treenode from a level 2
// the related action
ActionCls ac = FindActionObject( patn.Parent.Name, patn.Name ); if ( ac == null ) return; // ERROR exit
// find it in the sublist
@ -745,7 +744,7 @@ namespace SCJMapper_V2.Actions
// has a parent - must be level 1 or 2
if ( Ctrl.SelectedNode.Level == 1 ) {
// this is the main node with Action Cmd
ActionTreeNode atn = ( Ctrl.SelectedNode as ActionTreeNode ); // the treenode from a level 1
var atn = ( Ctrl.SelectedNode as ActionTreeNode ); // the treenode from a level 1
ActionCls ac = FindActionObject( atn.Parent.Name, atn.Name ); // the related action in an actionmap
if ( ac == null ) return false; // ERROR exit
if ( checkKind && ( ac.ActionDevice != inKind ) ) return false; // ERROR exit
@ -759,8 +758,8 @@ namespace SCJMapper_V2.Actions
}
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
ActionTreeInputNode atn = ( Ctrl.SelectedNode as ActionTreeInputNode ); // the treenode from a level 2
var patn = ( Ctrl.SelectedNode.Parent as ActionTreeNode ); // the parent treenode from a level 2
var atn = ( Ctrl.SelectedNode as ActionTreeInputNode ); // the treenode from a level 2
if ( string.IsNullOrEmpty( input ) )
atn.Action = "UNDEF"; // apply UNDEF
else
@ -874,10 +873,10 @@ namespace SCJMapper_V2.Actions
foreach ( ActionMapCls acm in ActionMaps ) {
if ( IgnoreMaps.Contains( "," + acm.MapName + "," ) ) break; // next
try {
ActionTreeNode mtn = (ActionTreeNode)m_MasterTree.Nodes[acm.MapName]; // get the map node
var mtn = (ActionTreeNode)m_MasterTree.Nodes[acm.MapName]; // get the map node
// find the item to reload into the treeview
foreach ( ActionCls ac in acm ) {
ActionTreeNode matn = (ActionTreeNode)mtn.Nodes[ac.Key]; // get the action node
var matn = (ActionTreeNode)mtn.Nodes[ac.Key]; // get the action node
bool first = true;
// refresh commands
foreach ( ActionCommandCls acc in ac.InputList ) {
@ -891,7 +890,7 @@ namespace SCJMapper_V2.Actions
}
else {
// have to recreate the action child nodes
ActionTreeInputNode matin = new ActionTreeInputNode( ac.ActionName ) { ImageKey = "Add" };
var matin = new ActionTreeInputNode( ac.ActionName ) { ImageKey = "Add" };
matin.Update( matn ); matin.Command = "";
acc.NodeIndex = matin.Index; // assign visual reference
matn.Nodes.Add( matin ); // add to master tree
@ -1022,7 +1021,7 @@ namespace SCJMapper_V2.Actions
/// <param name="input">The input string to find</param>
public List<string> GetAllActions( string input )
{
List<string> ret = new List<string>( );
var ret = new List<string>( );
if ( string.IsNullOrEmpty( input ) ) return ret; // nothing to find here...
if ( Act.IsDisabledInput( input ) ) return ret; // nothing to find here...
@ -1048,7 +1047,7 @@ namespace SCJMapper_V2.Actions
/// <param name="input">The input string to find</param>
public List<string> ListAllActions( string input )
{
List<string> ret = new List<string>( );
var ret = new List<string>( );
if ( string.IsNullOrEmpty( input ) ) return ret; // nothing to find here...
if ( Act.IsDisabledInput( input ) ) return ret; // nothing to find here...
@ -1128,7 +1127,12 @@ namespace SCJMapper_V2.Actions
}
if ( ( !used ) && ac.DefBinding == input ) {
aMode = string.Format( "{0};{1}", ac.DefActivationMode.Name, ac.DefActivationMode.MultiTap );
rtf.Write( Tx.Translate( "mapProfile" ) ); rtf.WriteTab( ac.ActionName ); rtf.WriteTab( acm.MapName ); rtf.WriteTab( aMode ); rtf.WriteLn( );
rtf.Write( Tx.Translate( "mapProfile" ) );
rtf.WriteTab( SCUiText.Instance.Text( ac.ActionName ) );
rtf.WriteTab( SCUiText.Instance.Text( acm.MapName ) );
rtf.WriteTab( aMode );
rtf.WriteLn( );
rtf.WriteLn( );
}
}
@ -1241,7 +1245,7 @@ namespace SCJMapper_V2.Actions
// has a parent - must be level 1 or 2
if ( Ctrl.SelectedNode.Level == 1 ) {
// this is the main node with Action Cmd
ActionTreeNode atn = ( Ctrl.SelectedNode as ActionTreeNode ); // the treenode from a level 1
var atn = ( Ctrl.SelectedNode as ActionTreeNode ); // the treenode from a level 1
ActionCls ac = FindActionObject( atn.Parent.Name, atn.Name ); // the related action in an actionmap
if ( ac == null ) return ""; // ERROR exit
ActionCommandCls acc = ac.FindActionInputObject( atn.Command ); if ( acc == null ) return ""; // ERROR exit
@ -1252,8 +1256,8 @@ namespace SCJMapper_V2.Actions
}
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
ActionTreeNode atn = ( Ctrl.SelectedNode as ActionTreeNode ); // the treenode from a level 2
var patn = ( Ctrl.SelectedNode.Parent as ActionTreeNode ); // the parent treenode from a level 2
var atn = ( Ctrl.SelectedNode as ActionTreeNode ); // the treenode from a level 2
ActionCls ac = FindActionObject( patn.Parent.Name, patn.Name ); // the related action in an actionmap
if ( ac == null ) return ""; // ERROR exit
ActionCommandCls acc = ac.FindActionInputObject( atn.Index );
@ -1273,7 +1277,7 @@ namespace SCJMapper_V2.Actions
/// <returns>returns a null if no changes have been found</returns>
public ActionTree UpdateFromDataSet( DS_ActionMaps dsa )
{
ActionTree nTree = new ActionTree( ); // just a copy
var nTree = new ActionTree( ); // just a copy
// full copy from 'this'
nTree.m_MasterTree = this.m_MasterTree;
nTree.m_tvCtrlRef = this.m_tvCtrlRef;
@ -1344,7 +1348,7 @@ namespace SCJMapper_V2.Actions
if ( jsNum >= 0 ) {
sItem.DeviceName = ActionMaps.jsN[jsNum];
sItem.DeviceProdGuid = ActionMaps.jsN_prodGUID[jsNum];
sItem.InputType = $"J{JoystickCls.JSNum( acc.DevInput )}";
sItem.InputType = $"J{JoystickCls.JSNum( acc.DevInput )}";
}
break;
case Act.ActionDevice.AD_Gamepad:
@ -1420,6 +1424,38 @@ namespace SCJMapper_V2.Actions
return repList;
}
/// <summary>
/// Reports a list of all mapped items as Json Obj
/// Format: see Json.JExport
/// </summary>
/// <returns>Json Export obj</returns>
public Json.JExport ReportActionsJson()
{
log.Debug( "ReportActionsJson - Entry" );
var jexport = new Json.JExport( );
foreach ( ActionMapCls acm in ActionMaps ) {
var jamap = new Json.JActionmap( ) { Actionmap = acm.MapName, ActionmapTX = SCUiText.Instance.Text( acm.MapName ) };
foreach ( ActionCls ac in acm ) {
var jac = new Json.JAction( ) { Action = ac.ActionName, ActionTX = SCUiText.Instance.Text( ac.ActionName ) };
foreach ( ActionCommandCls acc in ac.InputList ) {
if ( !Act.IsDisabledInput( acc.Input ) ) {
if ( !string.IsNullOrEmpty( acc.Input ) ) {
var jc = new Json.JCommand( ) { Input = $"{acc.DevID}_{acc.Input}" };
jac.Rebind.Add( jc );
}
}
}
if ( jac.Rebind.Count > 0 )
jamap.Actions.Add( jac );
}
if ( jamap.Actions.Count > 0 )
jexport.Maps.Add( jamap );
}
return jexport;
}
/// <summary>
/// Reports a list of the mapped items as XML (not CIG style)
/// </summary>
@ -1430,27 +1466,27 @@ namespace SCJMapper_V2.Actions
/*
Format:
<actions>
<actionmap name="mapname">
<action name="actionname">
<actionmap AMname="mapname" AMnameTX="translated_mapname" >
<action Aname="actionname" AnameTX="translated_actionname">
<rebind input="devID_command" />
</action>
</actionmap>
</actions>
e.g.
<actions>
<actionmap name="spaceship_movement">
<action name="v_pitch">
<actionmap AMname="spaceship_movement" AMnameTX="Flight - Movement" >
<action Aname="v_pitch" AnameTX="Pitch">
<rebind input="js1_y" />
<rebind input="mo1_maxis_y" />
</action>
</actionmap>
</actions>
*/
string repList = "";
repList = string.Format( "<actions>\n" );
repList = $"<actions>\n";
foreach ( ActionMapCls acm in ActionMaps ) {
repList += string.Format( "\t<actionmap AMname=\"{0}\">\n", acm.MapName );
repList += $"\t<actionmap AMname=\"{acm.MapName}\" AMnameTX=\"{SCUiText.Instance.Text( acm.MapName )}\">\n";
// restart output
string actionName = "", devRep = "";
foreach ( ActionCls ac in acm ) {
@ -1462,9 +1498,9 @@ namespace SCJMapper_V2.Actions
// new action
// report
if ( !string.IsNullOrEmpty( devRep ) ) {
repList += string.Format( "\t\t<action Aname=\"{0}\">\n", actionName );
repList += $"\t\t<action Aname=\"{actionName}\" AnameTX=\"{SCUiText.Instance.Text( actionName )}\">\n";
repList += devRep;
repList += string.Format( "\t\t</action>\n" );
repList += $"\t\t</action>\n";
}
// and reset
actionName = ac.ActionName; // new one
@ -1473,20 +1509,20 @@ namespace SCJMapper_V2.Actions
foreach ( ActionCommandCls acc in ac.InputList ) {
if ( !Act.IsDisabledInput( acc.Input ) ) {
if ( !string.IsNullOrEmpty( acc.Input ) ) {
devRep += string.Format( "\t\t\t<rebind input=\"{0}_{1}\" />\n", acc.DevID, acc.Input );
devRep += $"\t\t\t<rebind input=\"{acc.DevID}_{acc.Input}\" />\n";
}
}
}
}
// have to report the last one
if ( !string.IsNullOrEmpty( devRep ) ) {
repList += string.Format( "\t\t<action Aname=\"{0}\">\n", actionName );
repList += $"\t\t<action Aname=\"{actionName}\" AnameTX=\"{SCUiText.Instance.Text( actionName )}\">\n";
repList += devRep;
repList += string.Format( "\t\t</action>\n" );
repList += $"\t\t</action>\n";
}
repList += string.Format( "\t</actionmap>\n" );
repList += $"\t</actionmap>\n";
}
repList += string.Format( "</actions>\n" );
repList += $"</actions>\n";
return repList;
}
@ -1503,11 +1539,11 @@ namespace SCJMapper_V2.Actions
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 += $"** js{i + 1} = {ActionMaps.jsN[i]}\n";
}
// now the mapped actions
repList += string.Format( "\n" );
repList += $"\n";
repList += "actionmap;action"; // col description line
if ( listModifiers ) {
@ -1540,17 +1576,16 @@ namespace SCJMapper_V2.Actions
// dump if not empty
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
rep += $"{kbA};{moA};{xbA};{jsA[0]};{jsA[1]};{jsA[2]};{jsA[3]}\n"; // should be one line now
repList += string.Format( "{0}", rep ); // add to list
}
// action changed - restart collection
action = ac.ActionName;
if ( listProfileNames ) {
rep = string.Format( "{0};{1};", acm.MapName, ac.ActionName ); // actionmap; action
rep = $"{acm.MapName};{ac.ActionName};"; // actionmap; action
}
else {
rep = string.Format( "{0};{1};", SCUiText.Instance.Text( acm.MapName ),
SCUiText.Instance.Text( ac.ActionName ) ); // actionmap; action
rep = $"{SCUiText.Instance.Text( acm.MapName )};{SCUiText.Instance.Text( ac.ActionName )};"; // actionmap; action
}
// note: don't add trailing semicolons as the are applied in the output formatting
if ( listModifiers ) {
@ -1569,29 +1604,30 @@ namespace SCJMapper_V2.Actions
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}", acc.ActivationMode.Name, acc.ActivationMode.MultiTap );
string aMode = $"modified;{acc.ActivationMode.Name};{acc.ActivationMode.MultiTap}";
// change if they are default mappings
if ( acc.DevInput == ac.DefBinding ) aTag = "default";
if ( acc.ActivationMode == ActivationMode.Default ) aMode = string.Format( "default;{0};{1}", ac.DefActivationMode.Name, ac.DefActivationMode.MultiTap );
if ( acc.ActivationMode == ActivationMode.Default )
aMode = $"default;{ac.DefActivationMode.Name};{ac.DefActivationMode.MultiTap}";
if ( listModifiers ) {
switch ( Act.ADeviceFromDevID( acc.DevID ) ) {
case Act.ActionDevice.AD_Keyboard: kbA = string.Format( "{0};{1};{2}", aTag, acc.Input, aMode ); break;
case Act.ActionDevice.AD_Mouse: moA = string.Format( "{0};{1};{2}", aTag, acc.Input, aMode ); break;
case Act.ActionDevice.AD_Keyboard: kbA = $"{aTag};{acc.Input};{aMode}"; break;
case Act.ActionDevice.AD_Mouse: moA = $"{aTag};{acc.Input};{aMode}"; break;
case Act.ActionDevice.AD_Joystick:
int jsNum = JoystickCls.JSNum( acc.DevInput ) - 1;
if ( jsNum >= 0 ) jsA[jsNum] = string.Format( "{0};{1};{2}", aTag, acc.Input, aMode ); break;
case Act.ActionDevice.AD_Gamepad: xbA = string.Format( "{0};{1};{2}", aTag, acc.Input, aMode ); break;
if ( jsNum >= 0 ) jsA[jsNum] = $"{aTag};{acc.Input};{aMode}"; break;
case Act.ActionDevice.AD_Gamepad: xbA = $"{aTag};{acc.Input};{aMode}"; break;
default: break;
}//switch
}
else {
switch ( Act.ADeviceFromDevID( acc.DevID ) ) {
case Act.ActionDevice.AD_Keyboard: kbA = string.Format( "{0};{1}", aTag, acc.Input ); break;
case Act.ActionDevice.AD_Mouse: moA = string.Format( "{0};{1}", aTag, acc.Input ); break;
case Act.ActionDevice.AD_Keyboard: kbA = $"{aTag};{acc.Input}"; break;
case Act.ActionDevice.AD_Mouse: moA = $"{aTag};{acc.Input}"; break;
case Act.ActionDevice.AD_Joystick:
int jsNum = JoystickCls.JSNum( acc.DevInput ) - 1;
if ( jsNum >= 0 ) jsA[jsNum] = string.Format( "{0};{1}", aTag, acc.Input ); break;
case Act.ActionDevice.AD_Gamepad: xbA = string.Format( "{0};{1}", aTag, acc.Input ); break;
if ( jsNum >= 0 ) jsA[jsNum] = $"{aTag};{acc.Input}"; break;
case Act.ActionDevice.AD_Gamepad: xbA = $"{aTag};{acc.Input}"; break;
default: break;
}//switch
}
@ -1602,8 +1638,8 @@ namespace SCJMapper_V2.Actions
}
// 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
rep += $"{kbA};{moA};{xbA};{jsA[0]};{jsA[1]};{jsA[2]};{jsA[3]}\n"; // should be one line now
repList += $"{rep}"; // add to list
return repList;
}

Loading…
Cancel
Save