V 2.35 - BETA Build 69 (ready to test)

- add - provide CIG asset texts/translations for actions and maps
  (use Settings to choose - for now only French and German are in but have no translations
   for English not all have a proper text - may not be used in the game ??)
- add - tooltips for profile action names in treeview (enable in Settings)
- add - mouse tuning items (curve, expo, invert)
- improvement - cache CIG assets into the app/Storage folder, reads from p4k file only if those are updated
- fix - window should always be visible on startup now
- internal cleanup - to many to list
pull/104/head
bm98 7 years ago
parent 158349474b
commit 3c7a628795

Binary file not shown.

@ -320,6 +320,14 @@ namespace SCJMapper_V2
set { this["UseLanguage"] = value; } set { this["UseLanguage"] = value; }
} }
[UserScopedSetting( )]
[DefaultSettingValue( "False" )]
public bool ShowTreeTips
{
get { return (bool)this["ShowTreeTips"]; }
set { this["ShowTreeTips"] = value; }
}
//**** Form Table //**** Form Table

@ -27,6 +27,8 @@ namespace SCJMapper_V2.Devices
static public string DevInput( string input ) { return input; } static public string DevInput( string input ) { return input; }
static public bool DevMatch( string devInput ) { return false; } static public bool DevMatch( string devInput ) { return false; }
static public bool IsAxisCommand( string command ) { return false; }
/// <summary> /// <summary>
/// Return the CIG instance number (which is the jsN number) - 1 based /// Return the CIG instance number (which is the jsN number) - 1 based
/// </summary> /// </summary>

@ -92,6 +92,18 @@ namespace SCJMapper_V2.Devices.Gamepad
return devInput.StartsWith( DeviceID ); return devInput.StartsWith( DeviceID );
} }
/// <summary>
/// Returns true if a command is an axis command
/// </summary>
/// <param name="command">The command string</param>
/// <returns>True if it is an axis command</returns>
static public new bool IsAxisCommand( string command )
{
string cLower = command.ToLowerInvariant( );
return ( cLower.EndsWith( "_thumblx" ) || cLower.EndsWith( "_thumbly" )
|| cLower.EndsWith( "_thumbrx" ) || cLower.EndsWith( "_thumbry" ) );
}
const string xil_pattern = @"^xi_thumb[lr][xy]$"; const string xil_pattern = @"^xi_thumb[lr][xy]$";
static Regex rgx_xil = new Regex( xil_pattern, RegexOptions.IgnoreCase ); static Regex rgx_xil = new Regex( xil_pattern, RegexOptions.IgnoreCase );

@ -112,6 +112,23 @@ namespace SCJMapper_V2.Devices.Joystick
return IsJsN( devInput ); return IsJsN( devInput );
} }
/// <summary>
/// Returns true if a command is an axis command
/// </summary>
/// <param name="command">The command string</param>
/// <returns>True if it is an axis command</returns>
static public new bool IsAxisCommand( string command )
{
string cLower = command.ToLowerInvariant( );
if ( IsJsN( command ) )
return ( cLower.EndsWith( "_x" ) || cLower.EndsWith( "_rotx" ) || cLower.EndsWith( "_throttlex" )
|| cLower.EndsWith( "_y" ) || cLower.EndsWith( "_roty" ) || cLower.EndsWith( "_throttley" )
|| cLower.EndsWith( "_Z" ) || cLower.EndsWith( "_rotz" ) || cLower.EndsWith( "_throttlez" )
|| cLower.EndsWith( "_slider1" ) || cLower.EndsWith( "_slider2" ) );
else
return false;
}
/// <summary> /// <summary>
/// Returns the jsN part from a joystick command /// Returns the jsN part from a joystick command
@ -139,9 +156,6 @@ namespace SCJMapper_V2.Devices.Joystick
return sAction; return sAction;
} }
/// <summary> /// <summary>
/// Returns properly formatted jsn_ string (jsx_ if the input is UNKNOWN) /// Returns properly formatted jsn_ string (jsx_ if the input is UNKNOWN)
/// </summary> /// </summary>
@ -153,7 +167,6 @@ namespace SCJMapper_V2.Devices.Joystick
return JsUnknown; return JsUnknown;
} }
/// <summary> /// <summary>
/// Extract the JS number from a JS string (jsx_ returns 0 - UNKNOWN) /// Extract the JS number from a JS string (jsx_ returns 0 - UNKNOWN)
/// AC 1.1 can be something as "rctrl+js2_nn" /// AC 1.1 can be something as "rctrl+js2_nn"
@ -172,13 +185,15 @@ namespace SCJMapper_V2.Devices.Joystick
retNum = JSnum_UNKNOWN; // neither double nor single digit found retNum = JSnum_UNKNOWN; // neither double nor single digit found
} }
} }
} else if ( jsTag.StartsWith( "js" ) ) { }
else if ( jsTag.StartsWith( "js" ) ) {
if ( !int.TryParse( ( jsTag + "XX" ).Substring( 2, 2 ), out retNum ) ) { // cheap .. test for double digits ( have to extend the string to parse) if ( !int.TryParse( ( jsTag + "XX" ).Substring( 2, 2 ), out retNum ) ) { // cheap .. test for double digits ( have to extend the string to parse)
if ( !int.TryParse( jsTag.Substring( 2, 1 ), out retNum ) ) { // now for only single ones if ( !int.TryParse( jsTag.Substring( 2, 1 ), out retNum ) ) { // now for only single ones
retNum = JSnum_UNKNOWN; // neither double nor single digit found retNum = JSnum_UNKNOWN; // neither double nor single digit found
} }
} }
} else { }
else {
retNum = JSnum_UNKNOWN; // neither double nor single digit found retNum = JSnum_UNKNOWN; // neither double nor single digit found
} }
} }
@ -223,11 +238,13 @@ namespace SCJMapper_V2.Devices.Joystick
int inJsN = JSNum( input ); int inJsN = JSNum( input );
if ( inJsN < 10 ) { if ( inJsN < 10 ) {
return input.Replace( input.Substring( 0, 3 ), JSTag( newJsN ) ); return input.Replace( input.Substring( 0, 3 ), JSTag( newJsN ) );
} else { }
else {
// 2 digit input JsN // 2 digit input JsN
return input.Replace( input.Substring( 0, 4 ), JSTag( newJsN ) ); return input.Replace( input.Substring( 0, 4 ), JSTag( newJsN ) );
} }
} else { }
else {
return input; return input;
} }
} }
@ -255,7 +272,8 @@ namespace SCJMapper_V2.Devices.Joystick
int inJsN = JSNum( control ); int inJsN = JSNum( control );
if ( inJsN < 10 ) { if ( inJsN < 10 ) {
retVal = retVal.Insert( 4, "throttle" ); retVal = retVal.Insert( 4, "throttle" );
} else { }
else {
// 2 digit input JsN // 2 digit input JsN
retVal = retVal.Insert( 5, "throttle" ); retVal = retVal.Insert( 5, "throttle" );
} }
@ -316,7 +334,7 @@ namespace SCJMapper_V2.Devices.Joystick
private bool[] m_modifierButtons; private bool[] m_modifierButtons;
private UC_JoyPanel m_jPanel = null; // the GUI panel private UC_JoyPanel m_jPanel = null; // the GUI panel
internal int MyTabPageIndex = -1; internal int MyTabPageIndex = -1;
/// <summary> /// <summary>
/// Returns a CryEngine compatible hat direction /// Returns a CryEngine compatible hat direction
@ -382,7 +400,7 @@ namespace SCJMapper_V2.Devices.Joystick
public override List<string> AnalogCommands public override List<string> AnalogCommands
{ {
get { get {
List<string> cmds = new List<string>(); List<string> cmds = new List<string>( );
try { try {
// Enumerate all the objects on the device. // Enumerate all the objects on the device.
@ -406,7 +424,8 @@ namespace SCJMapper_V2.Devices.Joystick
} }
} }
} }
} catch ( Exception ex ) { }
catch ( Exception ex ) {
log.Error( "AnalogCommands - Get JS Objects failed", ex ); log.Error( "AnalogCommands - Get JS Objects failed", ex );
} }
cmds.Sort( ); cmds.Sort( );
@ -445,7 +464,7 @@ namespace SCJMapper_V2.Devices.Joystick
m_device = device; m_device = device;
m_hwnd = hwnd; m_hwnd = hwnd;
m_joystickNumber = joystickNum; // this remains fixed m_joystickNumber = joystickNum; // this remains fixed
m_xmlInstance = joystickNum+1; // initial assignment (is 1 based..) m_xmlInstance = joystickNum + 1; // initial assignment (is 1 based..)
m_jPanel = panel; m_jPanel = panel;
MyTabPageIndex = tabIndex; MyTabPageIndex = tabIndex;
Activated_low = false; Activated_low = false;
@ -484,7 +503,8 @@ namespace SCJMapper_V2.Devices.Joystick
// Update the controls to reflect what objects the device supports. // Update the controls to reflect what objects the device supports.
UpdateControls( d ); UpdateControls( d );
} }
} catch ( Exception ex ) { }
catch ( Exception ex ) {
log.Error( "Get JS Objects failed", ex ); log.Error( "Get JS Objects failed", ex );
} }
@ -499,7 +519,7 @@ namespace SCJMapper_V2.Devices.Joystick
/// <summary> /// <summary>
/// Shutdown device access /// Shutdown device access
/// </summary> /// </summary>
public override void FinishDX( ) public override void FinishDX()
{ {
if ( null != m_device ) { if ( null != m_device ) {
log.DebugFormat( "Release DirectInput device: {0}", m_device.Information.ProductName ); log.DebugFormat( "Release DirectInput device: {0}", m_device.Information.ProductName );
@ -517,7 +537,7 @@ namespace SCJMapper_V2.Devices.Joystick
ApplySettings_low( ); ApplySettings_low( );
} }
private void ApplySettings_low( ) private void ApplySettings_low()
{ {
AppSettings.Instance.Reload( ); AppSettings.Instance.Reload( );
@ -571,7 +591,7 @@ namespace SCJMapper_V2.Devices.Joystick
if ( !ValidModifier( modS ) ) return; // sanity.. if ( !ValidModifier( modS ) ) return; // sanity..
// check if it is applicable // check if it is applicable
int jsn = JSNum(modS); int jsn = JSNum( modS );
if ( jsn == m_joystickNumber ) { if ( jsn == m_joystickNumber ) {
// format is jsN_buttonM i.e. get button number at the end // format is jsN_buttonM i.e. get button number at the end
int bNr = 0; int bNr = 0;
@ -656,7 +676,7 @@ namespace SCJMapper_V2.Devices.Joystick
/// Find the last change the user did on that device /// Find the last change the user did on that device
/// </summary> /// </summary>
/// <returns>The last action as CryEngine compatible string</returns> /// <returns>The last action as CryEngine compatible string</returns>
public override string GetLastChange( ) public override string GetLastChange()
{ {
int[] slider = m_state.Sliders; int[] slider = m_state.Sliders;
int[] pslider = m_prevState.Sliders; int[] pslider = m_prevState.Sliders;
@ -740,7 +760,7 @@ namespace SCJMapper_V2.Devices.Joystick
/// <summary> /// <summary>
/// Show the current props in the GUI /// Show the current props in the GUI
/// </summary> /// </summary>
private void UpdateUI( ) private void UpdateUI()
{ {
// This function updated the UI with joystick state information. // This function updated the UI with joystick state information.
string strText = null; string strText = null;
@ -793,18 +813,21 @@ namespace SCJMapper_V2.Devices.Joystick
// Poll the device for info. // Poll the device for info.
try { try {
m_device.Poll( ); m_device.Poll( );
} catch ( SharpDXException e ) { }
catch ( SharpDXException e ) {
if ( ( e.ResultCode == ResultCode.NotAcquired ) || ( e.ResultCode == ResultCode.InputLost ) ) { if ( ( e.ResultCode == ResultCode.NotAcquired ) || ( e.ResultCode == ResultCode.InputLost ) ) {
// Check to see if either the app needs to acquire the device, or // Check to see if either the app needs to acquire the device, or
// if the app lost the device to another process. // if the app lost the device to another process.
try { try {
// Acquire the device. // Acquire the device.
m_device.Acquire( ); m_device.Acquire( );
} catch ( SharpDXException ) { }
catch ( SharpDXException ) {
// Failed to acquire the device. This could be because the app doesn't have focus. // Failed to acquire the device. This could be because the app doesn't have focus.
return; // EXIT unaquired return; // EXIT unaquired
} }
} else { }
else {
log.Error( "Unexpected Poll Exception", e ); log.Error( "Unexpected Poll Exception", e );
return; // EXIT see ex code return; // EXIT see ex code
} }
@ -851,18 +874,21 @@ namespace SCJMapper_V2.Devices.Joystick
// Poll the device for info. // Poll the device for info.
try { try {
m_device.Poll( ); m_device.Poll( );
} catch ( SharpDXException e ) { }
catch ( SharpDXException e ) {
if ( ( e.ResultCode == ResultCode.NotAcquired ) || ( e.ResultCode == ResultCode.InputLost ) ) { if ( ( e.ResultCode == ResultCode.NotAcquired ) || ( e.ResultCode == ResultCode.InputLost ) ) {
// Check to see if either the app needs to acquire the device, or // Check to see if either the app needs to acquire the device, or
// if the app lost the device to another process. // if the app lost the device to another process.
try { try {
// Acquire the device. // Acquire the device.
m_device.Acquire( ); m_device.Acquire( );
} catch ( SharpDXException ) { }
catch ( SharpDXException ) {
// Failed to acquire the device. This could be because the app doesn't have focus. // Failed to acquire the device. This could be because the app doesn't have focus.
return; // EXIT unaquired return; // EXIT unaquired
} }
} else { }
else {
log.Error( "Unexpected Poll Exception", e ); log.Error( "Unexpected Poll Exception", e );
return; // EXIT see ex code return; // EXIT see ex code
} }
@ -880,8 +906,9 @@ namespace SCJMapper_V2.Devices.Joystick
try { try {
PropertyInfo axisProperty = typeof( JoystickState ).GetProperty( axies[cmd] ); PropertyInfo axisProperty = typeof( JoystickState ).GetProperty( axies[cmd] );
data = ( int )axisProperty.GetValue( this.m_state, null ); data = (int)axisProperty.GetValue( this.m_state, null );
} catch { }
catch {
data = 0; data = 0;
} }
} }
@ -892,7 +919,7 @@ namespace SCJMapper_V2.Devices.Joystick
/// <summary> /// <summary>
/// Collect the current data from the device /// Collect the current data from the device
/// </summary> /// </summary>
public override void GetData( ) public override void GetData()
{ {
// Make sure there is a valid device. // Make sure there is a valid device.
if ( null == m_device ) if ( null == m_device )
@ -901,18 +928,21 @@ namespace SCJMapper_V2.Devices.Joystick
// Poll the device for info. // Poll the device for info.
try { try {
m_device.Poll( ); m_device.Poll( );
} catch ( SharpDXException e ) { }
catch ( SharpDXException e ) {
if ( ( e.ResultCode == ResultCode.NotAcquired ) || ( e.ResultCode == ResultCode.InputLost ) ) { if ( ( e.ResultCode == ResultCode.NotAcquired ) || ( e.ResultCode == ResultCode.InputLost ) ) {
// Check to see if either the app needs to acquire the device, or // Check to see if either the app needs to acquire the device, or
// if the app lost the device to another process. // if the app lost the device to another process.
try { try {
// Acquire the device - if the (main)window is active // Acquire the device - if the (main)window is active
if ( Activated ) m_device.Acquire( ); if ( Activated ) m_device.Acquire( );
} catch ( SharpDXException ) { }
catch ( SharpDXException ) {
// Failed to acquire the device. This could be because the app doesn't have focus. // Failed to acquire the device. This could be because the app doesn't have focus.
return; // EXIT unaquired return; // EXIT unaquired
} }
} else { }
else {
log.Error( "Unexpected Poll Exception", e ); log.Error( "Unexpected Poll Exception", e );
return; // EXIT see ex code return; // EXIT see ex code
} }

@ -39,7 +39,7 @@ namespace SCJMapper_V2.Devices.Mouse
/// Returns the currently valid color /// Returns the currently valid color
/// </summary> /// </summary>
/// <returns>A color</returns> /// <returns>A color</returns>
static public System.Drawing.Color MouseColor( ) static public System.Drawing.Color MouseColor()
{ {
return MyColors.MouseColor; return MyColors.MouseColor;
} }
@ -91,6 +91,16 @@ namespace SCJMapper_V2.Devices.Mouse
return devInput.StartsWith( DeviceID ); return devInput.StartsWith( DeviceID );
} }
/// <summary>
/// Returns true if a command is an axis command
/// </summary>
/// <param name="command">The command string</param>
/// <returns>True if it is an axis command</returns>
static public new bool IsAxisCommand( string command )
{
string cLower = command.ToLowerInvariant( );
return ( cLower.EndsWith( "_maxis_x" ) || cLower.EndsWith( "_maxis_y" ) );
}
/// <summary> /// <summary>
/// Reformat the input from AC1 style to AC2 style /// Reformat the input from AC1 style to AC2 style
@ -101,7 +111,7 @@ namespace SCJMapper_V2.Devices.Mouse
{ {
// input is something like a mouse1 (TODO compositions like lctrl+mouse1 ??) // input is something like a mouse1 (TODO compositions like lctrl+mouse1 ??)
// try easy: add mo1_ at the beginning // try easy: add mo1_ at the beginning
string retVal = input.Replace(" ",""); string retVal = input.Replace( " ", "" );
if ( IsDisabledInput( input ) ) return input; if ( IsDisabledInput( input ) ) return input;
return "mo1_" + retVal; return "mo1_" + retVal;
@ -146,7 +156,7 @@ namespace SCJMapper_V2.Devices.Mouse
/// <summary> /// <summary>
/// The JS ProductName property /// The JS ProductName property
/// </summary> /// </summary>
public override string DevName { get { return m_device.Properties.ProductName; } } public override string DevName { get { return "Mouse"; } } // no props in directX
/// <summary> /// <summary>
/// The JS Instance GUID for multiple device support (VJoy gets 2 of the same name) /// The JS Instance GUID for multiple device support (VJoy gets 2 of the same name)
/// </summary> /// </summary>
@ -170,8 +180,7 @@ namespace SCJMapper_V2.Devices.Mouse
private bool Activated_low private bool Activated_low
{ {
get { return m_activated; } get { return m_activated; }
set set {
{
m_activated = value; m_activated = value;
if ( m_activated == false ) m_device.Unacquire( ); // explicitely if not longer active if ( m_activated == false ) m_device.Unacquire( ); // explicitely if not longer active
} }
@ -214,11 +223,11 @@ namespace SCJMapper_V2.Devices.Mouse
public void Deactivate( ) public void Deactivate()
{ {
this.Activated = false; this.Activated = false;
} }
public void Activate( ) public void Activate()
{ {
this.Activated = true; this.Activated = true;
} }
@ -233,7 +242,7 @@ namespace SCJMapper_V2.Devices.Mouse
/// Z-axis, typically a wheel. If the mouse does not have a z-axis, the value is 0. /// Z-axis, typically a wheel. If the mouse does not have a z-axis, the value is 0.
/// </summary> /// </summary>
/// <returns>The last action as CryEngine compatible string</returns> /// <returns>The last action as CryEngine compatible string</returns>
public override string GetLastChange( ) public override string GetLastChange()
{ {
// TODO: Expand this out into a joystick class (see commit for details) // TODO: Expand this out into a joystick class (see commit for details)
Dictionary<string, string> axies = new Dictionary<string, string>( ) Dictionary<string, string> axies = new Dictionary<string, string>( )
@ -246,11 +255,11 @@ namespace SCJMapper_V2.Devices.Mouse
foreach ( KeyValuePair<string, string> entry in axies ) { foreach ( KeyValuePair<string, string> entry in axies ) {
PropertyInfo axisProperty = typeof( MouseState ).GetProperty( entry.Key ); PropertyInfo axisProperty = typeof( MouseState ).GetProperty( entry.Key );
if ( DidAxisChange2( ( int )axisProperty.GetValue( this.m_state, null ), ( int )axisProperty.GetValue( this.m_prevState, null ), true ) ) { if ( DidAxisChange2( (int)axisProperty.GetValue( this.m_state, null ), (int)axisProperty.GetValue( this.m_prevState, null ), true ) ) {
this.m_lastItem = entry.Value; this.m_lastItem = entry.Value;
if ( entry.Key == "Z" ) this.m_lastItem += "down"; if ( entry.Key == "Z" ) this.m_lastItem += "down";
} }
else if ( DidAxisChange2( ( int )axisProperty.GetValue( this.m_state, null ), ( int )axisProperty.GetValue( this.m_prevState, null ), false ) ) { else if ( DidAxisChange2( (int)axisProperty.GetValue( this.m_state, null ), (int)axisProperty.GetValue( this.m_prevState, null ), false ) ) {
this.m_lastItem = entry.Value; this.m_lastItem = entry.Value;
if ( entry.Key == "Z" ) this.m_lastItem += "up"; if ( entry.Key == "Z" ) this.m_lastItem += "up";
} }
@ -290,21 +299,45 @@ namespace SCJMapper_V2.Devices.Mouse
} }
System.Drawing.Rectangle m_targetRect = Screen.PrimaryScreen.Bounds;
/// <summary>
/// Fudge - must have a target rectangle to scale the mouse input into the target
/// </summary>
/// <param name="target"></param>
public void SetTargetRectForCmdData( System.Drawing.Rectangle target )
{
m_targetRect = target;
}
/// <summary> /// <summary>
/// Collect the current data from the device (DUMMY for Mouse) /// Collect the current data from the device (using WinForms.Cursor)
/// </summary> /// </summary>
public override void GetCmdData( string cmd, out int data ) public override void GetCmdData( string cmd, out int data )
{ {
// Make sure there is a valid device. System.Drawing.Point cPt = Cursor.Position;
data = 0; // somewhere on all screens
if ( m_targetRect.Contains( cPt ) ) {
cPt = cPt - new System.Drawing.Size( m_targetRect.X, m_targetRect.Y ); // move the point relative to the target rect origin
switch ( cmd ) {
case "maxis_x": data = (int)( 2000 * cPt.X / m_targetRect.Width ) - 1000; break; // data should be -1000..1000
case "maxis_y": data = -1 * ( (int)( 2000 * cPt.Y / m_targetRect.Height ) - 1000 ); break; // data should be -1000..1000
default: data = 0; break;
}
}
else {
data = 0;
}
System.Diagnostics.Debug.Print( string.Format( "C:({0})-T({1})({2}) - data: {3}",
Cursor.Position.ToString( ),
m_targetRect.Location.ToString( ), m_targetRect.Size.ToString( ),
data.ToString( ) ) );
} }
/// <summary> /// <summary>
/// Collect the current data from the device /// Collect the current data from the device
/// </summary> /// </summary>
public override void GetData( ) public override void GetData()
{ {
// Make sure there is a valid device. // Make sure there is a valid device.
if ( null == m_device ) if ( null == m_device )

@ -5,6 +5,8 @@ using System.Xml;
using System.Xml.Linq; using System.Xml.Linq;
using SCJMapper_V2.Actions; using SCJMapper_V2.Actions;
using SCJMapper_V2.Devices.Joystick; using SCJMapper_V2.Devices.Joystick;
using SCJMapper_V2.Devices.Keyboard;
using SCJMapper_V2.Devices.Mouse;
namespace SCJMapper_V2.Devices.Options namespace SCJMapper_V2.Devices.Options
{ {
@ -19,7 +21,7 @@ namespace SCJMapper_V2.Devices.Options
private string m_nodetext = ""; // v_pitch - js1_x private string m_nodetext = ""; // v_pitch - js1_x
private string m_action = ""; // v_pitch private string m_action = ""; // v_pitch
private string m_cmdCtrl = ""; // js1_x, js1_y, js1_rotz ... private string m_cmdCtrl = ""; // js1_x, js1_y, js1_rotz ...
private string m_class = ""; // joystick OR xboxpad private string m_devClass = ""; // joystick OR xboxpad OR mouse
private int m_devInstanceNo = -1; // jsN - instance in XML private int m_devInstanceNo = -1; // jsN - instance in XML
string m_option = ""; // the option name (level where it applies) string m_option = ""; // the option name (level where it applies)
@ -67,7 +69,7 @@ namespace SCJMapper_V2.Devices.Options
ret &= ( this.m_nodetext == clone.m_nodetext ); // immutable string - shallow copy is OK ret &= ( this.m_nodetext == clone.m_nodetext ); // immutable string - shallow copy is OK
ret &= ( this.m_action == clone.m_action ); // immutable string - shallow copy is OK ret &= ( this.m_action == clone.m_action ); // immutable string - shallow copy is OK
ret &= ( this.m_cmdCtrl == clone.m_cmdCtrl );// immutable string - shallow copy is OK ret &= ( this.m_cmdCtrl == clone.m_cmdCtrl );// immutable string - shallow copy is OK
ret &= ( this.m_class == clone.m_class ); // immutable string - shallow copy is OK ret &= ( this.m_devClass == clone.m_devClass ); // immutable string - shallow copy is OK
ret &= ( this.m_devInstanceNo == clone.m_devInstanceNo ); ret &= ( this.m_devInstanceNo == clone.m_devInstanceNo );
ret &= ( this.m_option == clone.m_option ); ret &= ( this.m_option == clone.m_option );
ret &= ( this.m_deviceName == clone.m_deviceName ); ret &= ( this.m_deviceName == clone.m_deviceName );
@ -106,11 +108,11 @@ namespace SCJMapper_V2.Devices.Options
get { return m_deviceRef; } get { return m_deviceRef; }
set { set {
m_deviceRef = value; m_deviceRef = value;
m_class = ""; m_devClass = "";
m_devInstanceNo = -1; m_devInstanceNo = -1;
if ( m_deviceRef == null ) return; // got a null device if ( m_deviceRef == null ) return; // got a null device
m_class = m_deviceRef.DevClass; m_devClass = m_deviceRef.DevClass;
m_devInstanceNo = m_deviceRef.XmlInstance; m_devInstanceNo = m_deviceRef.XmlInstance;
} }
} }
@ -129,7 +131,7 @@ namespace SCJMapper_V2.Devices.Options
public string DeviceClass public string DeviceClass
{ {
get { return m_class; } get { return m_devClass; }
} }
@ -256,6 +258,16 @@ namespace SCJMapper_V2.Devices.Options
m_cmdCtrl = "xi_thumbry"; m_cmdCtrl = "xi_thumbry";
m_deviceName = m_deviceRef.DevName; m_deviceName = m_deviceRef.DevName;
} }
else if ( cmd.Contains( "maxis_x" ) ) {
// mouse
m_cmdCtrl = "maxis_x";
m_deviceName = m_deviceRef.DevName;
}
else if ( cmd.Contains( "maxis_y" ) ) {
// mouse
m_cmdCtrl = "maxis_y";
m_deviceName = m_deviceRef.DevName;
}
// assume joystick // assume joystick
else { else {
// get parts // get parts
@ -291,7 +303,12 @@ namespace SCJMapper_V2.Devices.Options
if ( DevInstanceNo < 1 ) return ""; // no device to assign it to.. if ( DevInstanceNo < 1 ) return ""; // no device to assign it to..
string tmp = ""; string tmp = "";
tmp += string.Format( "\t<options type=\"{0}\" instance=\"{1}\">\n", m_class, m_devInstanceNo.ToString( ) );
// again we have to translate from internal deviceClass mouse to CIG type keyboard ...
string type = m_devClass;
if ( MouseCls.IsDeviceClass( type ) ) type = KeyboardCls.DeviceClass;
tmp += string.Format( "\t<options type=\"{0}\" instance=\"{1}\">\n", type, m_devInstanceNo.ToString( ) );
tmp += string.Format( "\t\t<{0} ", m_option ); tmp += string.Format( "\t\t<{0} ", m_option );
if ( InvertUsed ) { if ( InvertUsed ) {
@ -334,7 +351,7 @@ namespace SCJMapper_V2.Devices.Options
/// <param name="reader">A prepared XML reader</param> /// <param name="reader">A prepared XML reader</param>
/// <param name="instance">the Joystick instance number</param> /// <param name="instance">the Joystick instance number</param>
/// <returns></returns> /// <returns></returns>
public bool Options_fromXML( XElement option, string type, int instance ) public bool Options_fromXML( XElement option, string deviceClass, int instance )
{ {
/* /*
<flight_move_pitch exponent="1.00" > <flight_move_pitch exponent="1.00" >
@ -345,7 +362,7 @@ namespace SCJMapper_V2.Devices.Options
</nonlinearity_curve> </nonlinearity_curve>
</flight_move_pitch> </flight_move_pitch>
*/ */
m_class = type; m_devClass = deviceClass;
m_devInstanceNo = instance; m_devInstanceNo = instance;
m_option = option.Name.LocalName; m_option = option.Name.LocalName;
@ -377,6 +394,8 @@ namespace SCJMapper_V2.Devices.Options
string ptOut = RoundString( (string)point.Attribute( "out" ) ); string ptOut = RoundString( (string)point.Attribute( "out" ) );
m_PtsIn.Add( ptIn ); m_PtsOut.Add( ptOut ); m_ptsEnabled = true; m_PtsIn.Add( ptIn ); m_PtsOut.Add( ptOut ); m_ptsEnabled = true;
} }
ExponentUsed = false; // despite having the Expo=1.00 in the options - it is not used with nonlin curve
Exponent = RoundString( "1.00" );
} }
// sanity check - we've have to have 3 pts here - else we subst // sanity check - we've have to have 3 pts here - else we subst
// add 2nd // add 2nd

@ -6,12 +6,15 @@ using System.Xml.Linq;
using SCJMapper_V2.Devices.Joystick; using SCJMapper_V2.Devices.Joystick;
using SCJMapper_V2.Devices.Gamepad; using SCJMapper_V2.Devices.Gamepad;
using System.Linq; using System.Linq;
using SCJMapper_V2.Devices.Mouse;
namespace SCJMapper_V2.Devices.Options namespace SCJMapper_V2.Devices.Options
{ {
/// <summary> /// <summary>
/// Maintains an Deviceoptions - something like: /// Maintains all Deviceoptions i.e. Analog controls of all devices connected
/// /// There are dynamic parts (actions) only for the GUI
/// those are derived from the current mapping which need to be updated before use
///
/// <deviceoptions name="Joystick - HOTAS Warthog"> /// <deviceoptions name="Joystick - HOTAS Warthog">
/// <!-- Reduce the deadzone --> /// <!-- Reduce the deadzone -->
/// <option input="x" deadzone="0.015" /> /// <option input="x" deadzone="0.015" />
@ -27,8 +30,7 @@ namespace SCJMapper_V2.Devices.Options
public class Deviceoptions : CloneableDictionary<string, DeviceOptionParameter> public class Deviceoptions : CloneableDictionary<string, DeviceOptionParameter>
{ {
private static readonly log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod( ).DeclaringType ); private static readonly log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod( ).DeclaringType );
#region Static parts #region Static parts
// DevOptions GUI Slider properties - have them in one place only // DevOptions GUI Slider properties - have them in one place only
@ -99,10 +101,7 @@ namespace SCJMapper_V2.Devices.Options
#endregion #endregion
#region Cloning support
private List<string> m_stringOptions = new List<string>( ); // collected options from XML that are not parsed
/// <summary> /// <summary>
/// Clone this object /// Clone this object
@ -147,8 +146,14 @@ namespace SCJMapper_V2.Devices.Options
} }
#endif #endif
#endregion
private List<string> m_stringOptions = new List<string>( ); // collected options from XML that are not parsed
/// <summary>
/// cTor: Private - Init from a given Directory
/// </summary>
/// <param name="init">Dev parameters to init from</param>
private Deviceoptions( CloneableDictionary<string, DeviceOptionParameter> init ) private Deviceoptions( CloneableDictionary<string, DeviceOptionParameter> init )
{ {
foreach ( KeyValuePair<string, DeviceOptionParameter> kvp in init ) { foreach ( KeyValuePair<string, DeviceOptionParameter> kvp in init ) {
@ -157,7 +162,9 @@ namespace SCJMapper_V2.Devices.Options
} }
// ctor /// <summary>
/// cTor: collects the Analog commands from the devices on order to apply Deadzone and Saturation properties for them
/// </summary>
public Deviceoptions() public Deviceoptions()
{ {
// create all devOptions for all devices found (they may or may no be used) // create all devOptions for all devices found (they may or may no be used)
@ -185,9 +192,24 @@ namespace SCJMapper_V2.Devices.Options
} }
} }
} }
}
// add mouse if there is any
if ( DeviceInst.MouseRef != null ) {
foreach ( string input in DeviceInst.MouseRef.AnalogCommands ) {
string doid = DevOptionID( MouseCls.DeviceClass, DeviceInst.MouseRef.DevName, input );
if ( !this.ContainsKey( doid ) ) {
this.Add( doid, new DeviceOptionParameter( DeviceInst.MouseRef, input, "", "" ) ); // init with disabled defaults
}
else {
log.WarnFormat( "cTor - Mouse DO_ID {0} exists", doid );
}
}
}
}
/// <summary>
/// Returns the number of items in this
/// </summary>
new public int Count new public int Count
{ {
get { return ( m_stringOptions.Count + base.Count ); } get { return ( m_stringOptions.Count + base.Count ); }
@ -203,8 +225,7 @@ namespace SCJMapper_V2.Devices.Options
kv.Value.Action = ""; kv.Value.Action = "";
} }
} }
/// <summary> /// <summary>
/// Rounds a string to 3 decimals (if it is a number..) /// Rounds a string to 3 decimals (if it is a number..)
/// </summary> /// </summary>
@ -221,7 +242,11 @@ namespace SCJMapper_V2.Devices.Options
} }
} }
/// <summary>
/// Lowlevel formatting
/// </summary>
/// <param name="xml"></param>
/// <returns></returns>
private string[] FormatXml( string xml ) private string[] FormatXml( string xml )
{ {
try { try {
@ -252,7 +277,6 @@ namespace SCJMapper_V2.Devices.Options
r += string.Format( "\n" ); r += string.Format( "\n" );
} }
// dump Tuning // dump Tuning
foreach ( KeyValuePair<string, DeviceOptionParameter> kv in this ) { foreach ( KeyValuePair<string, DeviceOptionParameter> kv in this ) {
r += kv.Value.Deviceoptions_toXML( ); r += kv.Value.Deviceoptions_toXML( );

@ -13,6 +13,8 @@ using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting; using System.Windows.Forms.DataVisualization.Charting;
using SCJMapper_V2.Actions; using SCJMapper_V2.Actions;
using SCJMapper_V2.Devices.Mouse;
using SCJMapper_V2.SC;
namespace SCJMapper_V2.Devices.Options namespace SCJMapper_V2.Devices.Options
{ {
@ -155,7 +157,8 @@ namespace SCJMapper_V2.Devices.Options
UpdateLiveTuning( ); UpdateLiveTuning( );
UpdateLiveDevOption( ); UpdateLiveDevOption( );
} }
} catch { }
catch {
; ;
} }
@ -283,175 +286,53 @@ namespace SCJMapper_V2.Devices.Options
ListViewGroup lvg = null; ListViewGroup lvg = null;
ListViewItem lvi; ListViewItem lvi;
List<string> devNamesDone = new List<string>( ); List<string> devNamesDone = new List<string>( );
string devClass = DeviceCls.DeviceClass;
// first the analog controls for the device // scan for DeviceOptions to be added for this device(GUID)
string gpGUID = "";
foreach ( KeyValuePair<string, DeviceOptionParameter> kv in m_devOptRef ) { foreach ( KeyValuePair<string, DeviceOptionParameter> kv in m_devOptRef ) {
if ( GamepadCls.IsDeviceClass( kv.Value.DevClass ) )
gpGUID = kv.Value.DevInstanceGUID; // save for later below
if ( kv.Value.DevInstanceGUID == devGUID ) { if ( kv.Value.DevInstanceGUID == devGUID ) {
devClass = kv.Value.DevClass;
if ( !devNamesDone.Contains( kv.Value.DevName ) ) { if ( !devNamesDone.Contains( kv.Value.DevName ) ) {
lvg = new ListViewGroup( "Device Options" ); lview.Groups.Add( lvg ); lvg = new ListViewGroup( "Device Options" ); lview.Groups.Add( lvg );
devNamesDone.Add( kv.Value.DevName ); devNamesDone.Add( kv.Value.DevName );
} }
lvi = new ListViewItem( kv.Value.CommandCtrl, lvg ); lvi.Name = kv.Value.DoID; lview.Items.Add( lvi ); lvi = new ListViewItem( kv.Value.CommandCtrl, lvg ) { Name = kv.Value.DoID };
lview.Items.Add( lvi );
ListViewItemSetup( lvi ); ListViewItemSetup( lvi );
UpdateLvDevOptionFromLiveValues( kv.Value ); UpdateLvDevOptionFromLiveValues( kv.Value );
} }
} }
// then the functions if ( DeviceCls.IsUndefined(devClass) ) {
lvg = new ListViewGroup( "0", "flight_move " ); lview.Groups.Add( lvg ); // still undefined - solve here
{ if ( devGUID == DeviceInst.GamepadRef?.DevInstanceGUID )
option = "flight_move_pitch"; tuning = m_tuningRef.TuningItem( (string)lview.Tag, option ); m_live.Load( tuning ); devClass = GamepadCls.DeviceClass;
if ( m_live.used ) { else if ( devGUID == DeviceInst.MouseRef?.DevInstanceGUID )
lvi = new ListViewItem( option, lvg ); lvi.Name = option; lvi.Name = option; lview.Items.Add( lvi ); ListViewItemSetup( lvi ); devClass = MouseCls.DeviceClass;
UpdateLvOptionFromLiveValues( m_live );
}
option = "flight_move_yaw"; tuning = m_tuningRef.TuningItem( (string)lview.Tag, option ); m_live.Load( tuning );
if ( m_live.used ) {
lvi = new ListViewItem( option, lvg ); lvi.Name = option; lview.Items.Add( lvi ); ListViewItemSetup( lvi );
UpdateLvOptionFromLiveValues( m_live );
}
option = "flight_move_roll"; tuning = m_tuningRef.TuningItem( (string)lview.Tag, option ); m_live.Load( tuning );
if ( m_live.used ) {
lvi = new ListViewItem( option, lvg ); lvi.Name = option; lview.Items.Add( lvi ); ListViewItemSetup( lvi );
UpdateLvOptionFromLiveValues( m_live );
}
option = "flight_move_strafe_vertical"; tuning = m_tuningRef.TuningItem( (string)lview.Tag, option ); m_live.Load( tuning );
if ( m_live.used ) {
lvi = new ListViewItem( option, lvg ); lvi.Name = option; lview.Items.Add( lvi ); ListViewItemSetup( lvi );
UpdateLvOptionFromLiveValues( m_live );
}
option = "flight_move_strafe_lateral"; tuning = m_tuningRef.TuningItem( (string)lview.Tag, option ); m_live.Load( tuning );
if ( m_live.used ) {
lvi = new ListViewItem( option, lvg ); lvi.Name = option; lview.Items.Add( lvi ); ListViewItemSetup( lvi );
UpdateLvOptionFromLiveValues( m_live );
}
option = "flight_move_strafe_longitudinal"; tuning = m_tuningRef.TuningItem( (string)lview.Tag, option ); m_live.Load( tuning );
if ( m_live.used ) {
lvi = new ListViewItem( option, lvg ); lvi.Name = option; lview.Items.Add( lvi ); ListViewItemSetup( lvi );
UpdateLvOptionFromLiveValues( m_live );
}
}
lvg = new ListViewGroup( "1", "flight_throttle" ); lview.Groups.Add( lvg );
{
option = "flight_throttle_abs"; tuning = m_tuningRef.TuningItem( (string)lview.Tag, option ); m_live.Load( tuning );
if ( m_live.used ) {
lvi = new ListViewItem( option, lvg ); lvi.Name = option; lview.Items.Add( lvi ); ListViewItemSetup( lvi );
UpdateLvOptionFromLiveValues( m_live );
}
option = "flight_throttle_rel"; tuning = m_tuningRef.TuningItem( (string)lview.Tag, option ); m_live.Load( tuning );
if ( m_live.used ) {
lvi = new ListViewItem( option, lvg ); lvi.Name = option; lview.Items.Add( lvi ); ListViewItemSetup( lvi );
UpdateLvOptionFromLiveValues( m_live );
}
}
lvg = new ListViewGroup( "2", "flight_aim" ); lview.Groups.Add( lvg );
{
option = "flight_aim_pitch"; tuning = m_tuningRef.TuningItem( (string)lview.Tag, option ); m_live.Load( tuning );
if ( m_live.used ) {
lvi = new ListViewItem( option, lvg ); lvi.Name = option; lview.Items.Add( lvi ); ListViewItemSetup( lvi );
UpdateLvOptionFromLiveValues( m_live );
}
option = "flight_aim_yaw"; tuning = m_tuningRef.TuningItem( (string)lview.Tag, option ); m_live.Load( tuning );
if ( m_live.used ) {
lvi = new ListViewItem( option, lvg ); lvi.Name = option; lview.Items.Add( lvi ); ListViewItemSetup( lvi );
UpdateLvOptionFromLiveValues( m_live );
}
} }
lvg = new ListViewGroup( "3", "flight_view" ); lview.Groups.Add( lvg ); int lvCount = 0;
{ // then the functions
option = "flight_view_pitch"; tuning = m_tuningRef.TuningItem( (string)lview.Tag, option ); m_live.Load( tuning ); string group = "";
if ( m_live.used ) { foreach ( var pOpt in OptionTree.ProfileOptions.Where( x => x.DeviceClass == devClass ) ) {
lvi = new ListViewItem( option, lvg ); lvi.Name = option; lview.Items.Add( lvi ); ListViewItemSetup( lvi ); if ( pOpt.OptGroup != group ) {
UpdateLvOptionFromLiveValues( m_live ); group = pOpt.OptGroup;
} lvg = new ListViewGroup( lvCount++.ToString( ), SCUiText.Instance.Text( group ) ); lview.Groups.Add( lvg );
option = "flight_view_yaw"; tuning = m_tuningRef.TuningItem( (string)lview.Tag, option ); m_live.Load( tuning );
if ( m_live.used ) {
lvi = new ListViewItem( option, lvg ); lvi.Name = option; lview.Items.Add( lvi ); ListViewItemSetup( lvi );
UpdateLvOptionFromLiveValues( m_live );
} }
}
lvg = new ListViewGroup( "4", "Turret_aim" ); lview.Groups.Add( lvg ); option = pOpt.OptName; tuning = m_tuningRef.TuningItem( (string)lview.Tag, option ); m_live.Load( tuning );
{
option = "turret_aim_pitch"; tuning = m_tuningRef.TuningItem( (string)lview.Tag, option ); m_live.Load( tuning );
if ( m_live.used ) {
lvi = new ListViewItem( option, lvg ); lvi.Name = option; lview.Items.Add( lvi ); ListViewItemSetup( lvi );
UpdateLvOptionFromLiveValues( m_live );
}
option = "turret_aim_yaw"; tuning = m_tuningRef.TuningItem( (string)lview.Tag, option ); m_live.Load( tuning );
if ( m_live.used ) { if ( m_live.used ) {
lvi = new ListViewItem( option, lvg ); lvi.Name = option; lview.Items.Add( lvi ); ListViewItemSetup( lvi ); lvi = new ListViewItem( SCUiText.Instance.Text( option ), lvg ) { Name = option };
lvi.Name = option; lview.Items.Add( lvi ); ListViewItemSetup( lvi );
UpdateLvOptionFromLiveValues( m_live ); UpdateLvOptionFromLiveValues( m_live );
} }
} }
// GP only
if ( devGUID == gpGUID ) { // now this selector is murks but then it works...
lvg = new ListViewGroup( "5", "fps_view" ); lview.Groups.Add( lvg );
{
option = "fps_view_pitch"; tuning = m_tuningRef.TuningItem( (string)lview.Tag, option ); m_live.Load( tuning );
if ( m_live.used ) {
lvi = new ListViewItem( option, lvg ); lvi.Name = option; lview.Items.Add( lvi ); ListViewItemSetup( lvi );
UpdateLvOptionFromLiveValues( m_live );
}
option = "fps_view_yaw"; tuning = m_tuningRef.TuningItem( (string)lview.Tag, option ); m_live.Load( tuning );
if ( m_live.used ) {
lvi = new ListViewItem( option, lvg ); lvi.Name = option; lview.Items.Add( lvi ); ListViewItemSetup( lvi );
UpdateLvOptionFromLiveValues( m_live );
}
}
lvg = new ListViewGroup( "6", "fps_move" ); lview.Groups.Add( lvg );
{
option = "fps_move_lateral"; tuning = m_tuningRef.TuningItem( (string)lview.Tag, option ); m_live.Load( tuning );
if ( m_live.used ) {
lvi = new ListViewItem( option, lvg ); lvi.Name = option; lview.Items.Add( lvi ); ListViewItemSetup( lvi );
UpdateLvOptionFromLiveValues( m_live );
}
option = "fps_move_longitudinal"; tuning = m_tuningRef.TuningItem( (string)lview.Tag, option ); m_live.Load( tuning );
if ( m_live.used ) {
lvi = new ListViewItem( option, lvg ); lvi.Name = option; lview.Items.Add( lvi ); ListViewItemSetup( lvi );
UpdateLvOptionFromLiveValues( m_live );
}
}
lvg = new ListViewGroup( "7", "manned_ground_vehicle" ); lview.Groups.Add( lvg );
{
option = "mgv_view_pitch"; tuning = m_tuningRef.TuningItem( (string)lview.Tag, option ); m_live.Load( tuning );
if ( m_live.used ) {
lvi = new ListViewItem( option, lvg ); lvi.Name = option; lview.Items.Add( lvi ); ListViewItemSetup( lvi );
UpdateLvOptionFromLiveValues( m_live );
}
option = "mgv_view_yaw"; tuning = m_tuningRef.TuningItem( (string)lview.Tag, option ); m_live.Load( tuning );
if ( m_live.used ) {
lvi = new ListViewItem( option, lvg ); lvi.Name = option; lview.Items.Add( lvi ); ListViewItemSetup( lvi );
UpdateLvOptionFromLiveValues( m_live );
}
}
}// if GP
log.Debug( "OptionTreeSetup - Exit" ); log.Debug( "OptionTreeSetup - Exit" );
} }
#endregion #endregion
public void SetTuningRecord( DeviceTuningParameter tp )
{
}
private void button2_Click( object sender, EventArgs e ) private void button2_Click( object sender, EventArgs e )
{ {
; // break ; // break
@ -895,7 +776,7 @@ namespace SCJMapper_V2.Devices.Options
} }
ListViewItem lvi = lv.Items[dp.DoID]; ListViewItem lvi = lv.Items[dp.DoID];
lvi.SubItems[LV_DevCtrl].Text = dp.Action; // Action lvi.SubItems[LV_DevCtrl].Text = SCUiText.Instance.Text( dp.Action ); // Action
if ( dp.SaturationSupported && dp.SaturationUsed ) if ( dp.SaturationSupported && dp.SaturationUsed )
lvi.SubItems[LV_Saturation].Text = dp.Saturation; // saturation lvi.SubItems[LV_Saturation].Text = dp.Saturation; // saturation
else if ( dp.SaturationSupported ) else if ( dp.SaturationSupported )
@ -1329,7 +1210,8 @@ namespace SCJMapper_V2.Devices.Options
UpdateGUIFromLiveValues( m_live ); UpdateGUIFromLiveValues( m_live );
UpdateChartItems( ); UpdateChartItems( );
} catch { }
catch {
; ;
} }
log.Debug( "lvOptionTree_SelectedIndexChanged - Exit" ); log.Debug( "lvOptionTree_SelectedIndexChanged - Exit" );

@ -6,11 +6,15 @@ using System.Xml;
using System.IO; using System.IO;
using System.Xml.Linq; using System.Xml.Linq;
using System.Windows.Forms; using System.Windows.Forms;
using SCJMapper_V2.SC;
using SCJMapper_V2.Devices.Mouse;
using SCJMapper_V2.Devices.Keyboard;
using System.Collections;
namespace SCJMapper_V2.Devices.Options namespace SCJMapper_V2.Devices.Options
{ {
/// <summary> /// <summary>
/// Maintains an Options - something like: /// Maintains Options - something like:
/// ///
/// <options type="joystick" instance="1"> /// <options type="joystick" instance="1">
/// <!-- Make all piloting input linear --> /// <!-- Make all piloting input linear -->
@ -21,7 +25,7 @@ namespace SCJMapper_V2.Devices.Options
/// <flight_move_strafe_longitudinal invert="1" /> /// <flight_move_strafe_longitudinal invert="1" />
/// </options> /// </options>
/// ///
/// [type] : set to shared, keyboard, xboxpad, or joystick /// [type] : set to shared, mouse, xboxpad, or joystick (NOTE the CIG type used is keyboard .. for the mouse....(Grrr) - we use MOUSE
/// [instance] : set to the device number; js1=1, js2=2, etc /// [instance] : set to the device number; js1=1, js2=2, etc
/// [optiongroup] : set to what group the option should affect (for available groups see default actionmap) /// [optiongroup] : set to what group the option should affect (for available groups see default actionmap)
/// [option] : instance, sensitivity, exponent, nonlinearity *instance is a bug that will be fixed to 'invert' in the future /// [option] : instance, sensitivity, exponent, nonlinearity *instance is a bug that will be fixed to 'invert' in the future
@ -37,11 +41,11 @@ namespace SCJMapper_V2.Devices.Options
// Support only one set of independent options (string storage) // Support only one set of independent options (string storage)
List<string> m_stringOptions = new List<string>( ); List<string> m_stringOptions = new List<string>( );
#region Clonable support
// bag for all tuning items - key is the option name // bag for all tuning items - key is the option name
CloneableDictionary<string, DeviceTuningParameter> m_tuning = new CloneableDictionary<string, DeviceTuningParameter>( ); CloneableDictionary<string, DeviceTuningParameter> m_tuning = new CloneableDictionary<string, DeviceTuningParameter>( );
/// <summary> /// <summary>
/// Clone this object /// Clone this object
/// </summary> /// </summary>
@ -80,41 +84,21 @@ namespace SCJMapper_V2.Devices.Options
return ret; return ret;
} }
#endregion
// ctor // ctor
public OptionTree( DeviceCls device ) public OptionTree( DeviceCls device )
{ {
m_tuning.Add( "flight_move_pitch", new DeviceTuningParameter( "flight_move_pitch", device ) ); if ( m_profileOptions.Count( ) == 0 ) {
m_tuning.Add( "flight_move_yaw", new DeviceTuningParameter( "flight_move_yaw", device ) ); log.Error( "cTor OptionTree - profile not yet read" );
m_tuning.Add( "flight_move_roll", new DeviceTuningParameter( "flight_move_roll", device ) ); }
m_tuning.Add( "flight_move_strafe_vertical", new DeviceTuningParameter( "flight_move_strafe_vertical", device ) );
m_tuning.Add( "flight_move_strafe_lateral", new DeviceTuningParameter( "flight_move_strafe_lateral", device ) );
m_tuning.Add( "flight_move_strafe_longitudinal", new DeviceTuningParameter( "flight_move_strafe_longitudinal", device ) );
m_tuning.Add( "flight_throttle_abs", new DeviceTuningParameter( "flight_throttle_abs", device ) );
m_tuning.Add( "flight_throttle_rel", new DeviceTuningParameter( "flight_throttle_rel", device ) );
m_tuning.Add( "flight_aim_pitch", new DeviceTuningParameter( "flight_aim_pitch", device ) );
m_tuning.Add( "flight_aim_yaw", new DeviceTuningParameter( "flight_aim_yaw", device ) );
m_tuning.Add( "flight_view_pitch", new DeviceTuningParameter( "flight_view_pitch", device ) );
m_tuning.Add( "flight_view_yaw", new DeviceTuningParameter( "flight_view_yaw", device ) );
m_tuning.Add( "turret_aim_pitch", new DeviceTuningParameter( "turret_aim_pitch", device ) );
m_tuning.Add( "turret_aim_yaw", new DeviceTuningParameter( "turret_aim_yaw", device ) );
// Gamepad specific
if ( Devices.Gamepad.GamepadCls.IsDeviceClass( device.DevClass ) ) {
m_tuning.Add( "fps_view_pitch", new DeviceTuningParameter( "fps_view_pitch", device ) );
m_tuning.Add( "fps_view_yaw", new DeviceTuningParameter( "fps_view_yaw", device ) );
m_tuning.Add( "fps_move_lateral", new DeviceTuningParameter( "fps_move_lateral", device ) );
m_tuning.Add( "fps_move_longitudinal", new DeviceTuningParameter( "fps_move_longitudinal", device ) );
m_tuning.Add( "mgv_view_pitch", new DeviceTuningParameter( "mgv_view_pitch", device ) ); // get options for the device class
m_tuning.Add( "mgv_view_yaw", new DeviceTuningParameter( "mgv_view_yaw", device ) ); var devOpts = m_profileOptions.Where( x => x.DeviceClass == device.DevClass );
foreach (ProfileOptionRec rec in devOpts ) {
m_tuning.Add( rec.OptName, new DeviceTuningParameter( rec.OptName, device ) );
} }
} }
@ -228,97 +212,139 @@ namespace SCJMapper_V2.Devices.Options
*/ */
string instance = (string)options.Attribute( "instance" ); // mandadory string instance = (string)options.Attribute( "instance" ); // mandadory
string type = (string)options.Attribute( "type" ); // mandadory string type = (string)options.Attribute( "type" ); // mandadory
if ( !int.TryParse( instance, out int nInstance ) ) nInstance = 0; if ( !int.TryParse( instance, out int nInstance ) ) nInstance = 0; // get the one from the map if given (else it's a map error...)
// try to disassemble the items string devClass = DeviceCls.DeviceClass; // the generic one
/* if ( !string.IsNullOrEmpty(type)) devClass = type; // get the one from the map if given (else it's a map error...)
* <flight> instance="0/1" sensitivity="n.nn" exponent="n.nn" (instance should be invert)
* <flight_move> // mouse arrives as type keyboard - fix it to deviceClass mouse here
* <flight_move_pitch> if ( KeyboardCls.IsDeviceClass( devClass ) )
* <flight_move_yaw> devClass = MouseCls.DeviceClass;
* <flight_move_roll>
* <flight_move_strafe_vertical> // check if the profile contains the one we found in the map - then parse the element
* <flight_move_strafe_lateral>
* <flight_move_strafe_longitudinal>
* <flight_throttle> invert="0/1"
* <flight_throttle_abs>
* <flight_throttle_rel>
* <flight_aim>
* <flight_aim_pitch>
* <flight_aim_yaw>
* <flight_view>
* <flight_view_pitch>
* <flight_view_yaw>
*
*
<nonlinearity_curve>
<point in="0.1" out="0.001"/>
* ..
</nonlinearity_curve>
*
*
*
*/
foreach ( XElement item in options.Elements( ) ) { foreach ( XElement item in options.Elements( ) ) {
if ( item.Name.LocalName == "flight_move_pitch" ) { if ( m_profileOptions.Contains( new ProfileOptionRec( ) { DeviceClass = devClass, OptName = item.Name.LocalName } ) ) {
m_tuning["flight_move_pitch"].Options_fromXML( item, type, int.Parse( instance ) ); m_tuning[item.Name.LocalName].Options_fromXML( item, devClass, int.Parse( instance ) );
} }
else if ( item.Name.LocalName == "flight_move_yaw" ) { }
m_tuning["flight_move_yaw"].Options_fromXML( item, type, int.Parse( instance ) );
}
else if ( item.Name.LocalName == "flight_move_roll" ) {
m_tuning["flight_move_roll"].Options_fromXML( item, type, int.Parse( instance ) );
}
else if ( item.Name.LocalName == "flight_move_strafe_vertical" ) {
m_tuning["flight_move_strafe_vertical"].Options_fromXML( item, type, int.Parse( instance ) );
}
else if ( item.Name.LocalName == "flight_move_strafe_lateral" ) {
m_tuning["flight_move_strafe_lateral"].Options_fromXML( item, type, int.Parse( instance ) );
}
else if ( item.Name.LocalName == "flight_move_strafe_longitudinal" ) {
m_tuning["flight_move_strafe_longitudinal"].Options_fromXML( item, type, int.Parse( instance ) );
}
else if ( item.Name.LocalName == "flight_throttle_abs" ) {
m_tuning["flight_throttle_abs"].Options_fromXML( item, type, int.Parse( instance ) );
}
else if ( item.Name.LocalName == "flight_throttle_rel" ) {
m_tuning["flight_throttle_rel"].Options_fromXML( item, type, int.Parse( instance ) );
} return true;
else if ( item.Name.LocalName == "flight_aim_pitch" ) { }
m_tuning["flight_aim_pitch"].Options_fromXML( item, type, int.Parse( instance ) );
}
else if ( item.Name.LocalName == "flight_aim_yaw" ) {
m_tuning["flight_aim_yaw"].Options_fromXML( item, type, int.Parse( instance ) );
#region static - Profile Handling
public class ProfileOptionRec : IEquatable<ProfileOptionRec>
{
public string DeviceClass { get; set; }
public string OptGroup { get; set; }
public string OptName { get; set; }
public bool ShowCurve { get; set; }
public bool ShowInvert { get; set; }
public ProfileOptionRec()
{
DeviceClass = DeviceCls.DeviceClass; OptGroup = ""; OptName = ""; ShowCurve = false; ShowInvert = false;
}
// same class and name means records match
public bool Equals( ProfileOptionRec other )
{
return ( ( this.DeviceClass == other.DeviceClass ) && ( this.OptName == other.OptName ) );
}
}
private static List<ProfileOptionRec> m_profileOptions = new List<ProfileOptionRec>( );
/// <summary>
/// Returns a list of ProfileOptions found in the defaultProfile
/// </summary>
public static IList<ProfileOptionRec> ProfileOptions { get => m_profileOptions; }
/// <summary>
/// Clears the stored optiontree items from the profile
/// must be cleared before re-reading them from profile
/// </summary>
public static void InitOptionReader()
{
m_profileOptions = new List<ProfileOptionRec>( );
}
/// <summary>
/// Reads optiongroup nodes
/// the tree is composed of such nodes - we dive recursively
/// </summary>
/// <param name="optiongroupIn">The optiongroup to parse</param>
/// <param name="devClass">The deviceclass it belongs to</param>
/// <returns>True if OK</returns>
private static bool ReadOptiongroup( XElement optiongroupIn, string devClass, string optGroup )
{
bool retVal = true;
// collect content and process further groups
string name = (string)optiongroupIn.Attribute( "name" );
string uiLabel = (string)optiongroupIn.Attribute( "UILabel" );
if ( string.IsNullOrEmpty( uiLabel ) )
uiLabel = name; // subst if not found in Action node
SCUiText.Instance.Add( name, uiLabel ); // Register item for translation
// further groups
IEnumerable<XElement> optiongroups = from x in optiongroupIn.Elements( )
where ( x.Name == "optiongroup" )
select x;
foreach ( XElement optiongroup in optiongroups ) {
retVal &= ReadOptiongroup( optiongroup, devClass, name ); // current is the group if we dive one down
}
// murks.. determine if it is a terminal node, then get items
if ( optiongroups.Count() == 0 ) {
ProfileOptionRec optRec = new ProfileOptionRec { DeviceClass = devClass, OptGroup=optGroup, OptName = name }; // create a new one
// override props if they arrive in the node
string attr = (string)optiongroupIn.Attribute( "UIShowCurve" );
if ( !string.IsNullOrEmpty( attr ) ) {
if ( int.TryParse( attr, out int showCurve ) ) {
optRec.ShowCurve = ( showCurve == 1 );
}
} }
else if ( item.Name.LocalName == "flight_view_pitch" ) { attr = (string)optiongroupIn.Attribute( "UIShowInvert" );
m_tuning["flight_view_pitch"].Options_fromXML( item, type, int.Parse( instance ) ); if ( !string.IsNullOrEmpty( attr ) ) {
} if ( int.TryParse( attr, out int showInvert ) ) {
else if ( item.Name.LocalName == "flight_view_yaw" ) { optRec.ShowInvert = ( showInvert == 1 );
m_tuning["flight_view_yaw"].Options_fromXML( item, type, int.Parse( instance ) ); }
}
else if ( item.Name.LocalName == "fps_view_pitch" ) {
m_tuning["fps_view_pitch"].Options_fromXML( item, type, int.Parse( instance ) );
}
else if ( item.Name.LocalName == "fps_view__yaw" ) {
m_tuning["fps_view__yaw"].Options_fromXML( item, type, int.Parse( instance ) );
}
else if ( item.Name.LocalName == "fps_move_lateral" ) {
m_tuning["fps_move_lateral"].Options_fromXML( item, type, int.Parse( instance ) );
}
else if ( item.Name.LocalName == "fps_move_longitudinal" ) {
m_tuning["fps_move_longitudinal"].Options_fromXML( item, type, int.Parse( instance ) );
}
else if ( item.Name.LocalName == "mgv_view_pitch" ) {
m_tuning["mgv_view_pitch"].Options_fromXML( item, type, int.Parse( instance ) );
}
else if ( item.Name.LocalName == "mgv_view_yaw" ) {
m_tuning["mgv_view_yaw"].Options_fromXML( item, type, int.Parse( instance ) );
} }
if ( optRec.ShowCurve || optRec.ShowInvert)
m_profileOptions.Add( optRec ); // add only if something is to tweak..
} }
return true; return retVal;
} }
/// <summary>
/// Collects items from the profile optiontree
/// </summary>
/// <param name="optiontree">The optiontree node</param>
/// <returns>True if OK</returns>
public static bool fromProfileXML( XElement optiontree )
{
/*
//<optiontree type="keyboard" name="root" UIShowInvert="-1" UIShowSensitivity="-1" UISensitivityMin="0.01" UISensitivityMax="6.25" >
// <optiongroup name="master" UILabel="@ui_COMasterSensitivity" UIShowSensitivity="0" UIShowInvert="0" UIShowCurve="0" >
// <optiongroup name="mouse_curves" UILabel="@ui_COMasterSensitivityCurvesMouse" UIShowCurve="-1" UIShowSensitivity="0" UIShowInvert="0" >
*/
log.Debug( "fromProfileXML - Entry" );
bool retVal = true;
string devClass = (string)optiontree.Attribute( "type" );
// mouse arrives as type keyboard - fix it to deviceClass mouse here
if ( KeyboardCls.IsDeviceClass( devClass ) )
devClass = MouseCls.DeviceClass;
IEnumerable<XElement> optiongroups = from x in optiontree.Elements( )
where ( x.Name == "optiongroup" )
select x;
foreach ( XElement optiongroup in optiongroups ) {
retVal &= ReadOptiongroup( optiongroup, devClass, "master" );
}
return retVal;
}
#endregion
} }
} }

@ -1,164 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Windows.Forms;
using SCJMapper_V2.Devices.Joystick;
using SCJMapper_V2.Devices.Gamepad;
namespace SCJMapper_V2.Devices.Options
{
public class OptionsInvert
{
public enum Inversions
{
flight_aim_pitch = 0, // used also as array index - MUST remain 0,
flight_view_pitch,
flight_aim_yaw,
flight_view_yaw,
flight_throttle,
// flight_move_strafe_vertical,
// flight_move_strafe_lateral,
// flight_move_strafe_longitudinal,
I_LAST // designates the last item for loop handling
}
public struct MappedActionRec
{
public MappedActionRec( string m, string a ) { Map = m; Action = a; }
public string Map;
public string Action;
}
// setup of mapped actions as of AC 1.0 (may need a change once in a while...)
//Note: sequence is matched with the Enum above
static public MappedActionRec[] MappedActions = {
new MappedActionRec("spaceship_targeting", "v_aim_pitch"),
new MappedActionRec("spaceship_view", "v_view_pitch"),
new MappedActionRec("spaceship_targeting", "v_aim_yaw"),
new MappedActionRec("spaceship_view", "v_view_yaw"),
new MappedActionRec("spaceship_movement", "v_throttle_abs"),
// new MappedActionRec("spaceship_movement", "v_strafe_vertical"),
// new MappedActionRec("spaceship_movement", "v_strafe_lateral"),
// new MappedActionRec("spaceship_movement", "v_strafe_longitudinal"),
};
private CheckBox m_cbInvert = null;
private DeviceCls m_device = null;
private string m_type = ""; // joystick OR xboxpad
private int m_devInstanceNo = -1; // jsN - instance in XML
string m_option = ""; // the option name (level where it applies)
// ctor
public OptionsInvert( Inversions item )
{
m_option = item.ToString();
}
#region Properties
public DeviceCls GameDevice
{
get { return m_device; }
set
{
m_device = value;
m_type = "";
m_devInstanceNo = -1;
if ( m_device == null ) return; // got a null device
if ( JoystickCls.IsDeviceClass( m_device.DevClass ) ) {
m_type = m_device.DevClass;
m_devInstanceNo = ( m_device as JoystickCls ).JSAssignment;
}
else if ( GamepadCls.IsDeviceClass( m_device.DevClass ) ) {
m_type = m_device.DevClass;
m_devInstanceNo = 1; // supports ONE gamepad
}
}
}
public int DevInstanceNo
{
get { return m_devInstanceNo; }
}
public bool InvertUsed
{
get { return m_cbInvert.Checked; }
set { m_cbInvert.Checked = value; }
}
public CheckBox CBInvert
{
set { m_cbInvert = value; }
}
#endregion
public void Reset( )
{
m_cbInvert.Checked = false;
}
/// <summary>
/// Format an XML -options- node from the tuning contents
/// </summary>
/// <returns>The XML string or an empty string</returns>
public string Options_toXML( )
{
if ( InvertUsed == false ) return ""; // not used
if ( DevInstanceNo <= 0 ) return ""; // not assigned or not valid...
string tmp = "";
tmp += string.Format( "\t<options type=\"{0}\" instance=\"{1}\">\n", m_type, m_devInstanceNo.ToString( ) );
tmp += string.Format( "\t\t<{0} ", m_option );
if ( InvertUsed ) { // leave this IF in - to allow to extend the code for sensitivity
tmp += string.Format( "invert=\"1\" " );
}
tmp += string.Format( "/> \n" );// CIG get to default expo 2.something if not set to 1 here
tmp += string.Format( "\t</options>\n \n" );
return tmp;
}
/// <summary>
/// Read the options from the XML
/// </summary>
/// <param name="reader">A prepared XML reader</param>
/// <param name="instance">the Joystick instance number</param>
/// <returns></returns>
public bool Options_fromXML( XmlReader reader, string type, int instance )
{
m_type = type;
string invert = "";
m_option = reader.Name;
m_devInstanceNo = instance;
if ( reader.HasAttributes ) {
invert = reader["invert"];
if ( !string.IsNullOrWhiteSpace( invert ) ) {
InvertUsed = false;
if ( invert == "1" ) InvertUsed = true;
}
}
reader.Read( );
return true;
}
}
}

@ -1,5 +1,7 @@
using SCJMapper_V2.Devices.Gamepad; using SCJMapper_V2.Devices.Gamepad;
using SCJMapper_V2.Devices.Joystick; using SCJMapper_V2.Devices.Joystick;
using SCJMapper_V2.Devices.Keyboard;
using SCJMapper_V2.Devices.Mouse;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
@ -11,14 +13,16 @@ using System.Xml.Linq;
namespace SCJMapper_V2.Devices.Options namespace SCJMapper_V2.Devices.Options
{ {
/// <summary>
/// One tuning item - curves, saturation
/// </summary>
public class Tuningoptions : CloneableDictionary<string, OptionTree>, ICloneable public class Tuningoptions : CloneableDictionary<string, OptionTree>, ICloneable
{ {
private static readonly log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod( ).DeclaringType );
#region Static parts #region Static parts
private static readonly log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod( ).DeclaringType ); private static char ID_Delimiter = '⁞'; // rarely used char to build lists
private static char ID_Delimiter = '⁞';
// Translate toID keys to the proper OptionTree.. (reassing stuff) // Translate toID keys to the proper OptionTree.. (reassing stuff)
// index is the DevNumber (DX enum) - value is the JsN/XmlInstance from reassign // index is the DevNumber (DX enum) - value is the JsN/XmlInstance from reassign
@ -49,10 +53,17 @@ namespace SCJMapper_V2.Devices.Options
return string.Format( "{0}{1}{2}", deviceClass, ID_Delimiter, -1 ); // will not be found in the collection return string.Format( "{0}{1}{2}", deviceClass, ID_Delimiter, -1 ); // will not be found in the collection
} }
else { else if ( GamepadCls.IsDeviceClass( deviceClass ) ) {
// gamepad // gamepad
return string.Format( "{0}{1}{2}", deviceClass, ID_Delimiter, instance ); return string.Format( "{0}{1}{2}", deviceClass, ID_Delimiter, instance );
} }
else if ( MouseCls.IsDeviceClass( deviceClass ) ) {
// mouse
return string.Format( "{0}{1}{2}", deviceClass, ID_Delimiter, instance );
}
else {
return string.Format( "{0}{1}{2}", deviceClass, ID_Delimiter, instance );
}
} }
@ -71,7 +82,7 @@ namespace SCJMapper_V2.Devices.Options
return ""; return "";
} }
else { else {
// gamepad // gamepad, mouse
return toIDjs; return toIDjs;
} }
} }
@ -108,7 +119,7 @@ namespace SCJMapper_V2.Devices.Options
else return inst; else return inst;
} }
else { else {
//Gamepad //Gamepad, mouse
return inst; return inst;
} }
} }
@ -218,6 +229,17 @@ namespace SCJMapper_V2.Devices.Options
log.WarnFormat( "cTor - Gamepad DO_ID {0} exists", toid ); log.WarnFormat( "cTor - Gamepad DO_ID {0} exists", toid );
} }
} }
// add mouse if there is any
if ( DeviceInst.MouseRef != null ) {
string toid = TuneOptionID( MouseCls.DeviceClass, 1 );// const -
if ( !this.ContainsKey( toid ) ) {
this.Add( toid, new OptionTree( DeviceInst.MouseRef ) ); // init with disabled defaults
}
else {
log.WarnFormat( "cTor - Mouse DO_ID {0} exists", toid );
}
}
} }
/// <summary> /// <summary>
@ -341,6 +363,15 @@ namespace SCJMapper_V2.Devices.Options
log.InfoFormat( "Read XML Options - xboxpad instance {0} is not available - dropped this content", nInstance ); log.InfoFormat( "Read XML Options - xboxpad instance {0} is not available - dropped this content", nInstance );
} }
} }
else if ( KeyboardCls.IsDeviceClass( type ) ) { // CIG names mouse - keyboard
string toID = TuneOptionID( MouseCls.DeviceClass, nInstance );
if ( this.ContainsKey( toID ) ) {
this[toID].fromXML( options );
}
else {
log.InfoFormat( "Read XML Options - keyboard(mouse) instance {0} is not available - dropped this content", nInstance );
}
}
return true; return true;
} }

@ -544,7 +544,6 @@
this.tdiAddMod3}); this.tdiAddMod3});
this.cmAddDel.Name = "cmAddDel"; this.cmAddDel.Name = "cmAddDel";
this.cmAddDel.Size = new System.Drawing.Size(221, 457); this.cmAddDel.Size = new System.Drawing.Size(221, 457);
this.cmAddDel.Closed += new System.Windows.Forms.ToolStripDropDownClosedEventHandler(this.cmAddDel_Closed);
this.cmAddDel.Opening += new System.ComponentModel.CancelEventHandler(this.cmAddDel_Opening); this.cmAddDel.Opening += new System.ComponentModel.CancelEventHandler(this.cmAddDel_Opening);
// //
// tdiCollapseAll // tdiCollapseAll

@ -139,12 +139,36 @@ namespace SCJMapper_V2
AppSettings.Instance.DefMappingName = mapName; AppSettings.Instance.Save( ); AppSettings.Instance.DefMappingName = mapName; AppSettings.Instance.Save( );
} }
/// <summary>
/// Indicates if the SC directory is a valid one
/// </summary>
private void SCFileIndication()
{
if ( string.IsNullOrEmpty( SCPath.SCClientMappingPath ) ) msSelectMapping.BackColor = MyColors.InvalidColor;
else msSelectMapping.BackColor = MyColors.MappingColor;
}
/// <summary>
/// Checks if a rectangle is visible on any screen
/// </summary>
/// <param name="formRect"></param>
/// <returns>True if visible</returns>
private static bool IsOnScreen( Rectangle formRect )
{
Screen[] screens = Screen.AllScreens;
foreach ( Screen screen in screens ) {
if ( screen.WorkingArea.Contains( formRect ) ) {
return true;
}
}
return false;
}
#endregion #endregion
#region Main Form Handling #region Main Form Handling
public MainForm() public MainForm()
{ {
@ -176,6 +200,29 @@ namespace SCJMapper_V2
} }
private void MainForm_FormClosing( object sender, FormClosingEventArgs e )
{
log.Debug( "MainForm_FormClosing - Entry" );
// don't record minimized, maximized forms
if ( this.WindowState == FormWindowState.Normal ) {
AppSettings.Instance.FormSize = this.Size;
AppSettings.Instance.FormLocation = this.Location;
}
if ( FTAB != null ) {
AppSettings.Instance.FormTableLocation = FTAB.LastLocation;
AppSettings.Instance.FormTableSize = FTAB.LastSize;
AppSettings.Instance.FormTableColumnWidth = FTAB.LastColSize;
FTAB.Close( );
FTAB = null;
}
AppSettings.Instance.Save( );
}
private void LoadMappingDD() private void LoadMappingDD()
{ {
SCMappings.UpdateMappingNames( ); SCMappings.UpdateMappingNames( );
@ -190,16 +237,6 @@ namespace SCJMapper_V2
} }
} }
/// <summary>
/// Indicates if the SC directory is a valid one
/// </summary>
private void SCFileIndication()
{
if ( string.IsNullOrEmpty( SCPath.SCClientMappingPath ) ) msSelectMapping.BackColor = MyColors.InvalidColor;
else msSelectMapping.BackColor = MyColors.MappingColor;
}
/// <summary> /// <summary>
/// Handle the load event /// Handle the load event
/// </summary> /// </summary>
@ -210,10 +247,11 @@ namespace SCJMapper_V2
log.Debug( "MainForm_Load - Entry" ); log.Debug( "MainForm_Load - Entry" );
// some applic initialization // some applic initialization
// Assign Size property, since databinding to Size doesn't work well. // Assign Size property - check if on screen, else use defaults
if ( IsOnScreen( new Rectangle( AppSettings.Instance.FormLocation, AppSettings.Instance.FormSize ) ) ) {
this.Size = AppSettings.Instance.FormSize; this.Size = AppSettings.Instance.FormSize;
this.Location = AppSettings.Instance.FormLocation; this.Location = AppSettings.Instance.FormLocation;
}
string version = Application.ProductVersion; // get the version information string version = Application.ProductVersion; // get the version information
// BETA VERSION; TODO - comment out if not longer // BETA VERSION; TODO - comment out if not longer
@ -237,6 +275,7 @@ namespace SCJMapper_V2
if ( Enum.TryParse( AppSettings.Instance.UseLanguage, out SCUiText.Languages lang ) ) { if ( Enum.TryParse( AppSettings.Instance.UseLanguage, out SCUiText.Languages lang ) ) {
SCUiText.Instance.Language = lang; SCUiText.Instance.Language = lang;
} }
treeView1.ShowNodeToolTips = AppSettings.Instance.ShowTreeTips;
// load mappings // load mappings
log.Debug( "Loading Mappings" ); log.Debug( "Loading Mappings" );
@ -437,7 +476,6 @@ namespace SCJMapper_V2
// apply a default JS to Joystick mapping - can be changed and reloaded from XML mappings // apply a default JS to Joystick mapping - can be changed and reloaded from XML mappings
// must take care of Gamepads if there are (but we take care of one only...) // must take care of Gamepads if there are (but we take care of one only...)
//@@@@@@@
int joyStickIndex = 0; // Joystick List Index int joyStickIndex = 0; // Joystick List Index
for ( int deviceTabIndex = 0; deviceTabIndex < JoystickCls.JSnum_MAX; deviceTabIndex++ ) { for ( int deviceTabIndex = 0; deviceTabIndex < JoystickCls.JSnum_MAX; deviceTabIndex++ ) {
if ( tc1.TabPages.Count > deviceTabIndex ) { if ( tc1.TabPages.Count > deviceTabIndex ) {
@ -457,8 +495,6 @@ namespace SCJMapper_V2
m_AT.FilterTree( txFilter.Text ); m_AT.FilterTree( txFilter.Text );
} }
// Helper: collect the joysticks here // Helper: collect the joysticks here
struct myDxJoystick struct myDxJoystick
{ {
@ -472,45 +508,44 @@ namespace SCJMapper_V2
/// <returns></returns> /// <returns></returns>
public bool InitDirectInput() public bool InitDirectInput()
{ {
log.Debug( "Entry" ); log.Debug( "InitDirectInput - Entry" );
// Enumerate gamepads in the system. // Enumerate gamepads in the system.
SharpDX.XInput.UserIndex gpDeviceIndex = SharpDX.XInput.UserIndex.Any; SharpDX.XInput.UserIndex gpDeviceIndex = SharpDX.XInput.UserIndex.Any;
// Initialize DirectInput // Initialize DirectInput
log.Debug( "Instantiate DirectInput" ); log.Debug( " - Instantiate DirectInput" );
var directInput = new DirectInput( ); var directInput = new DirectInput( );
try { try {
log.Debug( "Get Keyboard device" ); log.Debug( " - Get Keyboard device" );
DeviceInst.KeyboardInst = new KeyboardCls( new SharpDX.DirectInput.Keyboard( directInput ), this ); DeviceInst.KeyboardInst = new KeyboardCls( new SharpDX.DirectInput.Keyboard( directInput ), this );
log.Debug( "Get Mouse device" ); log.Debug( " - Get Mouse device" );
DeviceInst.MouseInst = new MouseCls( new SharpDX.DirectInput.Mouse( directInput ), this ); DeviceInst.MouseInst = new MouseCls( new SharpDX.DirectInput.Mouse( directInput ), this );
} }
catch ( Exception ex ) { catch ( Exception ex ) {
log.Debug( "InitDirectInput phase 1 failed unexpectedly", ex ); log.Debug( " *** InitDirectInput phase 1 failed unexpectedly", ex );
return false; return false;
} }
List<myDxJoystick> dxJoysticks = new List<myDxJoystick>( ); List<myDxJoystick> dxJoysticks = new List<myDxJoystick>( );
SharpDX.XInput.Controller dxGamepad = null; SharpDX.XInput.Controller dxGamepad = null;
try { try {
// scan the Input for attached devices // scan the Input for attached devices
log.Debug( "Scan GameControl devices" ); log.Debug( " - Scan GameControl devices" );
foreach ( DeviceInstance instance in directInput.GetDevices( DeviceClass.GameControl, DeviceEnumerationFlags.AttachedOnly ) ) { foreach ( DeviceInstance instance in directInput.GetDevices( DeviceClass.GameControl, DeviceEnumerationFlags.AttachedOnly ) ) {
log.InfoFormat( "GameControl: Type:{0} Device:{1}", instance.Type.ToString( ), instance.ProductName ); log.InfoFormat( " - GameControl: Type:{0} Device:{1}", instance.Type.ToString( ), instance.ProductName );
// Create the device interface // Create the device interface
log.Debug( "Create the device interface" ); log.Debug( " - Create the device interface" );
if ( AppSettings.Instance.DetectGamepad && ( instance.Usage == SharpDX.Multimedia.UsageId.GenericGamepad ) ) { if ( AppSettings.Instance.DetectGamepad && ( instance.Usage == SharpDX.Multimedia.UsageId.GenericGamepad ) ) {
// detect Gamepad only if the user wishes to do so // detect Gamepad only if the user wishes to do so
for ( SharpDX.XInput.UserIndex i = SharpDX.XInput.UserIndex.One; i < SharpDX.XInput.UserIndex.Four; i++ ) { for ( SharpDX.XInput.UserIndex i = SharpDX.XInput.UserIndex.One; i < SharpDX.XInput.UserIndex.Four; i++ ) {
dxGamepad = new SharpDX.XInput.Controller( i ); dxGamepad = new SharpDX.XInput.Controller( i );
if ( dxGamepad.IsConnected ) { if ( dxGamepad.IsConnected ) {
log.InfoFormat( "Scan Input {0} for gamepad - {1}", i, dxGamepad.GetCapabilities( SharpDX.XInput.DeviceQueryType.Gamepad ).ToString( ) ); log.InfoFormat( " - Scan Input {0} for gamepad - {1}", i, dxGamepad.GetCapabilities( SharpDX.XInput.DeviceQueryType.Gamepad ).ToString( ) );
gpDeviceIndex = i; gpDeviceIndex = i;
break; // get only the first one break; // get only the first one
} }
@ -521,25 +556,24 @@ namespace SCJMapper_V2
myJs.js = new SharpDX.DirectInput.Joystick( directInput, instance.InstanceGuid ); myJs.js = new SharpDX.DirectInput.Joystick( directInput, instance.InstanceGuid );
myJs.prodName = instance.ProductName; myJs.prodName = instance.ProductName;
dxJoysticks.Add( myJs ); dxJoysticks.Add( myJs );
log.DebugFormat( "Create the device interface for: {0}", myJs.prodName ); log.DebugFormat( " - Create the device interface for: {0}", myJs.prodName );
} }
} }
} }
catch ( Exception ex ) { catch ( Exception ex ) {
log.Debug( "InitDirectInput phase 2 failed unexpectedly", ex ); log.Debug( " *** InitDirectInput phase 2 failed unexpectedly", ex );
return false; return false;
} }
int tabs = 0; int tabs = 0;
// make the GP the first device if there is one. // make the GP the first device if there is one.
if ( dxGamepad != null ) { if ( dxGamepad != null ) {
log.Debug( "Add first Gamepad panel" ); log.Debug( " - Add first Gamepad panel" );
tc1.TabPages[tabs].Text = "Gamepad "; tc1.TabPages[tabs].Text = "Gamepad ";
UC_GpadPanel uUC_GpadPanelNew = new UC_GpadPanel( ); tc1.TabPages[tabs].Controls.Add( uUC_GpadPanelNew ); UC_GpadPanel uUC_GpadPanelNew = new UC_GpadPanel( ); tc1.TabPages[tabs].Controls.Add( uUC_GpadPanelNew );
uUC_GpadPanelNew.Size = UC_JoyPanel.Size; uUC_GpadPanelNew.Location = UC_JoyPanel.Location; uUC_GpadPanelNew.Size = UC_JoyPanel.Size; uUC_GpadPanelNew.Location = UC_JoyPanel.Location;
UC_JoyPanel.Enabled = false; UC_JoyPanel.Visible = false; // don't use this one UC_JoyPanel.Enabled = false; UC_JoyPanel.Visible = false; // don't use this one
log.Debug( "Create Gamepad instance" ); log.Debug( " - Create Gamepad instance" );
DeviceInst.GamepadInst = new GamepadCls( dxGamepad, uUC_GpadPanelNew, tabs ); // does all device related activities for that particular item DeviceInst.GamepadInst = new GamepadCls( dxGamepad, uUC_GpadPanelNew, tabs ); // does all device related activities for that particular item
DeviceInst.GamepadRef.SetDeviceName( GamepadCls.DevNameCIG ); // this is fixed ... DeviceInst.GamepadRef.SetDeviceName( GamepadCls.DevNameCIG ); // this is fixed ...
tc1.TabPages[tabs].ToolTipText = string.Format( "{0}\n{1}", DeviceInst.GamepadRef.DevName, " " ); tc1.TabPages[tabs].ToolTipText = string.Format( "{0}\n{1}", DeviceInst.GamepadRef.DevName, " " );
@ -559,22 +593,20 @@ namespace SCJMapper_V2
JoystickCls js = null; UC_JoyPanel uUC_JoyPanelNew = null; JoystickCls js = null; UC_JoyPanel uUC_JoyPanelNew = null;
if ( tabs == 0 ) { if ( tabs == 0 ) {
// first panel - The Tab content exists already // first panel - The Tab content exists already
log.Debug( "Add first Joystick panel" ); log.Debug( " - Add first Joystick panel" );
uUC_JoyPanelNew = UC_JoyPanel; uUC_JoyPanelNew = UC_JoyPanel;
} }
else { else {
log.Debug( "Add next Joystick panel" ); log.Debug( " - Add next Joystick panel" );
// setup the further tab contents along the reference one in TabPage[0] (the control named UC_JoyPanel) // setup the further tab contents along the reference one in TabPage[0] (the control named UC_JoyPanel)
tc1.TabPages.Add( "" ); // numbering is 1 based for the user tc1.TabPages.Add( "" ); // numbering is 1 based for the user
uUC_JoyPanelNew = new UC_JoyPanel( ); tc1.TabPages[tabs].Controls.Add( uUC_JoyPanelNew ); uUC_JoyPanelNew = new UC_JoyPanel( ); tc1.TabPages[tabs].Controls.Add( uUC_JoyPanelNew );
uUC_JoyPanelNew.Size = UC_JoyPanel.Size; uUC_JoyPanelNew.Location = UC_JoyPanel.Location; uUC_JoyPanelNew.Size = UC_JoyPanel.Size; uUC_JoyPanelNew.Location = UC_JoyPanel.Location;
//uUC_JoyPanelNew.Dock = UC_JoyPanel.Dock; uUC_JoyPanelNew.Anchor = UC_JoyPanel.Anchor;
//uUC_JoyPanelNew.AutoScaleMode = UC_JoyPanel.AutoScaleMode; uUC_JoyPanelNew.AutoSize = UC_JoyPanel.AutoSize;
} }
// common part // common part
tc1.TabPages[tabs].Text = string.Format( "Joystick {0}", nJs + 1 ); // numbering is 1 based for the user tc1.TabPages[tabs].Text = string.Format( "Joystick {0}", nJs + 1 ); // numbering is 1 based for the user
log.Debug( "Create Joystick instance " + nJs.ToString( ) ); log.Debug( " - Create Joystick instance " + nJs.ToString( ) );
js = new JoystickCls( myJs.js, this, nJs, uUC_JoyPanelNew, tabs ); // does all device related activities for that particular item js = new JoystickCls( myJs.js, this, nJs, uUC_JoyPanelNew, tabs ); // does all device related activities for that particular item
DeviceInst.JoystickListRef.Add( js ); // add to joystick list DeviceInst.JoystickListRef.Add( js ); // add to joystick list
tc1.TabPages[tabs].ToolTipText = string.Format( "{0}\n{1}", js.DevName, js.DevInstanceGUID ); tc1.TabPages[tabs].ToolTipText = string.Format( "{0}\n{1}", js.DevName, js.DevInstanceGUID );
@ -588,16 +620,16 @@ namespace SCJMapper_V2
if ( tabs >= JoystickCls.JSnum_MAX ) break; // cannot load more JSticks than predefined Tabs if ( tabs >= JoystickCls.JSnum_MAX ) break; // cannot load more JSticks than predefined Tabs
} }
log.DebugFormat( "Added {0} GameControl devices", tabs ); log.DebugFormat( " - Added {0} GameControl devices", tabs );
if ( tabs == 0 ) { if ( tabs == 0 ) {
log.Warn( "Unable to find and/or create any joystick devices." ); log.Warn( " - Unable to find and/or create any joystick devices." );
MessageBox.Show( "Unable to create a joystick device. Program will exit.", "No joystick found", MessageBoxButtons.OK, MessageBoxIcon.Information ); MessageBox.Show( "Unable to create a joystick device. Program will exit.", "No joystick found", MessageBoxButtons.OK, MessageBoxIcon.Information );
return false; return false;
} }
// load the profile items from the XML // load the profile items from the XML
log.Debug( "Init ActionTree" ); log.Debug( " - End of, InitActionTree now" );
InitActionTree( true ); InitActionTree( true );
return true; return true;
@ -605,8 +637,7 @@ namespace SCJMapper_V2
#endregion #endregion
#region Tree Handling
/// <summary> /// <summary>
/// Grab the rtb data and load them into config /// Grab the rtb data and load them into config
@ -683,30 +714,11 @@ namespace SCJMapper_V2
txRebind.Text = "pp_rebindkeys " + map; txRebind.Text = "pp_rebindkeys " + map;
} }
#endregion
#region Event Handling #region Event Handling
// Form Events // *** Timer Events
private void MainForm_FormClosing( object sender, FormClosingEventArgs e )
{
log.Debug( "MainForm_FormClosing - Entry" );
AppSettings.Instance.FormSize = this.Size;
AppSettings.Instance.FormLocation = this.Location;
if ( FTAB != null ) {
AppSettings.Instance.FormTableLocation = FTAB.LastLocation;
AppSettings.Instance.FormTableSize = FTAB.LastSize;
AppSettings.Instance.FormTableColumnWidth = FTAB.LastColSize;
FTAB.Close( );
FTAB = null;
}
AppSettings.Instance.Save( );
}
// polls the devices to get the latest update // polls the devices to get the latest update
private void timer1_Tick( object sender, System.EventArgs e ) private void timer1_Tick( object sender, System.EventArgs e )
@ -715,7 +727,6 @@ namespace SCJMapper_V2
m_modifierTimeout -= timer1.Interval; // decrement timeout m_modifierTimeout -= timer1.Interval; // decrement timeout
if ( m_modifierTimeout < 0 ) m_modifierTimeout = 0; // prevent undeflow after long time not using modifiers if ( m_modifierTimeout < 0 ) m_modifierTimeout = 0; // prevent undeflow after long time not using modifiers
if ( m_keyIn || tc1.SelectedTab.Tag == null ) return; // don't handle those if ( m_keyIn || tc1.SelectedTab.Tag == null ) return; // don't handle those
string ctrl = ""; string ctrl = "";
@ -758,7 +769,7 @@ namespace SCJMapper_V2
} }
// TreeView Events // *** TreeView Events
private void treeView1_NodeMouseClick( object sender, TreeNodeMouseClickEventArgs e ) private void treeView1_NodeMouseClick( object sender, TreeNodeMouseClickEventArgs e )
{ {
@ -770,12 +781,12 @@ namespace SCJMapper_V2
// Action Tree Event - manages the de/selection of a node // Action Tree Event - manages the de/selection of a node
private void M_AT_NodeSelectedEvent( object sender, ActionTreeEventArgs e ) private void M_AT_NodeSelectedEvent( object sender, ActionTreeEventArgs e )
{ {
lblAction.Text = e.SelectedAction; lblAction.Text = SCUiText.Instance.Text( e.SelectedAction );
lblAssigned.Text = e.SelectedCtrl; lblAssigned.Text = e.SelectedCtrl;
} }
// Show options // *** Show options
private void cbxShowTreeOptions_CheckedChanged( object sender, EventArgs e ) private void cbxShowTreeOptions_CheckedChanged( object sender, EventArgs e )
{ {
@ -791,11 +802,12 @@ namespace SCJMapper_V2
// Assign Panel Items // *** Assign Panel Items
private void btFind_Click( object sender, EventArgs e ) private void btFind_Click( object sender, EventArgs e )
{ {
m_AT.FindAndSelectCtrl( JoystickCls.MakeThrottle( lblLastJ.Text, cbxThrottle.Checked ), "" ); // find the action for a Control (joystick input)
m_AT.FindAndSelectCtrl( JoystickCls.MakeThrottle( Act.DevInput( lblLastJ.Text, InputMode ), cbxThrottle.Checked ), "" ); // find the action for a Control (joystick input)
} }
private void btAssign_Click( object sender, EventArgs e ) private void btAssign_Click( object sender, EventArgs e )
@ -811,7 +823,7 @@ namespace SCJMapper_V2
private void btBlend_Click( object sender, EventArgs e ) private void btBlend_Click( object sender, EventArgs e )
{ {
log.Debug( "btBlend_Click" ); log.Debug( "btBlend_Click" );
if ( m_AT.CanBlendBinding ) { if ( m_AT.CanDisableBinding ) {
m_AT.DisableBinding( ); m_AT.DisableBinding( );
UpdateTableSelectedItem( ); UpdateTableSelectedItem( );
if ( m_AT.Dirty ) btDump.BackColor = MyColors.DirtyColor; if ( m_AT.Dirty ) btDump.BackColor = MyColors.DirtyColor;
@ -822,7 +834,7 @@ namespace SCJMapper_V2
private void btClear_Click( object sender, EventArgs e ) private void btClear_Click( object sender, EventArgs e )
{ {
log.Debug( "btClear_Click" ); log.Debug( "btClear_Click" );
if ( m_AT.CanClearBinding || m_AT.CanBlendBinding ) { if ( m_AT.CanClearBinding || m_AT.CanDisableBinding ) {
m_AT.ClearBinding( ); m_AT.ClearBinding( );
UpdateTableSelectedItem( ); UpdateTableSelectedItem( );
if ( m_AT.Dirty ) btDump.BackColor = MyColors.DirtyColor; if ( m_AT.Dirty ) btDump.BackColor = MyColors.DirtyColor;
@ -830,7 +842,7 @@ namespace SCJMapper_V2
else MySounds.PlayCannot( ); else MySounds.PlayCannot( );
} }
// General Area Items // *** General Area Items
private void btDump_Click( object sender, EventArgs e ) private void btDump_Click( object sender, EventArgs e )
{ {
@ -857,7 +869,7 @@ namespace SCJMapper_V2
AppSettings.Instance.AutoTabXML = cbxAutoTabXML.Checked; AppSettings.Instance.Save( ); AppSettings.Instance.AutoTabXML = cbxAutoTabXML.Checked; AppSettings.Instance.Save( );
} }
// Toolstrip Items // *** Toolstrip Items
private void meResetDefaults_Click( object sender, EventArgs e ) private void meResetDefaults_Click( object sender, EventArgs e )
{ {
@ -906,7 +918,7 @@ namespace SCJMapper_V2
Dump( ); Dump( );
} }
// Dialogs // *** Dialogs
// Show the Table Window // Show the Table Window
private void meShowToggleTable_Click( object sender, EventArgs e ) private void meShowToggleTable_Click( object sender, EventArgs e )
@ -924,11 +936,9 @@ namespace SCJMapper_V2
AppSettings.Instance.FormTableLocation = FTAB.LastLocation; AppSettings.Instance.FormTableLocation = FTAB.LastLocation;
AppSettings.Instance.FormTableColumnWidth = FTAB.LastColSize; AppSettings.Instance.FormTableColumnWidth = FTAB.LastColSize;
FTAB.Hide( ); FTAB.Hide( );
} }
else { else {
FTAB.Show( ); FTAB.Show( );
if ( created ) { if ( created ) {
FTAB.Size = AppSettings.Instance.FormTableSize; FTAB.Size = AppSettings.Instance.FormTableSize;
FTAB.Location = AppSettings.Instance.FormTableLocation; FTAB.Location = AppSettings.Instance.FormTableLocation;
@ -946,14 +956,20 @@ namespace SCJMapper_V2
FormOptions OPT = new FormOptions( ); FormOptions OPT = new FormOptions( );
// Have to attach here to capture the currently valid settings // Have to attach here to capture the currently valid settings
UpdateTuningItems( ); // cleanup - Actions will be assigned new in below calls
UpdateMoreOptionItems( ); m_AT.ActionMaps.DeviceOptions.ResetDynamicItems( );
m_AT.ActionMaps.TuningOptions.ResetDynamicItems( );
UpdateAllTuningItems( JoystickCls.DeviceClass );
UpdateAllTuningItems( GamepadCls.DeviceClass );
UpdateAllTuningItems( MouseCls.DeviceClass );
DeviceList devlist = new DeviceList( ); DeviceList devlist = new DeviceList( );
if ( AppSettings.Instance.DetectGamepad && ( DeviceInst.GamepadRef != null ) ) { if ( AppSettings.Instance.DetectGamepad && ( DeviceInst.GamepadRef != null ) ) {
devlist.Add( DeviceInst.GamepadRef ); devlist.Add( DeviceInst.GamepadRef );
} }
devlist.AddRange( DeviceInst.JoystickListRef ); devlist.AddRange( DeviceInst.JoystickListRef );
devlist.Add( DeviceInst.MouseRef );
OPT.TuningOptions = m_AT.ActionMaps.TuningOptions; OPT.TuningOptions = m_AT.ActionMaps.TuningOptions;
OPT.DeviceOptions = m_AT.ActionMaps.DeviceOptions; OPT.DeviceOptions = m_AT.ActionMaps.DeviceOptions;
@ -976,7 +992,12 @@ namespace SCJMapper_V2
JSCAL = new OGL.FormJSCalCurve( ); JSCAL = new OGL.FormJSCalCurve( );
// Have to attach here to capture the currently valid settings // Have to attach here to capture the currently valid settings
// cleanup - Actions will be assigned new in below calls
m_AT.ActionMaps.DeviceOptions.ResetDynamicItems( );
m_AT.ActionMaps.TuningOptions.ResetDynamicItems( );
UpdateTuningItems( ); UpdateTuningItems( );
// run // run
JSCAL.TuningOptions = m_AT.ActionMaps.TuningOptions; JSCAL.TuningOptions = m_AT.ActionMaps.TuningOptions;
JSCAL.ShowDialog( this ); JSCAL.ShowDialog( this );
@ -989,7 +1010,8 @@ namespace SCJMapper_V2
} }
// Settings // *** Settings
private void meSettingsDialog_Click( object sender, EventArgs e ) private void meSettingsDialog_Click( object sender, EventArgs e )
{ {
// have to stop polling while the Settings window is open // have to stop polling while the Settings window is open
@ -1004,6 +1026,8 @@ namespace SCJMapper_V2
if ( Enum.TryParse( AppSettings.Instance.UseLanguage, out SCUiText.Languages lang ) ) { if ( Enum.TryParse( AppSettings.Instance.UseLanguage, out SCUiText.Languages lang ) ) {
SCUiText.Instance.Language = lang; SCUiText.Instance.Language = lang;
} }
treeView1.ShowNodeToolTips = AppSettings.Instance.ShowTreeTips;
// now update the contents according to new settings // now update the contents according to new settings
foreach ( JoystickCls j in DeviceInst.JoystickListRef ) j.ApplySettings( ); // update Seetings foreach ( JoystickCls j in DeviceInst.JoystickListRef ) j.ApplySettings( ); // update Seetings
m_AT.IgnoreMaps = AppSettings.Instance.IgnoreActionmaps; m_AT.IgnoreMaps = AppSettings.Instance.IgnoreActionmaps;
@ -1011,7 +1035,6 @@ namespace SCJMapper_V2
InitActionTree( false ); InitActionTree( false );
UpdateTable( ); UpdateTable( );
} }
timer1.Enabled = true; timer1.Enabled = true;
} }
@ -1048,7 +1071,7 @@ namespace SCJMapper_V2
timer1.Enabled = true; timer1.Enabled = true;
} }
// Load maps // *** Load maps
private void msSelectMapping_DropDownItemClicked( object sender, ToolStripItemClickedEventArgs e ) private void msSelectMapping_DropDownItemClicked( object sender, ToolStripItemClickedEventArgs e )
{ {
@ -1106,31 +1129,7 @@ namespace SCJMapper_V2
} }
// *** Context Menu Items
private void tsDDbtMappings_DropDownItemClicked( object sender, ToolStripItemClickedEventArgs e )
{
}
private void loadToolStripMenuItem_Click( object sender, EventArgs e )
{
}
private void loadAndGrabToolStripMenuItem_Click( object sender, EventArgs e )
{
}
private void resetLoadAndGrabToolStripMenuItem_Click( object sender, EventArgs e )
{
}
private void defaultsLoadAndGrabToolStripMenuItem_Click( object sender, EventArgs e )
{
}
// Context Menu Items
// RTB Menu // RTB Menu
private void tsiCopy_Click( object sender, EventArgs e ) private void tsiCopy_Click( object sender, EventArgs e )
@ -1175,7 +1174,7 @@ namespace SCJMapper_V2
} }
} }
// Node Menu // *** Node Menu
private ActivationMode m_prevActivationMode = new ActivationMode( ActivationMode.Default ); private ActivationMode m_prevActivationMode = new ActivationMode( ActivationMode.Default );
@ -1193,13 +1192,12 @@ namespace SCJMapper_V2
tdiAssignBinding.Text = "Assign: " + JoystickCls.MakeThrottle( lblLastJ.Text, cbxThrottle.Checked ); tdiAssignBinding.Text = "Assign: " + JoystickCls.MakeThrottle( lblLastJ.Text, cbxThrottle.Checked );
} }
tdiAssignBinding.Visible = m_AT.CanAssignBinding; any2 = any2 || m_AT.CanAssignBinding; // Assign tdiAssignBinding.Visible = m_AT.CanAssignBinding; any2 = any2 || m_AT.CanAssignBinding; // Assign
tdiBlendBinding.Visible = m_AT.CanBlendBinding; any2 = any2 || m_AT.CanBlendBinding; // Blend tdiBlendBinding.Visible = m_AT.CanDisableBinding; any2 = any2 || m_AT.CanDisableBinding; // Blend
tdiClearBinding.Visible = m_AT.CanClearBinding; any2 = any2 || m_AT.CanClearBinding; // Clear tdiClearBinding.Visible = m_AT.CanClearBinding; any2 = any2 || m_AT.CanClearBinding; // Clear
tdiAddBinding.Visible = m_AT.CanAddBinding; any3 = any3 || m_AT.CanAddBinding; // Add tdiAddBinding.Visible = m_AT.CanAddBinding; any3 = any3 || m_AT.CanAddBinding; // Add
tdiDelBinding.Visible = m_AT.CanDelBinding; any3 = any3 || m_AT.CanDelBinding; // Del tdiDelBinding.Visible = m_AT.CanDelBinding; any3 = any3 || m_AT.CanDelBinding; // Del
// handle activation modes - there is a default one and the list of choosable ones // handle activation modes - there is a default one and the list of choosable ones
// there is no further decision on can or cannot - any(2) is enough to know // there is no further decision on can or cannot - any(2) is enough to know
tdiCbxActivation.Visible = false; tdiCbxActivation.Visible = false;
@ -1225,11 +1223,6 @@ namespace SCJMapper_V2
e.Cancel = false; // !( any2 || any3 ); e.Cancel = false; // !( any2 || any3 );
} }
// after user entry of the context menu - see if one has changed the ActivationMode
private void cmAddDel_Closed( object sender, ToolStripDropDownClosedEventArgs e )
{
}
// Collapses all but the selected node or the part where it is in // Collapses all but the selected node or the part where it is in
private void tdiCollapseAll_Click( object sender, EventArgs e ) private void tdiCollapseAll_Click( object sender, EventArgs e )
{ {
@ -1339,7 +1332,7 @@ namespace SCJMapper_V2
if ( droppedFilenames.Length > 0 ) rtb.LoadFile( droppedFilenames[0], RichTextBoxStreamType.PlainText ); if ( droppedFilenames.Length > 0 ) rtb.LoadFile( droppedFilenames[0], RichTextBoxStreamType.PlainText );
} }
// XML load and save // *** XML load and save
private void btSaveMyMapping_Click( object sender, EventArgs e ) private void btSaveMyMapping_Click( object sender, EventArgs e )
{ {
bool cancel = false; bool cancel = false;
@ -1379,7 +1372,7 @@ namespace SCJMapper_V2
} }
} }
// Hyperlink // *** Hyperlink
private void linkLblReleases_LinkClicked( object sender, LinkLabelLinkClickedEventArgs e ) private void linkLblReleases_LinkClicked( object sender, LinkLabelLinkClickedEventArgs e )
{ {
@ -1395,7 +1388,7 @@ namespace SCJMapper_V2
// Joystick Tuning // *** Joystick Tuning
private void cbxInv_XY_MouseClick( object sender, MouseEventArgs e ) private void cbxInv_XY_MouseClick( object sender, MouseEventArgs e )
{ {
@ -1407,145 +1400,125 @@ namespace SCJMapper_V2
/// <summary> /// <summary>
/// Updates Gamedevice, Nodetext for one Tuning (Option) item from current assignment /// Updates Gamedevice, Nodetext for one Tuning (Option) item from current assignment
/// </summary> /// </summary>
/// <param name="optionName">THe option to handle</param> /// <param name="deviceClass">The device class</param>
/// <param name="optionName">The option to handle</param>
/// <param name="action">The corresponding action</param> /// <param name="action">The corresponding action</param>
/// <param name="actionmap">The actionmap to search for the action</param> /// <param name="actionmap">The actionmap to search for the action</param>
private void UpdateOptionItem( string optionName, string action, string actionmap ) private bool UpdateTuningForDevice( string deviceClass, string optionName, string action, string actionmap )
{ {
// get current mapping from ActionMaps
string nodeText = "";
// attach Yaw command
DeviceTuningParameter tuning = null; DeviceTuningParameter tuning = null;
DeviceCls dev = null; DeviceCls dev = null;
string find = ""; string match = "";
string nodeText = "";
// find action item for Joysticks
find = ActionTreeNode.ComposeNodeActionText( action, "js" );
nodeText = m_AT.FindText( actionmap, find ); // returns "" or a complete text ("action - command")
if ( !string.IsNullOrWhiteSpace( nodeText ) ) {
if ( !Act.IsDisabledInput( ActionTreeNode.CommandFromActionText( nodeText ) ) ) {
dev = DeviceInst.JoystickListRef.Find_jsN( JoystickCls.JSNum( ActionTreeNode.CommandFromActionText( nodeText ) ) );
if ( dev != null ) {
// find the tuning item of the action
string toID = Tuningoptions.TuneOptionIDfromJsN( JoystickCls.DeviceClass, dev.XmlInstance );
OptionTree ot = m_AT.ActionMaps.TuningOptions.OptionTreeFromToID( toID );
if ( ot != null ) tuning = ot.TuningItem( optionName ); // set defaults
}
}
}
if ( dev == null ) { if ( JoystickCls.IsDeviceClass( deviceClass ) ) {
// nothing found? find action item for GPads match = ActionTreeNode.ComposeNodeActionText( action, "js" );
find = ActionTreeNode.ComposeNodeActionText( action, "xi" ); }
nodeText = m_AT.FindText( actionmap, find ); else if ( GamepadCls.IsDeviceClass( deviceClass ) ) {
if ( !string.IsNullOrWhiteSpace( nodeText ) ) { match = ActionTreeNode.ComposeNodeActionText( action, "xi" );
if ( !Act.IsDisabledInput( ActionTreeNode.CommandFromActionText( nodeText ) ) ) {
dev = DeviceInst.GamepadRef;
if ( dev != null ) {
// find the tuning item of the action
string toID = Tuningoptions.TuneOptionIDfromJsN( GamepadCls.DeviceClass, dev.XmlInstance );
OptionTree ot = m_AT.ActionMaps.TuningOptions.OptionTreeFromToID( toID );
if ( ot != null ) tuning = ot.TuningItem( optionName ); // set defaults
}
}
}
} }
// dev might be null here if no device for the action was found else if ( MouseCls.IsDeviceClass( deviceClass ) ) {
// tuning might be null here if no tuningitem for the device action was found (which should not happen !!) match = ActionTreeNode.ComposeNodeActionText( action + "_mouse", "mo" ); // CIG cannot decide on terminology rules at all...
if ( ( dev != null ) && ( tuning == null ) ) {
log.ErrorFormat( "UpdateOptionItem - Tuning item for device not found - dev: {0} - option: {1}", dev.DevName, optionName );
return; // ERROR EXIT
} }
if ( dev != null ) { nodeText = m_AT.FindText( actionmap, match ); // returns "" or a complete text ("action - command")
// having a device and a tuning item here // check for exit states
// JS commands that are supported if ( string.IsNullOrWhiteSpace( nodeText ) ) return false; // EXIT - no node assigned
if ( nodeText.ToLowerInvariant( ).EndsWith( "_x" ) || nodeText.ToLowerInvariant( ).EndsWith( "_rotx" ) || nodeText.ToLowerInvariant( ).EndsWith( "_throttlex" ) if ( Act.IsDisabledInput( ActionTreeNode.CommandFromActionText( nodeText ) ) ) return false; // EXIT disabled item
|| nodeText.ToLowerInvariant( ).EndsWith( "_y" ) || nodeText.ToLowerInvariant( ).EndsWith( "_roty" ) || nodeText.ToLowerInvariant( ).EndsWith( "_throttley" )
|| nodeText.ToLowerInvariant( ).EndsWith( "_Z" ) || nodeText.ToLowerInvariant( ).EndsWith( "_rotz" ) || nodeText.ToLowerInvariant( ).EndsWith( "_throttlez" ) // find the device for the action if it is an axis (analog command)
|| nodeText.ToLowerInvariant( ).EndsWith( "_slider1" ) || nodeText.ToLowerInvariant( ).EndsWith( "_slider2" ) ) { string command = ActionTreeNode.CommandFromActionText( nodeText );
// update dynamic properties if ( JoystickCls.IsAxisCommand( command ) ) {
string doID = Deviceoptions.DevOptionID( dev.DevClass, dev.DevName, nodeText ); dev = DeviceInst.JoystickListRef.Find_jsN( JoystickCls.JSNum( command ) );
if ( m_AT.ActionMaps.DeviceOptions.ContainsKey( doID ) ) {
tuning.AssignDynamicItems( dev, m_AT.ActionMaps.DeviceOptions[doID], nodeText );
}
else {
tuning.AssignDynamicItems( dev, null, nodeText );
}
}
// GP commands that are supported
else if ( nodeText.ToLowerInvariant( ).Contains( "_thumblx" ) || nodeText.ToLowerInvariant( ).Contains( "_thumbrx" )
|| nodeText.ToLowerInvariant( ).Contains( "_thumbly" ) || nodeText.ToLowerInvariant( ).Contains( "_thumbry" ) ) {
// update dynamic properties
tuning.GameDevice = dev;
tuning.NodeText = nodeText;
string doID = Deviceoptions.DevOptionID( dev.DevClass, dev.DevName, nodeText );
if ( m_AT.ActionMaps.DeviceOptions.ContainsKey( doID ) ) {
tuning.AssignDynamicItems( dev, m_AT.ActionMaps.DeviceOptions[doID], nodeText );
}
else {
tuning.AssignDynamicItems( dev, null, nodeText );
}
}
} }
else if ( tuning != null && tuning.DevInstanceNo > 0 ) { else if ( GamepadCls.IsAxisCommand( command ) ) {
// a device was assigned but the action is not mapped dev = DeviceInst.GamepadRef;
// try to find the gamedevice here ?? }
if ( JoystickCls.IsDeviceClass( tuning.DeviceClass ) ) { else if ( MouseCls.IsAxisCommand( command ) ) {
tuning.AssignDynamicItems( DeviceInst.JoystickListRef.Find_jsN( tuning.DevInstanceNo ), null, "" ); dev = DeviceInst.MouseRef;
}
// finally do the job..
if ( dev != null ) {
// find the tuning item of the action
string toID = Tuningoptions.TuneOptionIDfromJsN( deviceClass, dev.XmlInstance );
OptionTree ot = m_AT.ActionMaps.TuningOptions.OptionTreeFromToID( toID );
if ( ot == null ) return false; // EXIT no optiontree for the device
tuning = ot.TuningItem( optionName ); // set defaults
if ( tuning == null ) return false; // EXIT no tuning item for the device
string doID = Deviceoptions.DevOptionID( dev.DevClass, dev.DevName, nodeText );
if ( m_AT.ActionMaps.DeviceOptions.ContainsKey( doID ) ) {
tuning.AssignDynamicItems( dev, m_AT.ActionMaps.DeviceOptions[doID], nodeText );
} }
else if ( GamepadCls.IsDeviceClass( tuning.DeviceClass ) ) { else {
tuning.AssignDynamicItems( DeviceInst.GamepadRef, null, "" ); tuning.AssignDynamicItems( dev, null, nodeText );
} }
} }
return true;
}
/// <summary>
/// Updates the option for the first device found only
/// Used for the Tuning Dialog, only one item can be tuned
/// </summary>
/// <param name="optionName">The option to handle</param>
/// <param name="action">The corresponding action</param>
/// <param name="actionmap">The actionmap to search for the action</param>
private void UpdateTuningPrioritized( string optionName, string action, string actionmap )
{
bool retVal = UpdateTuningForDevice( JoystickCls.DeviceClass, optionName, action, actionmap );
if ( !retVal ) retVal = UpdateTuningForDevice( GamepadCls.DeviceClass, optionName, action, actionmap );
if ( !retVal ) retVal = UpdateTuningForDevice( MouseCls.DeviceClass, optionName, action, actionmap );
} }
/// <summary> /// <summary>
/// Get the assigned controls for some commands used in Tuning Yaw,Pitch,Roll and the Strafe ones /// Get the assigned controls for some commands used in Tuning Yaw,Pitch,Roll and the Strafe ones
/// Connect deviceOption if known /// Connect deviceOption if known
/// </summary> /// </summary>
private void UpdateTuningItems() private void UpdateTuningItems()
{ {
// cleanup - Actions will be assigned new in below calls UpdateTuningPrioritized( "flight_move_pitch", "v_pitch", "spaceship_movement" );
m_AT.ActionMaps.DeviceOptions.ResetDynamicItems( ); UpdateTuningPrioritized( "flight_move_yaw", "v_yaw", "spaceship_movement" );
m_AT.ActionMaps.TuningOptions.ResetDynamicItems( ); UpdateTuningPrioritized( "flight_move_roll", "v_roll", "spaceship_movement" );
// get current mapping from ActionMaps
UpdateOptionItem( "flight_move_pitch", "v_pitch", "spaceship_movement" );
UpdateOptionItem( "flight_move_yaw", "v_yaw", "spaceship_movement" );
UpdateOptionItem( "flight_move_roll", "v_roll", "spaceship_movement" );
UpdateOptionItem( "flight_move_strafe_vertical", "v_strafe_vertical", "spaceship_movement" ); UpdateTuningPrioritized( "flight_move_strafe_vertical", "v_strafe_vertical", "spaceship_movement" );
UpdateOptionItem( "flight_move_strafe_lateral", "v_strafe_lateral", "spaceship_movement" ); UpdateTuningPrioritized( "flight_move_strafe_lateral", "v_strafe_lateral", "spaceship_movement" );
UpdateOptionItem( "flight_move_strafe_longitudinal", "v_strafe_longitudinal", "spaceship_movement" ); UpdateTuningPrioritized( "flight_move_strafe_longitudinal", "v_strafe_longitudinal", "spaceship_movement" );
} }
/// <summary> /// <summary>
/// Get the assigned controls for other Options - if available... /// Get the assigned controls for other Options - if available...
/// </summary> /// </summary>
private void UpdateMoreOptionItems() private void UpdateAllTuningItems( string deviceClass )
{ {
// get current mapping from ActionMaps UpdateTuningForDevice( deviceClass, "flight_move_pitch", "v_pitch", "spaceship_movement" );
UpdateOptionItem( "flight_throttle_abs", "v_throttle_abs", "spaceship_movement" ); UpdateTuningForDevice( deviceClass, "flight_move_yaw", "v_yaw", "spaceship_movement" );
UpdateOptionItem( "flight_throttle_rel", "v_throttle_rel", "spaceship_movement" ); UpdateTuningForDevice( deviceClass, "flight_move_roll", "v_roll", "spaceship_movement" );
UpdateOptionItem( "flight_aim_pitch", "v_aim_pitch", "spaceship_targeting" ); UpdateTuningForDevice( deviceClass, "flight_move_strafe_vertical", "v_strafe_vertical", "spaceship_movement" );
UpdateOptionItem( "flight_aim_yaw", "v_aim_yaw", "spaceship_targeting" ); UpdateTuningForDevice( deviceClass, "flight_move_strafe_lateral", "v_strafe_lateral", "spaceship_movement" );
UpdateTuningForDevice( deviceClass, "flight_move_strafe_longitudinal", "v_strafe_longitudinal", "spaceship_movement" );
UpdateOptionItem( "flight_view_pitch", "v_view_pitch", "spaceship_view" ); UpdateTuningForDevice( deviceClass, "flight_view_pitch", "v_view_pitch", "spaceship_view" );
UpdateOptionItem( "flight_view_yaw", "v_view_yaw", "spaceship_view" ); UpdateTuningForDevice( deviceClass, "flight_view_yaw", "v_view_yaw", "spaceship_view" );
UpdateOptionItem( "turret_aim_pitch", "v_aim_pitch", "spaceship_turret" ); UpdateTuningForDevice( deviceClass, "flight_throttle_abs", "v_throttle_abs", "spaceship_movement" );
UpdateOptionItem( "turret_aim_yaw", "v_aim_yaw", "spaceship_turret" ); UpdateTuningForDevice( deviceClass, "flight_throttle_rel", "v_throttle_rel", "spaceship_movement" );
}
UpdateTuningForDevice( deviceClass, "flight_aim_pitch", "v_aim_pitch", "spaceship_targeting" );
UpdateTuningForDevice( deviceClass, "flight_aim_yaw", "v_aim_yaw", "spaceship_targeting" );
UpdateTuningForDevice( deviceClass, "turret_aim_pitch", "v_aim_pitch", "spaceship_turret" );
UpdateTuningForDevice( deviceClass, "turret_aim_yaw", "v_aim_yaw", "spaceship_turret" );
UpdateTuningForDevice( deviceClass, "mgv_view_pitch", "v_view_pitch", "vehicle_general" );
UpdateTuningForDevice( deviceClass, "mgv_view_yaw", "v_view_yaw", "vehicle_general" );
}
// Keyboard Input // *** Keyboard Input
bool m_keyIn = false; bool m_keyIn = false;
bool m_mouseIn = false; bool m_mouseIn = false;
@ -1644,7 +1617,7 @@ namespace SCJMapper_V2
} }
} }
// Mouse Input // *** Mouse Input
private void cmMouseEntry_Opening( object sender, CancelEventArgs e ) private void cmMouseEntry_Opening( object sender, CancelEventArgs e )
{ {
@ -1702,6 +1675,7 @@ namespace SCJMapper_V2
#endregion #endregion
#region DataTable Handling
// Called when the table must be rebuild // Called when the table must be rebuild
private void UpdateTable() private void UpdateTable()
@ -1722,7 +1696,6 @@ namespace SCJMapper_V2
if ( ( FTAB != null ) && FTAB.Visible ) { if ( ( FTAB != null ) && FTAB.Visible ) {
string actionID = m_AT.SelectedActionID; string actionID = m_AT.SelectedActionID;
m_AT.ActionMaps.UpdateDataSet( FTAB.DS_AMaps, actionID ); m_AT.ActionMaps.UpdateDataSet( FTAB.DS_AMaps, actionID );
// FTAB.UpdateRow( actionID ); seems not needed...
} }
} }
@ -1744,11 +1717,13 @@ namespace SCJMapper_V2
} }
// called when the user if the TAB form wants to edit a row // called when the user if the TAB form wants to edit a row
private void FTAB_EditActionEvent( object sender, EditRowEventArgs e ) private void FTAB_EditActionEvent( object sender, EditRowEventArgs e )
{ {
m_AT.FindAndSelectActionKey( e.Actionmap, e.Actionkey, e.Nodeindex ); m_AT.FindAndSelectActionKey( e.Actionmap, e.Actionkey, e.Nodeindex );
} }
#endregion
} }
} }

@ -128,7 +128,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAA8 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAA8
EAAAAk1TRnQBSQFMAgEBCQEAAVgBEgFYARIBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo EAAAAk1TRnQBSQFMAgEBCQEAAXABEgFwARIBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAATADAAEBAQABCAYAAQwYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AwABQAMAATADAAEBAQABCAYAAQwYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@ -207,78 +207,6 @@
<value>652, 17</value> <value>652, 17</value>
</metadata> </metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="btSaveMyMapping.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
bGUAAEjHnZZ3VFTXFofPvXd6oc0wAlKG3rvAANJ7k15FYZgZYCgDDjM0sSGiAhFFRJoiSFDEgNFQJFZE
sRAUVLAHJAgoMRhFVCxvRtaLrqy89/Ly++Osb+2z97n77L3PWhcAkqcvl5cGSwGQyhPwgzyc6RGRUXTs
AIABHmCAKQBMVka6X7B7CBDJy82FniFyAl8EAfB6WLwCcNPQM4BOB/+fpFnpfIHomAARm7M5GSwRF4g4
JUuQLrbPipgalyxmGCVmvihBEcuJOWGRDT77LLKjmNmpPLaIxTmns1PZYu4V8bZMIUfEiK+ICzO5nCwR
3xKxRoowlSviN+LYVA4zAwAUSWwXcFiJIjYRMYkfEuQi4uUA4EgJX3HcVyzgZAvEl3JJS8/hcxMSBXQd
li7d1NqaQffkZKVwBALDACYrmcln013SUtOZvBwAFu/8WTLi2tJFRbY0tba0NDQzMv2qUP91829K3NtF
ehn4uWcQrf+L7a/80hoAYMyJarPziy2uCoDOLQDI3fti0zgAgKSobx3Xv7oPTTwviQJBuo2xcVZWlhGX
wzISF/QP/U+Hv6GvvmckPu6P8tBdOfFMYYqALq4bKy0lTcinZ6QzWRy64Z+H+B8H/nUeBkGceA6fwxNF
hImmjMtLELWbx+YKuGk8Opf3n5r4D8P+pMW5FonS+BFQY4yA1HUqQH7tBygKESDR+8Vd/6NvvvgwIH55
4SqTi3P/7zf9Z8Gl4iWDm/A5ziUohM4S8jMX98TPEqABAUgCKpAHykAd6ABDYAasgC1wBG7AG/iDEBAJ
VgMWSASpgA+yQB7YBApBMdgJ9oBqUAcaQTNoBcdBJzgFzoNL4Bq4AW6D+2AUTIBnYBa8BgsQBGEhMkSB
5CEVSBPSh8wgBmQPuUG+UBAUCcVCCRAPEkJ50GaoGCqDqqF6qBn6HjoJnYeuQIPQXWgMmoZ+h97BCEyC
qbASrAUbwwzYCfaBQ+BVcAK8Bs6FC+AdcCXcAB+FO+Dz8DX4NjwKP4PnEIAQERqiihgiDMQF8UeikHiE
j6xHipAKpAFpRbqRPuQmMorMIG9RGBQFRUcZomxRnqhQFAu1BrUeVYKqRh1GdaB6UTdRY6hZ1Ec0Ga2I
1kfboL3QEegEdBa6EF2BbkK3oy+ib6Mn0K8xGAwNo42xwnhiIjFJmLWYEsw+TBvmHGYQM46Zw2Kx8lh9
rB3WH8vECrCF2CrsUexZ7BB2AvsGR8Sp4Mxw7rgoHA+Xj6vAHcGdwQ3hJnELeCm8Jt4G749n43PwpfhG
fDf+On4Cv0CQJmgT7AghhCTCJkIloZVwkfCA8JJIJKoRrYmBRC5xI7GSeIx4mThGfEuSIemRXEjRJCFp
B+kQ6RzpLuklmUzWIjuSo8gC8g5yM/kC+RH5jQRFwkjCS4ItsUGiRqJDYkjiuSReUlPSSXK1ZK5kheQJ
yeuSM1J4KS0pFymm1HqpGqmTUiNSc9IUaVNpf+lU6RLpI9JXpKdksDJaMm4ybJkCmYMyF2TGKQhFneJC
YVE2UxopFykTVAxVm+pFTaIWU7+jDlBnZWVkl8mGyWbL1sielh2lITQtmhcthVZKO04bpr1borTEaQln
yfYlrUuGlszLLZVzlOPIFcm1yd2WeydPl3eTT5bfJd8p/1ABpaCnEKiQpbBf4aLCzFLqUtulrKVFS48v
vacIK+opBimuVTyo2K84p6Ss5KGUrlSldEFpRpmm7KicpFyufEZ5WoWiYq/CVSlXOavylC5Ld6Kn0Cvp
vfRZVUVVT1Whar3qgOqCmrZaqFq+WpvaQ3WCOkM9Xr1cvUd9VkNFw08jT6NF454mXpOhmai5V7NPc15L
Wytca6tWp9aUtpy2l3audov2Ax2yjoPOGp0GnVu6GF2GbrLuPt0berCehV6iXo3edX1Y31Kfq79Pf9AA
bWBtwDNoMBgxJBk6GWYathiOGdGMfI3yjTqNnhtrGEcZ7zLuM/5oYmGSYtJoct9UxtTbNN+02/R3Mz0z
llmN2S1zsrm7+QbzLvMXy/SXcZbtX3bHgmLhZ7HVosfig6WVJd+y1XLaSsMq1qrWaoRBZQQwShiXrdHW
ztYbrE9Zv7WxtBHYHLf5zdbQNtn2iO3Ucu3lnOWNy8ft1OyYdvV2o/Z0+1j7A/ajDqoOTIcGh8eO6o5s
xybHSSddpySno07PnU2c+c7tzvMuNi7rXM65Iq4erkWuA24ybqFu1W6P3NXcE9xb3Gc9LDzWepzzRHv6
eO7yHPFS8mJ5NXvNelt5r/Pu9SH5BPtU+zz21fPl+3b7wX7efrv9HqzQXMFb0ekP/L38d/s/DNAOWBPw
YyAmMCCwJvBJkGlQXlBfMCU4JvhI8OsQ55DSkPuhOqHC0J4wybDosOaw+XDX8LLw0QjjiHUR1yIVIrmR
XVHYqLCopqi5lW4r96yciLaILoweXqW9KnvVldUKq1NWn46RjGHGnIhFx4bHHol9z/RnNjDn4rziauNm
WS6svaxnbEd2OXuaY8cp40zG28WXxU8l2CXsTphOdEisSJzhunCruS+SPJPqkuaT/ZMPJX9KCU9pS8Wl
xqae5Mnwknm9acpp2WmD6frphemja2zW7Fkzy/fhN2VAGasyugRU0c9Uv1BHuEU4lmmfWZP5Jiss60S2
dDYvuz9HL2d7zmSue+63a1FrWWt78lTzNuWNrXNaV78eWh+3vmeD+oaCDRMbPTYe3kTYlLzpp3yT/LL8
V5vDN3cXKBVsLBjf4rGlpVCikF84stV2a9021DbutoHt5turtn8sYhddLTYprih+X8IqufqN6TeV33za
Eb9joNSydP9OzE7ezuFdDrsOl0mX5ZaN7/bb3VFOLy8qf7UnZs+VimUVdXsJe4V7Ryt9K7uqNKp2Vr2v
Tqy+XeNc01arWLu9dn4fe9/Qfsf9rXVKdcV17w5wD9yp96jvaNBqqDiIOZh58EljWGPft4xvm5sUmoqb
PhziHRo9HHS4t9mqufmI4pHSFrhF2DJ9NProje9cv+tqNWytb6O1FR8Dx4THnn4f+/3wcZ/jPScYJ1p/
0Pyhtp3SXtQBdeR0zHYmdo52RXYNnvQ+2dNt293+o9GPh06pnqo5LXu69AzhTMGZT2dzz86dSz83cz7h
/HhPTM/9CxEXbvUG9g5c9Ll4+ZL7pQt9Tn1nL9tdPnXF5srJq4yrndcsr3X0W/S3/2TxU/uA5UDHdavr
XTesb3QPLh88M+QwdP6m681Lt7xuXbu94vbgcOjwnZHokdE77DtTd1PuvriXeW/h/sYH6AdFD6UeVjxS
fNTws+7PbaOWo6fHXMf6Hwc/vj/OGn/2S8Yv7ycKnpCfVEyqTDZPmU2dmnafvvF05dOJZ+nPFmYKf5X+
tfa5zvMffnP8rX82YnbiBf/Fp99LXsq/PPRq2aueuYC5R69TXy/MF72Rf3P4LeNt37vwd5MLWe+x7ys/
6H7o/ujz8cGn1E+f/gUDmPP8usTo0wAAAAlwSFlzAAALDAAACwwBP0AiyAAABQpJREFUSEu1lWtQVGUY
gI/3C4q3ykuGSOYlTc2ULGkap5hm0ulPUzNZTT/7Yz+abBIJNTQSARXTvBFeQCdNFgRFcfPKTcRdZUFh
z9nFZbnshXWxs8sKuyxPH9TosGn8yZ155t35Lu+z+37feY8EPFUeO/h/8vDLja+loYZNQ9aaD0dolYxx
2hv7orXVuZ9razSfaatzPtUaTq7SVp34RHs7/0ut/EectvbsN2JczIlx3bGPtVW/TNHWH3pBa9wzIVv3
rbRUv+bv3A8Ft+IHr24riyZo+whVP4+qwnU0tbTitFu577bj87gJdKj4fW5czVbcDgtqm4NWp4M7umuY
z8UQbFhJR+NK6jMnGYXgzT6CpiMRbhyrwLAC3/kZlOfGc0PuRDY3YW/10N4hVomPzZCFnPUSdZoVWK0t
1DugpKQCs2YZVC2H+g8JGGIxpobn9+R9KGjJmuHn9gcEK9/FWzSditzvuGV0YzKZsNvteDyenvxYypLp
LBpGS8ESlLo7WGw+ykuKMZ1cCvq36LoeS0fpckzpE0p68j76B4ciVarep+vacjyFEUKwllty278E1ms7
8J0ZS3NBDCa5TgjaKS8tRTkRDRVvEKh4B9/lGJS0cdqevI8EmREquli6St5CzZ/MtbwEqswdQqD0EZgv
JmDdKWH89VnqlToanAHKK24i/7YYyhYTKH0b34WlQjA2RJAxVaViOZ2XlhI4P5NbR9+j9Hot9U5w+eCf
I+CB9x7WyqM45CI8XWC0Q3FBOvbfo+i+uoTAlWXiDBejpI4JEeyfolIcQ8e51wheiOZPTSRV2bHcPJvI
nQtJmK4mi/qn9R6yUymiuUZD3eU09LmrsRydTVfRXDpF4oDY6yt8FSUlPESwd5LaffF1HpxegO/0QrrO
LcKfP4227FHcOxJG6+GROA8OxyHoia2HRuA6PALP8fEEz4rkhYt69/rFvvZTryBvHR0i2P2c2l0kFuXO
pePUPLryZtKtiYC8af0QQTA3Ev+pl3mQNxd/wXzac+YgbwkLEeycoHYXzKNTTHYcm0zzvrFYjsynIXuh
YMFjsYo5S9YCLJlRtGWG05Uzi07NHNqPz0D+aWRfQWP6ODWomYU/eyLWjEgaqzW0qSqOVvG0upyPxdlL
Ky6HCXP+F7j3jyJwIgpv9jTkpBEhgm3hKsejuJcuoZxfh18MejtB9QWfTHsQj4gBsdYmfohp92Q48gze
g1ORNw8PEaSMVsmeSmuKRN2lFFziXspGI0aBLMtPpLa2liZbGw02J6b9syEjDO+BiUIwNESwNUzl4ERc
yRJ3zifi8EJDQwMWi6VfWhz3MVnuYtrzIt17h+HZMwE5MVSwZYTKvvHc+1Gi5uwGGtvobRP9oSgKliYX
tWYF067pdKcPxPPzGOQfBocIkoap7BqNO1HCUJiAWXRJvV6PTqfrjU+isrKSWsXKbcWIaae41mkSnu1h
yBsHhQg2D25nx3DcGyX0+XEYW/zcvXu3X3pKZLbY0FVXYdoxFUSJPanDkTcMvNhXkDgoQOoQ3AlCcCqO
GouXsrIySkWn7IlPori4GL3BKAQGlG3PgyixN3kIyvoBfdt1bcKAS/6kAbTHS+jOJFEtSnTjtkNg/08q
a2yi63ZSIbuo3y4EmyRsiQMwxEvr+wh0cVKEMV4qaIiT1PIDsWrZ6S2qeCf0y/U8EfO+V6/krFFrksaq
Tesk88046SuRb2gfwdMB6S/DHs/UzS4d0QAAAABJRU5ErkJggg==
</value>
</data>
<data name="label4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="label4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
/9j/4AAQSkZJRgABAQEAAAAAAAD/7gAOQWRvYmUAZAAAAAAB/9sAQwACAQEBAgECAgICAwICAgMEAwIC /9j/4AAQSkZJRgABAQEAAAAAAAD/7gAOQWRvYmUAZAAAAAAB/9sAQwACAQEBAgECAgICAwICAgMEAwIC
@ -550,6 +478,78 @@
<metadata name="SFD.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="SFD.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>421, 17</value> <value>421, 17</value>
</metadata> </metadata>
<data name="btSaveMyMapping.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
bGUAAEjHnZZ3VFTXFofPvXd6oc0wAlKG3rvAANJ7k15FYZgZYCgDDjM0sSGiAhFFRJoiSFDEgNFQJFZE
sRAUVLAHJAgoMRhFVCxvRtaLrqy89/Ly++Osb+2z97n77L3PWhcAkqcvl5cGSwGQyhPwgzyc6RGRUXTs
AIABHmCAKQBMVka6X7B7CBDJy82FniFyAl8EAfB6WLwCcNPQM4BOB/+fpFnpfIHomAARm7M5GSwRF4g4
JUuQLrbPipgalyxmGCVmvihBEcuJOWGRDT77LLKjmNmpPLaIxTmns1PZYu4V8bZMIUfEiK+ICzO5nCwR
3xKxRoowlSviN+LYVA4zAwAUSWwXcFiJIjYRMYkfEuQi4uUA4EgJX3HcVyzgZAvEl3JJS8/hcxMSBXQd
li7d1NqaQffkZKVwBALDACYrmcln013SUtOZvBwAFu/8WTLi2tJFRbY0tba0NDQzMv2qUP91829K3NtF
ehn4uWcQrf+L7a/80hoAYMyJarPziy2uCoDOLQDI3fti0zgAgKSobx3Xv7oPTTwviQJBuo2xcVZWlhGX
wzISF/QP/U+Hv6GvvmckPu6P8tBdOfFMYYqALq4bKy0lTcinZ6QzWRy64Z+H+B8H/nUeBkGceA6fwxNF
hImmjMtLELWbx+YKuGk8Opf3n5r4D8P+pMW5FonS+BFQY4yA1HUqQH7tBygKESDR+8Vd/6NvvvgwIH55
4SqTi3P/7zf9Z8Gl4iWDm/A5ziUohM4S8jMX98TPEqABAUgCKpAHykAd6ABDYAasgC1wBG7AG/iDEBAJ
VgMWSASpgA+yQB7YBApBMdgJ9oBqUAcaQTNoBcdBJzgFzoNL4Bq4AW6D+2AUTIBnYBa8BgsQBGEhMkSB
5CEVSBPSh8wgBmQPuUG+UBAUCcVCCRAPEkJ50GaoGCqDqqF6qBn6HjoJnYeuQIPQXWgMmoZ+h97BCEyC
qbASrAUbwwzYCfaBQ+BVcAK8Bs6FC+AdcCXcAB+FO+Dz8DX4NjwKP4PnEIAQERqiihgiDMQF8UeikHiE
j6xHipAKpAFpRbqRPuQmMorMIG9RGBQFRUcZomxRnqhQFAu1BrUeVYKqRh1GdaB6UTdRY6hZ1Ec0Ga2I
1kfboL3QEegEdBa6EF2BbkK3oy+ib6Mn0K8xGAwNo42xwnhiIjFJmLWYEsw+TBvmHGYQM46Zw2Kx8lh9
rB3WH8vECrCF2CrsUexZ7BB2AvsGR8Sp4Mxw7rgoHA+Xj6vAHcGdwQ3hJnELeCm8Jt4G749n43PwpfhG
fDf+On4Cv0CQJmgT7AghhCTCJkIloZVwkfCA8JJIJKoRrYmBRC5xI7GSeIx4mThGfEuSIemRXEjRJCFp
B+kQ6RzpLuklmUzWIjuSo8gC8g5yM/kC+RH5jQRFwkjCS4ItsUGiRqJDYkjiuSReUlPSSXK1ZK5kheQJ
yeuSM1J4KS0pFymm1HqpGqmTUiNSc9IUaVNpf+lU6RLpI9JXpKdksDJaMm4ybJkCmYMyF2TGKQhFneJC
YVE2UxopFykTVAxVm+pFTaIWU7+jDlBnZWVkl8mGyWbL1sielh2lITQtmhcthVZKO04bpr1borTEaQln
yfYlrUuGlszLLZVzlOPIFcm1yd2WeydPl3eTT5bfJd8p/1ABpaCnEKiQpbBf4aLCzFLqUtulrKVFS48v
vacIK+opBimuVTyo2K84p6Ss5KGUrlSldEFpRpmm7KicpFyufEZ5WoWiYq/CVSlXOavylC5Ld6Kn0Cvp
vfRZVUVVT1Whar3qgOqCmrZaqFq+WpvaQ3WCOkM9Xr1cvUd9VkNFw08jT6NF454mXpOhmai5V7NPc15L
Wytca6tWp9aUtpy2l3audov2Ax2yjoPOGp0GnVu6GF2GbrLuPt0berCehV6iXo3edX1Y31Kfq79Pf9AA
bWBtwDNoMBgxJBk6GWYathiOGdGMfI3yjTqNnhtrGEcZ7zLuM/5oYmGSYtJoct9UxtTbNN+02/R3Mz0z
llmN2S1zsrm7+QbzLvMXy/SXcZbtX3bHgmLhZ7HVosfig6WVJd+y1XLaSsMq1qrWaoRBZQQwShiXrdHW
ztYbrE9Zv7WxtBHYHLf5zdbQNtn2iO3Ucu3lnOWNy8ft1OyYdvV2o/Z0+1j7A/ajDqoOTIcGh8eO6o5s
xybHSSddpySno07PnU2c+c7tzvMuNi7rXM65Iq4erkWuA24ybqFu1W6P3NXcE9xb3Gc9LDzWepzzRHv6
eO7yHPFS8mJ5NXvNelt5r/Pu9SH5BPtU+zz21fPl+3b7wX7efrv9HqzQXMFb0ekP/L38d/s/DNAOWBPw
YyAmMCCwJvBJkGlQXlBfMCU4JvhI8OsQ55DSkPuhOqHC0J4wybDosOaw+XDX8LLw0QjjiHUR1yIVIrmR
XVHYqLCopqi5lW4r96yciLaILoweXqW9KnvVldUKq1NWn46RjGHGnIhFx4bHHol9z/RnNjDn4rziauNm
WS6svaxnbEd2OXuaY8cp40zG28WXxU8l2CXsTphOdEisSJzhunCruS+SPJPqkuaT/ZMPJX9KCU9pS8Wl
xqae5Mnwknm9acpp2WmD6frphemja2zW7Fkzy/fhN2VAGasyugRU0c9Uv1BHuEU4lmmfWZP5Jiss60S2
dDYvuz9HL2d7zmSue+63a1FrWWt78lTzNuWNrXNaV78eWh+3vmeD+oaCDRMbPTYe3kTYlLzpp3yT/LL8
V5vDN3cXKBVsLBjf4rGlpVCikF84stV2a9021DbutoHt5turtn8sYhddLTYprih+X8IqufqN6TeV33za
Eb9joNSydP9OzE7ezuFdDrsOl0mX5ZaN7/bb3VFOLy8qf7UnZs+VimUVdXsJe4V7Ryt9K7uqNKp2Vr2v
Tqy+XeNc01arWLu9dn4fe9/Qfsf9rXVKdcV17w5wD9yp96jvaNBqqDiIOZh58EljWGPft4xvm5sUmoqb
PhziHRo9HHS4t9mqufmI4pHSFrhF2DJ9NProje9cv+tqNWytb6O1FR8Dx4THnn4f+/3wcZ/jPScYJ1p/
0Pyhtp3SXtQBdeR0zHYmdo52RXYNnvQ+2dNt293+o9GPh06pnqo5LXu69AzhTMGZT2dzz86dSz83cz7h
/HhPTM/9CxEXbvUG9g5c9Ll4+ZL7pQt9Tn1nL9tdPnXF5srJq4yrndcsr3X0W/S3/2TxU/uA5UDHdavr
XTesb3QPLh88M+QwdP6m681Lt7xuXbu94vbgcOjwnZHokdE77DtTd1PuvriXeW/h/sYH6AdFD6UeVjxS
fNTws+7PbaOWo6fHXMf6Hwc/vj/OGn/2S8Yv7ycKnpCfVEyqTDZPmU2dmnafvvF05dOJZ+nPFmYKf5X+
tfa5zvMffnP8rX82YnbiBf/Fp99LXsq/PPRq2aueuYC5R69TXy/MF72Rf3P4LeNt37vwd5MLWe+x7ys/
6H7o/ujz8cGn1E+f/gUDmPP8usTo0wAAAAlwSFlzAAALDAAACwwBP0AiyAAABQpJREFUSEu1lWtQVGUY
gI/3C4q3ykuGSOYlTc2ULGkap5hm0ulPUzNZTT/7Yz+abBIJNTQSARXTvBFeQCdNFgRFcfPKTcRdZUFh
z9nFZbnshXWxs8sKuyxPH9TosGn8yZ155t35Lu+z+37feY8EPFUeO/h/8vDLja+loYZNQ9aaD0dolYxx
2hv7orXVuZ9razSfaatzPtUaTq7SVp34RHs7/0ut/EectvbsN2JczIlx3bGPtVW/TNHWH3pBa9wzIVv3
rbRUv+bv3A8Ft+IHr24riyZo+whVP4+qwnU0tbTitFu577bj87gJdKj4fW5czVbcDgtqm4NWp4M7umuY
z8UQbFhJR+NK6jMnGYXgzT6CpiMRbhyrwLAC3/kZlOfGc0PuRDY3YW/10N4hVomPzZCFnPUSdZoVWK0t
1DugpKQCs2YZVC2H+g8JGGIxpobn9+R9KGjJmuHn9gcEK9/FWzSditzvuGV0YzKZsNvteDyenvxYypLp
LBpGS8ESlLo7WGw+ykuKMZ1cCvq36LoeS0fpckzpE0p68j76B4ciVarep+vacjyFEUKwllty278E1ms7
8J0ZS3NBDCa5TgjaKS8tRTkRDRVvEKh4B9/lGJS0cdqevI8EmREquli6St5CzZ/MtbwEqswdQqD0EZgv
JmDdKWH89VnqlToanAHKK24i/7YYyhYTKH0b34WlQjA2RJAxVaViOZ2XlhI4P5NbR9+j9Hot9U5w+eCf
I+CB9x7WyqM45CI8XWC0Q3FBOvbfo+i+uoTAlWXiDBejpI4JEeyfolIcQ8e51wheiOZPTSRV2bHcPJvI
nQtJmK4mi/qn9R6yUymiuUZD3eU09LmrsRydTVfRXDpF4oDY6yt8FSUlPESwd5LaffF1HpxegO/0QrrO
LcKfP4227FHcOxJG6+GROA8OxyHoia2HRuA6PALP8fEEz4rkhYt69/rFvvZTryBvHR0i2P2c2l0kFuXO
pePUPLryZtKtiYC8af0QQTA3Ev+pl3mQNxd/wXzac+YgbwkLEeycoHYXzKNTTHYcm0zzvrFYjsynIXuh
YMFjsYo5S9YCLJlRtGWG05Uzi07NHNqPz0D+aWRfQWP6ODWomYU/eyLWjEgaqzW0qSqOVvG0upyPxdlL
Ky6HCXP+F7j3jyJwIgpv9jTkpBEhgm3hKsejuJcuoZxfh18MejtB9QWfTHsQj4gBsdYmfohp92Q48gze
g1ORNw8PEaSMVsmeSmuKRN2lFFziXspGI0aBLMtPpLa2liZbGw02J6b9syEjDO+BiUIwNESwNUzl4ERc
yRJ3zifi8EJDQwMWi6VfWhz3MVnuYtrzIt17h+HZMwE5MVSwZYTKvvHc+1Gi5uwGGtvobRP9oSgKliYX
tWYF067pdKcPxPPzGOQfBocIkoap7BqNO1HCUJiAWXRJvV6PTqfrjU+isrKSWsXKbcWIaae41mkSnu1h
yBsHhQg2D25nx3DcGyX0+XEYW/zcvXu3X3pKZLbY0FVXYdoxFUSJPanDkTcMvNhXkDgoQOoQ3AlCcCqO
GouXsrIySkWn7IlPori4GL3BKAQGlG3PgyixN3kIyvoBfdt1bcKAS/6kAbTHS+jOJFEtSnTjtkNg/08q
a2yi63ZSIbuo3y4EmyRsiQMwxEvr+wh0cVKEMV4qaIiT1PIDsWrZ6S2qeCf0y/U8EfO+V6/krFFrksaq
Tesk88046SuRb2gfwdMB6S/DHs/UzS4d0QAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>555, 17</value> <value>555, 17</value>
</metadata> </metadata>
@ -582,7 +582,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADc ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADc
GQAAAk1TRnQBSQFMAgEBAwEAARgBAAEYAQABMAEAATABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo GQAAAk1TRnQBSQFMAgEBAwEAATABAAEwAQABMAEAATABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABwAMAATADAAEBAQABCAYAASQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AwABwAMAATADAAEBAQABCAYAASQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

@ -71,6 +71,7 @@
this.cbxCSVListing = new System.Windows.Forms.CheckBox(); this.cbxCSVListing = new System.Windows.Forms.CheckBox();
this.cbxPTU = new System.Windows.Forms.CheckBox(); this.cbxPTU = new System.Windows.Forms.CheckBox();
this.cbxDetectGamepad = new System.Windows.Forms.CheckBox(); this.cbxDetectGamepad = new System.Windows.Forms.CheckBox();
this.cbxTreeTips = new System.Windows.Forms.CheckBox();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
@ -427,6 +428,7 @@
// //
// groupBox4 // groupBox4
// //
this.groupBox4.Controls.Add(this.cbxTreeTips);
this.groupBox4.Controls.Add(this.label14); this.groupBox4.Controls.Add(this.label14);
this.groupBox4.Controls.Add(this.comboLanguage); this.groupBox4.Controls.Add(this.comboLanguage);
this.groupBox4.Controls.Add(this.cbxAutoTabXML); this.groupBox4.Controls.Add(this.cbxAutoTabXML);
@ -445,7 +447,7 @@
// label14 // label14
// //
this.label14.AutoSize = true; this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(200, 22); this.label14.Location = new System.Drawing.Point(6, 73);
this.label14.Name = "label14"; this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(62, 13); this.label14.Size = new System.Drawing.Size(62, 13);
this.label14.TabIndex = 12; this.label14.TabIndex = 12;
@ -454,7 +456,7 @@
// comboLanguage // comboLanguage
// //
this.comboLanguage.FormattingEnabled = true; this.comboLanguage.FormattingEnabled = true;
this.comboLanguage.Location = new System.Drawing.Point(271, 19); this.comboLanguage.Location = new System.Drawing.Point(77, 70);
this.comboLanguage.Name = "comboLanguage"; this.comboLanguage.Name = "comboLanguage";
this.comboLanguage.Size = new System.Drawing.Size(100, 21); this.comboLanguage.Size = new System.Drawing.Size(100, 21);
this.comboLanguage.TabIndex = 11; this.comboLanguage.TabIndex = 11;
@ -494,7 +496,7 @@
// //
this.cbxPTU.AutoSize = true; this.cbxPTU.AutoSize = true;
this.cbxPTU.BackColor = System.Drawing.Color.SandyBrown; this.cbxPTU.BackColor = System.Drawing.Color.SandyBrown;
this.cbxPTU.Location = new System.Drawing.Point(9, 67); this.cbxPTU.Location = new System.Drawing.Point(400, 82);
this.cbxPTU.Name = "cbxPTU"; this.cbxPTU.Name = "cbxPTU";
this.cbxPTU.Size = new System.Drawing.Size(108, 17); this.cbxPTU.Size = new System.Drawing.Size(108, 17);
this.cbxPTU.TabIndex = 7; this.cbxPTU.TabIndex = 7;
@ -512,6 +514,16 @@
this.cbxDetectGamepad.Text = "Use Gamepad"; this.cbxDetectGamepad.Text = "Use Gamepad";
this.cbxDetectGamepad.UseVisualStyleBackColor = true; this.cbxDetectGamepad.UseVisualStyleBackColor = true;
// //
// cbxTreeTips
//
this.cbxTreeTips.AutoSize = true;
this.cbxTreeTips.Location = new System.Drawing.Point(196, 72);
this.cbxTreeTips.Name = "cbxTreeTips";
this.cbxTreeTips.Size = new System.Drawing.Size(101, 17);
this.cbxTreeTips.TabIndex = 13;
this.cbxTreeTips.Text = "Show Tree tips";
this.cbxTreeTips.UseVisualStyleBackColor = true;
//
// FormSettings // FormSettings
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
@ -590,5 +602,6 @@
private System.Windows.Forms.CheckBox cbxAutoTabXML; private System.Windows.Forms.CheckBox cbxAutoTabXML;
private System.Windows.Forms.Label label14; private System.Windows.Forms.Label label14;
private System.Windows.Forms.ComboBox comboLanguage; private System.Windows.Forms.ComboBox comboLanguage;
private System.Windows.Forms.CheckBox cbxTreeTips;
} }
} }

@ -21,7 +21,7 @@ namespace SCJMapper_V2
/// ctor - gets the owning class instance /// ctor - gets the owning class instance
/// </summary> /// </summary>
/// <param name="owner"></param> /// <param name="owner"></param>
public FormSettings( ) public FormSettings()
{ {
InitializeComponent( ); InitializeComponent( );
} }
@ -35,14 +35,14 @@ namespace SCJMapper_V2
} }
comboLanguage.Items.Clear( ); comboLanguage.Items.Clear( );
comboLanguage.Items.AddRange( SC.SCUiText.Instance.LanguagesS.ToArray() ); comboLanguage.Items.AddRange( SC.SCUiText.Instance.LanguagesS.ToArray( ) );
LoadSettings( ); LoadSettings( );
} }
// Save from app settings into actuals // Save from app settings into actuals
private void LoadSettings( ) private void LoadSettings()
{ {
// SC path // SC path
txSCPath.Text = AppSettings.Instance.UserSCPath; txSCPath.Text = AppSettings.Instance.UserSCPath;
@ -66,7 +66,8 @@ namespace SCJMapper_V2
for ( int i = 0; i < chkLbActionMaps.Items.Count; i++ ) { for ( int i = 0; i < chkLbActionMaps.Items.Count; i++ ) {
if ( AppSettings.Instance.IgnoreActionmaps.Contains( "," + chkLbActionMaps.Items[i].ToString( ) + "," ) ) { if ( AppSettings.Instance.IgnoreActionmaps.Contains( "," + chkLbActionMaps.Items[i].ToString( ) + "," ) ) {
chkLbActionMaps.SetItemChecked( i, true ); chkLbActionMaps.SetItemChecked( i, true );
} else { }
else {
chkLbActionMaps.SetItemChecked( i, false ); // 20161223: fix checked items and Canceled chkLbActionMaps.SetItemChecked( i, false ); // 20161223: fix checked items and Canceled
} }
} }
@ -87,11 +88,12 @@ namespace SCJMapper_V2
// Language // Language
comboLanguage.SelectedItem = AppSettings.Instance.UseLanguage; comboLanguage.SelectedItem = AppSettings.Instance.UseLanguage;
cbxTreeTips.Checked = AppSettings.Instance.ShowTreeTips;
} }
// Save the current settings // Save the current settings
private void SaveSettings( ) private void SaveSettings()
{ {
// SC path // SC path
AppSettings.Instance.UserSCPath = txSCPath.Text; AppSettings.Instance.UserSCPath = txSCPath.Text;
@ -134,13 +136,14 @@ namespace SCJMapper_V2
// AutoTabXML // AutoTabXML
AppSettings.Instance.AutoTabXML = cbxAutoTabXML.Checked; AppSettings.Instance.AutoTabXML = cbxAutoTabXML.Checked;
// Use CSV Listing // Use CSV Listing
AppSettings.Instance.UseCSVListing = cbxCSVListing.Checked; AppSettings.Instance.UseCSVListing = cbxCSVListing.Checked;
AppSettings.Instance.ListModifiers = cbxListModifiers.Checked; AppSettings.Instance.ListModifiers = cbxListModifiers.Checked;
// Language // Language
AppSettings.Instance.UseLanguage = (string)comboLanguage.SelectedItem; AppSettings.Instance.UseLanguage = (string)comboLanguage.SelectedItem;
AppSettings.Instance.ShowTreeTips = cbxTreeTips.Checked;
AppSettings.Instance.Save( ); AppSettings.Instance.Save( );
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -41,10 +41,13 @@ cassini@burri-web.org
Changelog: Changelog:
V 2.35 - BETA Build 69 V 2.35 - BETA Build 69
- add - provide CIG asset texts for actions and maps - add - provide CIG asset texts/translations for actions and maps
(use Settings to choose - for now only French and German are in but have no translations (use Settings to choose - for now only French and German are in but have no translations
for English not all have a proper text - may not be used in the game ??) for English not all have a proper text - may not be used in the game ??)
- add - tooltips for profile action names in treeview (enable in Settings)
- add - mouse tuning items (curve, expo, invert)
- improvement - cache CIG assets into the app/Storage folder, reads from p4k file only if those are updated - improvement - cache CIG assets into the app/Storage folder, reads from p4k file only if those are updated
- fix - window should always be visible on startup now
- internal cleanup - to many to list - internal cleanup - to many to list
V 2.34 - BETA Build 68 V 2.34 - BETA Build 68
- improvement - complete rework of XML defaultProfile/mapping parsing - improvement - complete rework of XML defaultProfile/mapping parsing

@ -11,6 +11,7 @@ using SCJMapper_V2.Devices.Joystick;
using SCJMapper_V2.Devices.Keyboard; using SCJMapper_V2.Devices.Keyboard;
using SCJMapper_V2.Devices.Mouse; using SCJMapper_V2.Devices.Mouse;
using SCJMapper_V2.Devices.Gamepad; using SCJMapper_V2.Devices.Gamepad;
using SCJMapper_V2.Devices.Options;
namespace SCJMapper_V2.SC namespace SCJMapper_V2.SC
{ {
@ -218,6 +219,7 @@ namespace SCJMapper_V2.SC
string uiLabel = (string)action.Attribute( "UILabel" ); string uiLabel = (string)action.Attribute( "UILabel" );
if ( string.IsNullOrEmpty( uiLabel ) ) if ( string.IsNullOrEmpty( uiLabel ) )
uiLabel = name; // subst if not found in Action node uiLabel = name; // subst if not found in Action node
SCUiText.Instance.Add( name, uiLabel ); // Register item for translation
// prep all kinds // prep all kinds
var jAC = new ProfileAction( ) { Name = name, UILabel = uiLabel, DevID = Act.DevTag( JoystickCls.DeviceClass ) }; var jAC = new ProfileAction( ) { Name = name, UILabel = uiLabel, DevID = Act.DevTag( JoystickCls.DeviceClass ) };
@ -304,6 +306,7 @@ namespace SCJMapper_V2.SC
string uiLabel = (string)actionmap.Attribute( "UILabel" ); string uiLabel = (string)actionmap.Attribute( "UILabel" );
if ( string.IsNullOrEmpty( uiLabel ) ) if ( string.IsNullOrEmpty( uiLabel ) )
uiLabel = mapName; // subst if not found in Action node uiLabel = mapName; // subst if not found in Action node
SCUiText.Instance.Add( mapName, uiLabel ); // Register item for translation
string item = Array.Find( ActionMapsCls.ActionMaps, delegate ( string sstr ) { return sstr == mapName; } ); string item = Array.Find( ActionMapsCls.ActionMaps, delegate ( string sstr ) { return sstr == mapName; } );
if ( !string.IsNullOrEmpty( item ) ) { if ( !string.IsNullOrEmpty( item ) ) {
@ -354,6 +357,7 @@ namespace SCJMapper_V2.SC
return true; return true;
} }
/// <summary> /// <summary>
/// Read the defaultProfile.xml - do some sanity check /// Read the defaultProfile.xml - do some sanity check
/// </summary> /// </summary>
@ -400,6 +404,14 @@ namespace SCJMapper_V2.SC
ValidContent &= Modifiers.Instance.FromXML( modifier, true ); ValidContent &= Modifiers.Instance.FromXML( modifier, true );
} }
OptionTree.InitOptionReader( );
IEnumerable<XElement> optiontrees = from x in el.Elements( )
where ( x.Name == "optiontree" )
select x;
foreach ( XElement optiontree in optiontrees ) {
ValidContent &= OptionTree.fromProfileXML( optiontree );
}
IEnumerable<XElement> actionmaps = from x in el.Elements( ) IEnumerable<XElement> actionmaps = from x in el.Elements( )
where ( x.Name == "actionmap" ) where ( x.Name == "actionmap" )
select x; select x;

@ -27,8 +27,9 @@ namespace SCJMapper_V2.SC
new SCLocale( Languages.french.ToString( ) ), new SCLocale( Languages.french.ToString( ) ),
new SCLocale( Languages.german.ToString( ) ) }; // add supported languages new SCLocale( Languages.german.ToString( ) ) }; // add supported languages
private Dictionary<string, string> m_action2label = new Dictionary<string, string>( );
private Languages m_language = Languages.english; private Languages m_language = Languages.english;
/// <summary> /// <summary>
/// Set the language to be used /// Set the language to be used
/// </summary> /// </summary>
@ -83,6 +84,34 @@ namespace SCJMapper_V2.SC
}// all files }// all files
} }
/// <summary>
/// Add an Action - UILabel pair to the translation table
/// </summary>
/// <param name="action">An item from defaultProfile</param>
/// <param name="uiLabel">The UILabel of the item</param>
public void Add(string action, string uiLabel )
{
if ( m_action2label.ContainsKey( action ) ) {
return;
}
m_action2label.Add( action, uiLabel );
}
/// <summary>
/// Returns the content from the matching UILabel in the set Language
/// </summary>
/// <param name="action">The profile item (action etc)</param>
/// <returns>A text string</returns>
public string Text( string action )
{
if ( m_action2label.ContainsKey( action ) ) {
return Text( m_action2label[action], action );
}
else return action; // no translation possible
}
/// <summary> /// <summary>
/// Returns the content from the UILabel in the set Language /// Returns the content from the UILabel in the set Language
/// </summary> /// </summary>

@ -238,7 +238,6 @@
</Compile> </Compile>
<Compile Include="Devices\Options\OptionTree.cs" /> <Compile Include="Devices\Options\OptionTree.cs" />
<Compile Include="OGL\LoaderDDS.cs" /> <Compile Include="OGL\LoaderDDS.cs" />
<Compile Include="Devices\Options\OptionsInvert.cs" />
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="OGL\RK4Integrator.cs" /> <Compile Include="OGL\RK4Integrator.cs" />

@ -33,7 +33,7 @@ namespace SCJMapper_V2.Table {
private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public DS_ActionMaps() { public DS_ActionMaps() {
this.BeginInit(); this.BeginInit();
this.InitClass(); this.InitClass();
@ -44,7 +44,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
protected DS_ActionMaps(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : protected DS_ActionMaps(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
base(info, context, false) { base(info, context, false) {
if ((this.IsBinarySerialized(info, context) == true)) { if ((this.IsBinarySerialized(info, context) == true)) {
@ -83,7 +83,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
[global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.Browsable(false)]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
public T_ActionMapDataTable T_ActionMap { public T_ActionMapDataTable T_ActionMap {
@ -93,7 +93,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
[global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.Browsable(false)]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
public T_ActionDataTable T_Action { public T_ActionDataTable T_Action {
@ -103,7 +103,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
[global::System.ComponentModel.BrowsableAttribute(true)] [global::System.ComponentModel.BrowsableAttribute(true)]
[global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)] [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]
public override global::System.Data.SchemaSerializationMode SchemaSerializationMode { public override global::System.Data.SchemaSerializationMode SchemaSerializationMode {
@ -116,7 +116,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
[global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public new global::System.Data.DataTableCollection Tables { public new global::System.Data.DataTableCollection Tables {
get { get {
@ -125,7 +125,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
[global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public new global::System.Data.DataRelationCollection Relations { public new global::System.Data.DataRelationCollection Relations {
get { get {
@ -134,7 +134,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
protected override void InitializeDerivedDataSet() { protected override void InitializeDerivedDataSet() {
this.BeginInit(); this.BeginInit();
this.InitClass(); this.InitClass();
@ -142,7 +142,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public override global::System.Data.DataSet Clone() { public override global::System.Data.DataSet Clone() {
DS_ActionMaps cln = ((DS_ActionMaps)(base.Clone())); DS_ActionMaps cln = ((DS_ActionMaps)(base.Clone()));
cln.InitVars(); cln.InitVars();
@ -151,19 +151,19 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
protected override bool ShouldSerializeTables() { protected override bool ShouldSerializeTables() {
return false; return false;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
protected override bool ShouldSerializeRelations() { protected override bool ShouldSerializeRelations() {
return false; return false;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) { protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) {
if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
this.Reset(); this.Reset();
@ -191,7 +191,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() { protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() {
global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream();
this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null)); this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null));
@ -200,13 +200,13 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
internal void InitVars() { internal void InitVars() {
this.InitVars(true); this.InitVars(true);
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
internal void InitVars(bool initTable) { internal void InitVars(bool initTable) {
this.tableT_ActionMap = ((T_ActionMapDataTable)(base.Tables["T_ActionMap"])); this.tableT_ActionMap = ((T_ActionMapDataTable)(base.Tables["T_ActionMap"]));
if ((initTable == true)) { if ((initTable == true)) {
@ -224,7 +224,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
private void InitClass() { private void InitClass() {
this.DataSetName = "DS_ActionMaps"; this.DataSetName = "DS_ActionMaps";
this.Prefix = ""; this.Prefix = "";
@ -242,19 +242,19 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
private bool ShouldSerializeT_ActionMap() { private bool ShouldSerializeT_ActionMap() {
return false; return false;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
private bool ShouldSerializeT_Action() { private bool ShouldSerializeT_Action() {
return false; return false;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) { if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) {
this.InitVars(); this.InitVars();
@ -262,7 +262,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
DS_ActionMaps ds = new DS_ActionMaps(); DS_ActionMaps ds = new DS_ActionMaps();
global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
@ -308,10 +308,10 @@ namespace SCJMapper_V2.Table {
return type; return type;
} }
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public delegate void T_ActionMapRowChangeEventHandler(object sender, T_ActionMapRowChangeEvent e); public delegate void T_ActionMapRowChangeEventHandler(object sender, T_ActionMapRowChangeEvent e);
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public delegate void T_ActionRowChangeEventHandler(object sender, T_ActionRowChangeEvent e); public delegate void T_ActionRowChangeEventHandler(object sender, T_ActionRowChangeEvent e);
/// <summary> /// <summary>
@ -324,7 +324,7 @@ namespace SCJMapper_V2.Table {
private global::System.Data.DataColumn columnID_ActionMap; private global::System.Data.DataColumn columnID_ActionMap;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public T_ActionMapDataTable() { public T_ActionMapDataTable() {
this.TableName = "T_ActionMap"; this.TableName = "T_ActionMap";
this.BeginInit(); this.BeginInit();
@ -333,7 +333,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
internal T_ActionMapDataTable(global::System.Data.DataTable table) { internal T_ActionMapDataTable(global::System.Data.DataTable table) {
this.TableName = table.TableName; this.TableName = table.TableName;
if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
@ -350,14 +350,14 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
protected T_ActionMapDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : protected T_ActionMapDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
base(info, context) { base(info, context) {
this.InitVars(); this.InitVars();
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public global::System.Data.DataColumn ID_ActionMapColumn { public global::System.Data.DataColumn ID_ActionMapColumn {
get { get {
return this.columnID_ActionMap; return this.columnID_ActionMap;
@ -365,7 +365,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
[global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.Browsable(false)]
public int Count { public int Count {
get { get {
@ -374,33 +374,33 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public T_ActionMapRow this[int index] { public T_ActionMapRow this[int index] {
get { get {
return ((T_ActionMapRow)(this.Rows[index])); return ((T_ActionMapRow)(this.Rows[index]));
} }
} }
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public event T_ActionMapRowChangeEventHandler T_ActionMapRowChanging; public event T_ActionMapRowChangeEventHandler T_ActionMapRowChanging;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public event T_ActionMapRowChangeEventHandler T_ActionMapRowChanged; public event T_ActionMapRowChangeEventHandler T_ActionMapRowChanged;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public event T_ActionMapRowChangeEventHandler T_ActionMapRowDeleting; public event T_ActionMapRowChangeEventHandler T_ActionMapRowDeleting;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public event T_ActionMapRowChangeEventHandler T_ActionMapRowDeleted; public event T_ActionMapRowChangeEventHandler T_ActionMapRowDeleted;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public void AddT_ActionMapRow(T_ActionMapRow row) { public void AddT_ActionMapRow(T_ActionMapRow row) {
this.Rows.Add(row); this.Rows.Add(row);
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public T_ActionMapRow AddT_ActionMapRow(string ID_ActionMap) { public T_ActionMapRow AddT_ActionMapRow(string ID_ActionMap) {
T_ActionMapRow rowT_ActionMapRow = ((T_ActionMapRow)(this.NewRow())); T_ActionMapRow rowT_ActionMapRow = ((T_ActionMapRow)(this.NewRow()));
object[] columnValuesArray = new object[] { object[] columnValuesArray = new object[] {
@ -411,14 +411,14 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public T_ActionMapRow FindByID_ActionMap(string ID_ActionMap) { public T_ActionMapRow FindByID_ActionMap(string ID_ActionMap) {
return ((T_ActionMapRow)(this.Rows.Find(new object[] { return ((T_ActionMapRow)(this.Rows.Find(new object[] {
ID_ActionMap}))); ID_ActionMap})));
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public override global::System.Data.DataTable Clone() { public override global::System.Data.DataTable Clone() {
T_ActionMapDataTable cln = ((T_ActionMapDataTable)(base.Clone())); T_ActionMapDataTable cln = ((T_ActionMapDataTable)(base.Clone()));
cln.InitVars(); cln.InitVars();
@ -426,19 +426,19 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
protected override global::System.Data.DataTable CreateInstance() { protected override global::System.Data.DataTable CreateInstance() {
return new T_ActionMapDataTable(); return new T_ActionMapDataTable();
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
internal void InitVars() { internal void InitVars() {
this.columnID_ActionMap = base.Columns["ID_ActionMap"]; this.columnID_ActionMap = base.Columns["ID_ActionMap"];
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
private void InitClass() { private void InitClass() {
this.columnID_ActionMap = new global::System.Data.DataColumn("ID_ActionMap", typeof(string), null, global::System.Data.MappingType.Element); this.columnID_ActionMap = new global::System.Data.DataColumn("ID_ActionMap", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnID_ActionMap); base.Columns.Add(this.columnID_ActionMap);
@ -451,25 +451,25 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public T_ActionMapRow NewT_ActionMapRow() { public T_ActionMapRow NewT_ActionMapRow() {
return ((T_ActionMapRow)(this.NewRow())); return ((T_ActionMapRow)(this.NewRow()));
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
return new T_ActionMapRow(builder); return new T_ActionMapRow(builder);
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
protected override global::System.Type GetRowType() { protected override global::System.Type GetRowType() {
return typeof(T_ActionMapRow); return typeof(T_ActionMapRow);
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
base.OnRowChanged(e); base.OnRowChanged(e);
if ((this.T_ActionMapRowChanged != null)) { if ((this.T_ActionMapRowChanged != null)) {
@ -478,7 +478,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
base.OnRowChanging(e); base.OnRowChanging(e);
if ((this.T_ActionMapRowChanging != null)) { if ((this.T_ActionMapRowChanging != null)) {
@ -487,7 +487,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
base.OnRowDeleted(e); base.OnRowDeleted(e);
if ((this.T_ActionMapRowDeleted != null)) { if ((this.T_ActionMapRowDeleted != null)) {
@ -496,7 +496,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
base.OnRowDeleting(e); base.OnRowDeleting(e);
if ((this.T_ActionMapRowDeleting != null)) { if ((this.T_ActionMapRowDeleting != null)) {
@ -505,13 +505,13 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public void RemoveT_ActionMapRow(T_ActionMapRow row) { public void RemoveT_ActionMapRow(T_ActionMapRow row) {
this.Rows.Remove(row); this.Rows.Remove(row);
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
@ -585,6 +585,8 @@ namespace SCJMapper_V2.Table {
private global::System.Data.DataColumn columnREF_ActionMap; private global::System.Data.DataColumn columnREF_ActionMap;
private global::System.Data.DataColumn columnActionText;
private global::System.Data.DataColumn columnActionName; private global::System.Data.DataColumn columnActionName;
private global::System.Data.DataColumn columnDevice; private global::System.Data.DataColumn columnDevice;
@ -602,7 +604,7 @@ namespace SCJMapper_V2.Table {
private global::System.Data.DataColumn columnDisabled; private global::System.Data.DataColumn columnDisabled;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public T_ActionDataTable() { public T_ActionDataTable() {
this.TableName = "T_Action"; this.TableName = "T_Action";
this.BeginInit(); this.BeginInit();
@ -611,7 +613,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
internal T_ActionDataTable(global::System.Data.DataTable table) { internal T_ActionDataTable(global::System.Data.DataTable table) {
this.TableName = table.TableName; this.TableName = table.TableName;
if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
@ -628,14 +630,14 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
protected T_ActionDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : protected T_ActionDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
base(info, context) { base(info, context) {
this.InitVars(); this.InitVars();
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public global::System.Data.DataColumn ID_ActionColumn { public global::System.Data.DataColumn ID_ActionColumn {
get { get {
return this.columnID_Action; return this.columnID_Action;
@ -643,7 +645,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public global::System.Data.DataColumn REF_ActionMapColumn { public global::System.Data.DataColumn REF_ActionMapColumn {
get { get {
return this.columnREF_ActionMap; return this.columnREF_ActionMap;
@ -651,7 +653,15 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public global::System.Data.DataColumn ActionTextColumn {
get {
return this.columnActionText;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public global::System.Data.DataColumn ActionNameColumn { public global::System.Data.DataColumn ActionNameColumn {
get { get {
return this.columnActionName; return this.columnActionName;
@ -659,7 +669,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public global::System.Data.DataColumn DeviceColumn { public global::System.Data.DataColumn DeviceColumn {
get { get {
return this.columnDevice; return this.columnDevice;
@ -667,7 +677,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public global::System.Data.DataColumn Def_BindingColumn { public global::System.Data.DataColumn Def_BindingColumn {
get { get {
return this.columnDef_Binding; return this.columnDef_Binding;
@ -675,7 +685,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public global::System.Data.DataColumn Def_ModifierColumn { public global::System.Data.DataColumn Def_ModifierColumn {
get { get {
return this.columnDef_Modifier; return this.columnDef_Modifier;
@ -683,7 +693,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public global::System.Data.DataColumn AddBindColumn { public global::System.Data.DataColumn AddBindColumn {
get { get {
return this.columnAddBind; return this.columnAddBind;
@ -691,7 +701,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public global::System.Data.DataColumn Usr_BindingColumn { public global::System.Data.DataColumn Usr_BindingColumn {
get { get {
return this.columnUsr_Binding; return this.columnUsr_Binding;
@ -699,7 +709,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public global::System.Data.DataColumn Usr_ModifierColumn { public global::System.Data.DataColumn Usr_ModifierColumn {
get { get {
return this.columnUsr_Modifier; return this.columnUsr_Modifier;
@ -707,7 +717,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public global::System.Data.DataColumn DisabledColumn { public global::System.Data.DataColumn DisabledColumn {
get { get {
return this.columnDisabled; return this.columnDisabled;
@ -715,7 +725,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
[global::System.ComponentModel.Browsable(false)] [global::System.ComponentModel.Browsable(false)]
public int Count { public int Count {
get { get {
@ -724,38 +734,39 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public T_ActionRow this[int index] { public T_ActionRow this[int index] {
get { get {
return ((T_ActionRow)(this.Rows[index])); return ((T_ActionRow)(this.Rows[index]));
} }
} }
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public event T_ActionRowChangeEventHandler T_ActionRowChanging; public event T_ActionRowChangeEventHandler T_ActionRowChanging;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public event T_ActionRowChangeEventHandler T_ActionRowChanged; public event T_ActionRowChangeEventHandler T_ActionRowChanged;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public event T_ActionRowChangeEventHandler T_ActionRowDeleting; public event T_ActionRowChangeEventHandler T_ActionRowDeleting;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public event T_ActionRowChangeEventHandler T_ActionRowDeleted; public event T_ActionRowChangeEventHandler T_ActionRowDeleted;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public void AddT_ActionRow(T_ActionRow row) { public void AddT_ActionRow(T_ActionRow row) {
this.Rows.Add(row); this.Rows.Add(row);
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public T_ActionRow AddT_ActionRow(string ID_Action, T_ActionMapRow parentT_ActionMapRowByT_ActionMap_T_Action, string ActionName, string Device, string Def_Binding, string Def_Modifier, bool AddBind, string Usr_Binding, string Usr_Modifier, bool Disabled) { public T_ActionRow AddT_ActionRow(string ID_Action, T_ActionMapRow parentT_ActionMapRowByT_ActionMap_T_Action, string ActionText, string ActionName, string Device, string Def_Binding, string Def_Modifier, bool AddBind, string Usr_Binding, string Usr_Modifier, bool Disabled) {
T_ActionRow rowT_ActionRow = ((T_ActionRow)(this.NewRow())); T_ActionRow rowT_ActionRow = ((T_ActionRow)(this.NewRow()));
object[] columnValuesArray = new object[] { object[] columnValuesArray = new object[] {
ID_Action, ID_Action,
null, null,
ActionText,
ActionName, ActionName,
Device, Device,
Def_Binding, Def_Binding,
@ -773,14 +784,14 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public T_ActionRow FindByID_Action(string ID_Action) { public T_ActionRow FindByID_Action(string ID_Action) {
return ((T_ActionRow)(this.Rows.Find(new object[] { return ((T_ActionRow)(this.Rows.Find(new object[] {
ID_Action}))); ID_Action})));
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public override global::System.Data.DataTable Clone() { public override global::System.Data.DataTable Clone() {
T_ActionDataTable cln = ((T_ActionDataTable)(base.Clone())); T_ActionDataTable cln = ((T_ActionDataTable)(base.Clone()));
cln.InitVars(); cln.InitVars();
@ -788,16 +799,17 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
protected override global::System.Data.DataTable CreateInstance() { protected override global::System.Data.DataTable CreateInstance() {
return new T_ActionDataTable(); return new T_ActionDataTable();
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
internal void InitVars() { internal void InitVars() {
this.columnID_Action = base.Columns["ID_Action"]; this.columnID_Action = base.Columns["ID_Action"];
this.columnREF_ActionMap = base.Columns["REF_ActionMap"]; this.columnREF_ActionMap = base.Columns["REF_ActionMap"];
this.columnActionText = base.Columns["ActionText"];
this.columnActionName = base.Columns["ActionName"]; this.columnActionName = base.Columns["ActionName"];
this.columnDevice = base.Columns["Device"]; this.columnDevice = base.Columns["Device"];
this.columnDef_Binding = base.Columns["Def_Binding"]; this.columnDef_Binding = base.Columns["Def_Binding"];
@ -809,12 +821,14 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
private void InitClass() { private void InitClass() {
this.columnID_Action = new global::System.Data.DataColumn("ID_Action", typeof(string), null, global::System.Data.MappingType.Element); this.columnID_Action = new global::System.Data.DataColumn("ID_Action", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnID_Action); base.Columns.Add(this.columnID_Action);
this.columnREF_ActionMap = new global::System.Data.DataColumn("REF_ActionMap", typeof(string), null, global::System.Data.MappingType.Element); this.columnREF_ActionMap = new global::System.Data.DataColumn("REF_ActionMap", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnREF_ActionMap); base.Columns.Add(this.columnREF_ActionMap);
this.columnActionText = new global::System.Data.DataColumn("ActionText", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnActionText);
this.columnActionName = new global::System.Data.DataColumn("ActionName", typeof(string), null, global::System.Data.MappingType.Element); this.columnActionName = new global::System.Data.DataColumn("ActionName", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnActionName); base.Columns.Add(this.columnActionName);
this.columnDevice = new global::System.Data.DataColumn("Device", typeof(string), null, global::System.Data.MappingType.Element); this.columnDevice = new global::System.Data.DataColumn("Device", typeof(string), null, global::System.Data.MappingType.Element);
@ -841,6 +855,9 @@ namespace SCJMapper_V2.Table {
this.columnREF_ActionMap.ReadOnly = true; this.columnREF_ActionMap.ReadOnly = true;
this.columnREF_ActionMap.Caption = "ActionMap"; this.columnREF_ActionMap.Caption = "ActionMap";
this.columnREF_ActionMap.DefaultValue = ((string)("\"\"")); this.columnREF_ActionMap.DefaultValue = ((string)("\"\""));
this.columnActionText.AllowDBNull = false;
this.columnActionText.ReadOnly = true;
this.columnActionText.DefaultValue = ((string)("\"\""));
this.columnActionName.AllowDBNull = false; this.columnActionName.AllowDBNull = false;
this.columnActionName.ReadOnly = true; this.columnActionName.ReadOnly = true;
this.columnActionName.DefaultValue = ((string)("\"\"")); this.columnActionName.DefaultValue = ((string)("\"\""));
@ -859,25 +876,25 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public T_ActionRow NewT_ActionRow() { public T_ActionRow NewT_ActionRow() {
return ((T_ActionRow)(this.NewRow())); return ((T_ActionRow)(this.NewRow()));
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
return new T_ActionRow(builder); return new T_ActionRow(builder);
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
protected override global::System.Type GetRowType() { protected override global::System.Type GetRowType() {
return typeof(T_ActionRow); return typeof(T_ActionRow);
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
base.OnRowChanged(e); base.OnRowChanged(e);
if ((this.T_ActionRowChanged != null)) { if ((this.T_ActionRowChanged != null)) {
@ -886,7 +903,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
base.OnRowChanging(e); base.OnRowChanging(e);
if ((this.T_ActionRowChanging != null)) { if ((this.T_ActionRowChanging != null)) {
@ -895,7 +912,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
base.OnRowDeleted(e); base.OnRowDeleted(e);
if ((this.T_ActionRowDeleted != null)) { if ((this.T_ActionRowDeleted != null)) {
@ -904,7 +921,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
base.OnRowDeleting(e); base.OnRowDeleting(e);
if ((this.T_ActionRowDeleting != null)) { if ((this.T_ActionRowDeleting != null)) {
@ -913,13 +930,13 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public void RemoveT_ActionRow(T_ActionRow row) { public void RemoveT_ActionRow(T_ActionRow row) {
this.Rows.Remove(row); this.Rows.Remove(row);
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
@ -990,14 +1007,14 @@ namespace SCJMapper_V2.Table {
private T_ActionMapDataTable tableT_ActionMap; private T_ActionMapDataTable tableT_ActionMap;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
internal T_ActionMapRow(global::System.Data.DataRowBuilder rb) : internal T_ActionMapRow(global::System.Data.DataRowBuilder rb) :
base(rb) { base(rb) {
this.tableT_ActionMap = ((T_ActionMapDataTable)(this.Table)); this.tableT_ActionMap = ((T_ActionMapDataTable)(this.Table));
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public string ID_ActionMap { public string ID_ActionMap {
get { get {
return ((string)(this[this.tableT_ActionMap.ID_ActionMapColumn])); return ((string)(this[this.tableT_ActionMap.ID_ActionMapColumn]));
@ -1008,7 +1025,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public T_ActionRow[] GetT_ActionRows() { public T_ActionRow[] GetT_ActionRows() {
if ((this.Table.ChildRelations["T_ActionMap_T_Action"] == null)) { if ((this.Table.ChildRelations["T_ActionMap_T_Action"] == null)) {
return new T_ActionRow[0]; return new T_ActionRow[0];
@ -1027,14 +1044,14 @@ namespace SCJMapper_V2.Table {
private T_ActionDataTable tableT_Action; private T_ActionDataTable tableT_Action;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
internal T_ActionRow(global::System.Data.DataRowBuilder rb) : internal T_ActionRow(global::System.Data.DataRowBuilder rb) :
base(rb) { base(rb) {
this.tableT_Action = ((T_ActionDataTable)(this.Table)); this.tableT_Action = ((T_ActionDataTable)(this.Table));
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public string ID_Action { public string ID_Action {
get { get {
return ((string)(this[this.tableT_Action.ID_ActionColumn])); return ((string)(this[this.tableT_Action.ID_ActionColumn]));
@ -1045,7 +1062,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public string REF_ActionMap { public string REF_ActionMap {
get { get {
return ((string)(this[this.tableT_Action.REF_ActionMapColumn])); return ((string)(this[this.tableT_Action.REF_ActionMapColumn]));
@ -1056,7 +1073,18 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public string ActionText {
get {
return ((string)(this[this.tableT_Action.ActionTextColumn]));
}
set {
this[this.tableT_Action.ActionTextColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public string ActionName { public string ActionName {
get { get {
return ((string)(this[this.tableT_Action.ActionNameColumn])); return ((string)(this[this.tableT_Action.ActionNameColumn]));
@ -1067,7 +1095,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public string Device { public string Device {
get { get {
try { try {
@ -1083,7 +1111,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public string Def_Binding { public string Def_Binding {
get { get {
try { try {
@ -1099,7 +1127,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public string Def_Modifier { public string Def_Modifier {
get { get {
try { try {
@ -1115,7 +1143,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public bool AddBind { public bool AddBind {
get { get {
try { try {
@ -1131,7 +1159,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public string Usr_Binding { public string Usr_Binding {
get { get {
try { try {
@ -1147,7 +1175,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public string Usr_Modifier { public string Usr_Modifier {
get { get {
try { try {
@ -1163,7 +1191,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public bool Disabled { public bool Disabled {
get { get {
return ((bool)(this[this.tableT_Action.DisabledColumn])); return ((bool)(this[this.tableT_Action.DisabledColumn]));
@ -1174,7 +1202,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public T_ActionMapRow T_ActionMapRow { public T_ActionMapRow T_ActionMapRow {
get { get {
return ((T_ActionMapRow)(this.GetParentRow(this.Table.ParentRelations["T_ActionMap_T_Action"]))); return ((T_ActionMapRow)(this.GetParentRow(this.Table.ParentRelations["T_ActionMap_T_Action"])));
@ -1185,73 +1213,73 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public bool IsDeviceNull() { public bool IsDeviceNull() {
return this.IsNull(this.tableT_Action.DeviceColumn); return this.IsNull(this.tableT_Action.DeviceColumn);
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public void SetDeviceNull() { public void SetDeviceNull() {
this[this.tableT_Action.DeviceColumn] = global::System.Convert.DBNull; this[this.tableT_Action.DeviceColumn] = global::System.Convert.DBNull;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public bool IsDef_BindingNull() { public bool IsDef_BindingNull() {
return this.IsNull(this.tableT_Action.Def_BindingColumn); return this.IsNull(this.tableT_Action.Def_BindingColumn);
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public void SetDef_BindingNull() { public void SetDef_BindingNull() {
this[this.tableT_Action.Def_BindingColumn] = global::System.Convert.DBNull; this[this.tableT_Action.Def_BindingColumn] = global::System.Convert.DBNull;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public bool IsDef_ModifierNull() { public bool IsDef_ModifierNull() {
return this.IsNull(this.tableT_Action.Def_ModifierColumn); return this.IsNull(this.tableT_Action.Def_ModifierColumn);
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public void SetDef_ModifierNull() { public void SetDef_ModifierNull() {
this[this.tableT_Action.Def_ModifierColumn] = global::System.Convert.DBNull; this[this.tableT_Action.Def_ModifierColumn] = global::System.Convert.DBNull;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public bool IsAddBindNull() { public bool IsAddBindNull() {
return this.IsNull(this.tableT_Action.AddBindColumn); return this.IsNull(this.tableT_Action.AddBindColumn);
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public void SetAddBindNull() { public void SetAddBindNull() {
this[this.tableT_Action.AddBindColumn] = global::System.Convert.DBNull; this[this.tableT_Action.AddBindColumn] = global::System.Convert.DBNull;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public bool IsUsr_BindingNull() { public bool IsUsr_BindingNull() {
return this.IsNull(this.tableT_Action.Usr_BindingColumn); return this.IsNull(this.tableT_Action.Usr_BindingColumn);
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public void SetUsr_BindingNull() { public void SetUsr_BindingNull() {
this[this.tableT_Action.Usr_BindingColumn] = global::System.Convert.DBNull; this[this.tableT_Action.Usr_BindingColumn] = global::System.Convert.DBNull;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public bool IsUsr_ModifierNull() { public bool IsUsr_ModifierNull() {
return this.IsNull(this.tableT_Action.Usr_ModifierColumn); return this.IsNull(this.tableT_Action.Usr_ModifierColumn);
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public void SetUsr_ModifierNull() { public void SetUsr_ModifierNull() {
this[this.tableT_Action.Usr_ModifierColumn] = global::System.Convert.DBNull; this[this.tableT_Action.Usr_ModifierColumn] = global::System.Convert.DBNull;
} }
@ -1260,7 +1288,7 @@ namespace SCJMapper_V2.Table {
/// <summary> /// <summary>
///Row event argument class ///Row event argument class
///</summary> ///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public class T_ActionMapRowChangeEvent : global::System.EventArgs { public class T_ActionMapRowChangeEvent : global::System.EventArgs {
private T_ActionMapRow eventRow; private T_ActionMapRow eventRow;
@ -1268,14 +1296,14 @@ namespace SCJMapper_V2.Table {
private global::System.Data.DataRowAction eventAction; private global::System.Data.DataRowAction eventAction;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public T_ActionMapRowChangeEvent(T_ActionMapRow row, global::System.Data.DataRowAction action) { public T_ActionMapRowChangeEvent(T_ActionMapRow row, global::System.Data.DataRowAction action) {
this.eventRow = row; this.eventRow = row;
this.eventAction = action; this.eventAction = action;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public T_ActionMapRow Row { public T_ActionMapRow Row {
get { get {
return this.eventRow; return this.eventRow;
@ -1283,7 +1311,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public global::System.Data.DataRowAction Action { public global::System.Data.DataRowAction Action {
get { get {
return this.eventAction; return this.eventAction;
@ -1294,7 +1322,7 @@ namespace SCJMapper_V2.Table {
/// <summary> /// <summary>
///Row event argument class ///Row event argument class
///</summary> ///</summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public class T_ActionRowChangeEvent : global::System.EventArgs { public class T_ActionRowChangeEvent : global::System.EventArgs {
private T_ActionRow eventRow; private T_ActionRow eventRow;
@ -1302,14 +1330,14 @@ namespace SCJMapper_V2.Table {
private global::System.Data.DataRowAction eventAction; private global::System.Data.DataRowAction eventAction;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public T_ActionRowChangeEvent(T_ActionRow row, global::System.Data.DataRowAction action) { public T_ActionRowChangeEvent(T_ActionRow row, global::System.Data.DataRowAction action) {
this.eventRow = row; this.eventRow = row;
this.eventAction = action; this.eventAction = action;
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public T_ActionRow Row { public T_ActionRow Row {
get { get {
return this.eventRow; return this.eventRow;
@ -1317,7 +1345,7 @@ namespace SCJMapper_V2.Table {
} }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "15.0.0.0")]
public global::System.Data.DataRowAction Action { public global::System.Data.DataRowAction Action {
get { get {
return this.eventAction; return this.eventAction;

@ -12,18 +12,19 @@
<xs:element name="DS_ActionMaps" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="DS_ActionMaps" msprop:Generator_UserDSName="DS_ActionMaps"> <xs:element name="DS_ActionMaps" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="DS_ActionMaps" msprop:Generator_UserDSName="DS_ActionMaps">
<xs:complexType> <xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="T_ActionMap" msprop:Generator_TableClassName="T_ActionMapDataTable" msprop:Generator_TableVarName="tableT_ActionMap" msprop:Generator_TablePropName="T_ActionMap" msprop:Generator_RowDeletingName="T_ActionMapRowDeleting" msprop:Generator_RowChangingName="T_ActionMapRowChanging" msprop:Generator_RowEvHandlerName="T_ActionMapRowChangeEventHandler" msprop:Generator_RowDeletedName="T_ActionMapRowDeleted" msprop:Generator_UserTableName="T_ActionMap" msprop:Generator_RowChangedName="T_ActionMapRowChanged" msprop:Generator_RowEvArgName="T_ActionMapRowChangeEvent" msprop:Generator_RowClassName="T_ActionMapRow"> <xs:element name="T_ActionMap" msprop:Generator_TableClassName="T_ActionMapDataTable" msprop:Generator_TableVarName="tableT_ActionMap" msprop:Generator_RowChangedName="T_ActionMapRowChanged" msprop:Generator_TablePropName="T_ActionMap" msprop:Generator_RowDeletingName="T_ActionMapRowDeleting" msprop:Generator_RowChangingName="T_ActionMapRowChanging" msprop:Generator_RowEvHandlerName="T_ActionMapRowChangeEventHandler" msprop:Generator_RowDeletedName="T_ActionMapRowDeleted" msprop:Generator_RowClassName="T_ActionMapRow" msprop:Generator_UserTableName="T_ActionMap" msprop:Generator_RowEvArgName="T_ActionMapRowChangeEvent">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element name="ID_ActionMap" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnID_ActionMap" msprop:Generator_ColumnPropNameInRow="ID_ActionMap" msprop:Generator_ColumnPropNameInTable="ID_ActionMapColumn" msprop:Generator_UserColumnName="ID_ActionMap" type="xs:string" default="&quot;&quot;" /> <xs:element name="ID_ActionMap" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnID_ActionMap" msprop:Generator_ColumnPropNameInRow="ID_ActionMap" msprop:Generator_ColumnPropNameInTable="ID_ActionMapColumn" msprop:Generator_UserColumnName="ID_ActionMap" type="xs:string" default="&quot;&quot;" />
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:element name="T_Action" msprop:Generator_TableClassName="T_ActionDataTable" msprop:Generator_TableVarName="tableT_Action" msprop:Generator_TablePropName="T_Action" msprop:Generator_RowDeletingName="T_ActionRowDeleting" msprop:Generator_RowChangingName="T_ActionRowChanging" msprop:Generator_RowEvHandlerName="T_ActionRowChangeEventHandler" msprop:Generator_RowDeletedName="T_ActionRowDeleted" msprop:Generator_UserTableName="T_Action" msprop:Generator_RowChangedName="T_ActionRowChanged" msprop:Generator_RowEvArgName="T_ActionRowChangeEvent" msprop:Generator_RowClassName="T_ActionRow"> <xs:element name="T_Action" msprop:Generator_TableClassName="T_ActionDataTable" msprop:Generator_TableVarName="tableT_Action" msprop:Generator_RowChangedName="T_ActionRowChanged" msprop:Generator_TablePropName="T_Action" msprop:Generator_RowDeletingName="T_ActionRowDeleting" msprop:Generator_RowChangingName="T_ActionRowChanging" msprop:Generator_RowEvHandlerName="T_ActionRowChangeEventHandler" msprop:Generator_RowDeletedName="T_ActionRowDeleted" msprop:Generator_RowClassName="T_ActionRow" msprop:Generator_UserTableName="T_Action" msprop:Generator_RowEvArgName="T_ActionRowChangeEvent">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element name="ID_Action" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnID_Action" msprop:Generator_ColumnPropNameInRow="ID_Action" msprop:Generator_ColumnPropNameInTable="ID_ActionColumn" msprop:Generator_UserColumnName="ID_Action" type="xs:string" default="&quot;&quot;" /> <xs:element name="ID_Action" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnID_Action" msprop:Generator_ColumnPropNameInRow="ID_Action" msprop:Generator_ColumnPropNameInTable="ID_ActionColumn" msprop:Generator_UserColumnName="ID_Action" type="xs:string" default="&quot;&quot;" />
<xs:element name="REF_ActionMap" msdata:ReadOnly="true" msdata:Caption="ActionMap" msprop:Generator_ColumnVarNameInTable="columnREF_ActionMap" msprop:Generator_ColumnPropNameInRow="REF_ActionMap" msprop:Generator_ColumnPropNameInTable="REF_ActionMapColumn" msprop:Generator_UserColumnName="REF_ActionMap" type="xs:string" default="&quot;&quot;" /> <xs:element name="REF_ActionMap" msdata:ReadOnly="true" msdata:Caption="ActionMap" msprop:Generator_ColumnVarNameInTable="columnREF_ActionMap" msprop:Generator_ColumnPropNameInRow="REF_ActionMap" msprop:Generator_ColumnPropNameInTable="REF_ActionMapColumn" msprop:Generator_UserColumnName="REF_ActionMap" type="xs:string" default="&quot;&quot;" />
<xs:element name="ActionText" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnActionText" msprop:Generator_ColumnPropNameInRow="ActionText" msprop:Generator_ColumnPropNameInTable="ActionTextColumn" msprop:Generator_UserColumnName="ActionText" type="xs:string" default="&quot;&quot;" />
<xs:element name="ActionName" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnActionName" msprop:Generator_ColumnPropNameInRow="ActionName" msprop:Generator_ColumnPropNameInTable="ActionNameColumn" msprop:Generator_UserColumnName="ActionName" type="xs:string" default="&quot;&quot;" /> <xs:element name="ActionName" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnActionName" msprop:Generator_ColumnPropNameInRow="ActionName" msprop:Generator_ColumnPropNameInTable="ActionNameColumn" msprop:Generator_UserColumnName="ActionName" type="xs:string" default="&quot;&quot;" />
<xs:element name="Device" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnDevice" msprop:Generator_ColumnPropNameInRow="Device" msprop:Generator_ColumnPropNameInTable="DeviceColumn" msprop:Generator_UserColumnName="Device" type="xs:string" minOccurs="0" /> <xs:element name="Device" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnDevice" msprop:Generator_ColumnPropNameInRow="Device" msprop:Generator_ColumnPropNameInTable="DeviceColumn" msprop:Generator_UserColumnName="Device" type="xs:string" minOccurs="0" />
<xs:element name="Def_Binding" msdata:ReadOnly="true" msdata:Caption="Default Binding" msprop:Generator_ColumnVarNameInTable="columnDef_Binding" msprop:Generator_ColumnPropNameInRow="Def_Binding" msprop:Generator_ColumnPropNameInTable="Def_BindingColumn" msprop:Generator_UserColumnName="Def_Binding" type="xs:string" minOccurs="0" /> <xs:element name="Def_Binding" msdata:ReadOnly="true" msdata:Caption="Default Binding" msprop:Generator_ColumnVarNameInTable="columnDef_Binding" msprop:Generator_ColumnPropNameInRow="Def_Binding" msprop:Generator_ColumnPropNameInTable="Def_BindingColumn" msprop:Generator_UserColumnName="Def_Binding" type="xs:string" minOccurs="0" />
@ -48,7 +49,7 @@
</xs:element> </xs:element>
<xs:annotation> <xs:annotation>
<xs:appinfo> <xs:appinfo>
<msdata:Relationship name="T_ActionMap_T_Action" msdata:parent="T_ActionMap" msdata:child="T_Action" msdata:parentkey="ID_ActionMap" msdata:childkey="REF_ActionMap" msprop:Generator_UserChildTable="T_Action" msprop:Generator_ChildPropName="GetT_ActionRows" msprop:Generator_UserRelationName="T_ActionMap_T_Action" msprop:Generator_ParentPropName="T_ActionMapRow" msprop:Generator_RelationVarName="relationT_ActionMap_T_Action" msprop:Generator_UserParentTable="T_ActionMap" /> <msdata:Relationship name="T_ActionMap_T_Action" msdata:parent="T_ActionMap" msdata:child="T_Action" msdata:parentkey="ID_ActionMap" msdata:childkey="REF_ActionMap" msprop:Generator_UserChildTable="T_Action" msprop:Generator_ChildPropName="GetT_ActionRows" msprop:Generator_UserRelationName="T_ActionMap_T_Action" msprop:Generator_RelationVarName="relationT_ActionMap_T_Action" msprop:Generator_UserParentTable="T_ActionMap" msprop:Generator_ParentPropName="T_ActionMapRow" />
</xs:appinfo> </xs:appinfo>
</xs:annotation> </xs:annotation>
</xs:schema> </xs:schema>

@ -7,7 +7,7 @@
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="0" ViewPortY="0" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout"> <DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="0" ViewPortY="0" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes> <Shapes>
<Shape ID="DesignTable:T_ActionMap" ZOrder="3" X="361" Y="205" Height="48" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="44" /> <Shape ID="DesignTable:T_ActionMap" ZOrder="3" X="361" Y="205" Height="48" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="44" />
<Shape ID="DesignTable:T_Action" ZOrder="1" X="627" Y="270" Height="219" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="215" /> <Shape ID="DesignTable:T_Action" ZOrder="1" X="627" Y="270" Height="238" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="234" />
</Shapes> </Shapes>
<Connectors> <Connectors>
<Connector ID="DesignRelation:T_ActionMap_T_Action" ZOrder="2" LineWidth="11"> <Connector ID="DesignRelation:T_ActionMap_T_Action" ZOrder="2" LineWidth="11">
@ -18,11 +18,11 @@
</Point> </Point>
<Point> <Point>
<X>494</X> <X>494</X>
<Y>287</Y> <Y>300</Y>
</Point> </Point>
<Point> <Point>
<X>627</X> <X>627</X>
<Y>287</Y> <Y>300</Y>
</Point> </Point>
</RoutePoints> </RoutePoints>
</Connector> </Connector>

@ -13,7 +13,7 @@ namespace SCJMapper_V2.Table
{ {
public partial class FormTable : Form public partial class FormTable : Form
{ {
public FormTable( ) public FormTable()
{ {
InitializeComponent( ); InitializeComponent( );
@ -31,6 +31,7 @@ namespace SCJMapper_V2.Table
btUpdateFromEdit.Enabled = chkEditBlend.Checked; btUpdateFromEdit.Enabled = chkEditBlend.Checked;
DGV.Columns["Usr_Binding"].ReadOnly = true; DGV.Columns["Usr_Binding"].ReadOnly = true;
DGV.Columns["Usr_Modifier"].ReadOnly = true; DGV.Columns["Usr_Modifier"].ReadOnly = true;
DGV.Columns["ActionName"].Visible = false;
DGV.ReadOnly = !chkEditBlend.Checked; DGV.ReadOnly = !chkEditBlend.Checked;
} }
@ -45,7 +46,7 @@ namespace SCJMapper_V2.Table
} }
public event EventHandler<UpdateEditEventArgs> UpdateEditEvent; public event EventHandler<UpdateEditEventArgs> UpdateEditEvent;
private void RaiseUpdateEditEvent( ) private void RaiseUpdateEditEvent()
{ {
if ( UpdateEditEvent != null ) { if ( UpdateEditEvent != null ) {
UpdateEditEvent( this, new UpdateEditEventArgs( ) ); UpdateEditEvent( this, new UpdateEditEventArgs( ) );
@ -57,7 +58,7 @@ namespace SCJMapper_V2.Table
public Point LastLocation { get; set; } public Point LastLocation { get; set; }
public string LastColSize { get; set; } public string LastColSize { get; set; }
private BindingSource m_bSrc = new BindingSource(); private BindingSource m_bSrc = new BindingSource( );
/// <summary> /// <summary>
/// Assign or retrieve the underlying DataSet /// Assign or retrieve the underlying DataSet
@ -65,8 +66,8 @@ namespace SCJMapper_V2.Table
public DS_ActionMaps DS_AMaps { get; private set; } public DS_ActionMaps DS_AMaps { get; private set; }
public void SuspendDGV( ) public void SuspendDGV()
{ {
// add things to improve speed while re-loading the DataSet outside - nothing found so far // add things to improve speed while re-loading the DataSet outside - nothing found so far
} }
@ -80,12 +81,12 @@ namespace SCJMapper_V2.Table
/// <summary> /// <summary>
/// Populate the view from the dataset /// Populate the view from the dataset
/// </summary> /// </summary>
public void Populate( ) public void Populate()
{ {
// DGV.SuspendLayout( ); // DGV.SuspendLayout( );
if ( !string.IsNullOrEmpty( LastColSize ) ) { if ( !string.IsNullOrEmpty( LastColSize ) ) {
string[] e = LastColSize.Split( new char [] {';'}, StringSplitOptions.RemoveEmptyEntries ); string[] e = LastColSize.Split( new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries );
for ( int i = 0; i < e.Length; i++ ) { for ( int i = 0; i < e.Length; i++ ) {
if ( i < DGV.Columns.Count ) if ( i < DGV.Columns.Count )
DGV.Columns[i].Width = int.Parse( e[i] ); DGV.Columns[i].Width = int.Parse( e[i] );
@ -93,7 +94,7 @@ namespace SCJMapper_V2.Table
} }
DGV.AllowUserToResizeColumns = true; DGV.AllowUserToResizeColumns = true;
ComposeFilter( ); ComposeFilter( );
// DGV.ResumeLayout( ); // DGV.ResumeLayout( );
} }
/// <summary> /// <summary>
@ -114,11 +115,11 @@ namespace SCJMapper_V2.Table
/// <param name="rowIndex"></param> /// <param name="rowIndex"></param>
private void EditRow( int rowIndex ) private void EditRow( int rowIndex )
{ {
string id = DGV.Rows[rowIndex].Cells["ID_Action"].Value.ToString(); string id = DGV.Rows[rowIndex].Cells["ID_Action"].Value.ToString( );
// we have nn-actionmap.actionkey.nodeindex // we have nn-actionmap.actionkey.nodeindex
string actionMap = DS_ActionMap.ActionMap(id); string actionMap = DS_ActionMap.ActionMap( id );
string actionKey = DS_ActionMap.ActionKey(id); string actionKey = DS_ActionMap.ActionKey( id );
int nodeIndex = DS_ActionMap.ActionCommandIndex(id); int nodeIndex = DS_ActionMap.ActionCommandIndex( id );
RaiseEditActionEvent( actionMap, actionKey, nodeIndex ); RaiseEditActionEvent( actionMap, actionKey, nodeIndex );
} }
@ -127,11 +128,11 @@ namespace SCJMapper_V2.Table
private void ComposeFilter( ) private void ComposeFilter()
{ {
// make sure we only add parts that are really used - else it is using too much time to resolve '*' // make sure we only add parts that are really used - else it is using too much time to resolve '*'
string filter = ""; string filter = "";
if ( ! string.IsNullOrEmpty( txFilterAction.Text)) { if ( !string.IsNullOrEmpty( txFilterAction.Text ) ) {
filter += string.Format( "(ActionName LIKE '*{0}*')", txFilterAction.Text ); filter += string.Format( "(ActionName LIKE '*{0}*')", txFilterAction.Text );
} }
if ( !string.IsNullOrEmpty( txFilterDefBinding.Text ) ) { if ( !string.IsNullOrEmpty( txFilterDefBinding.Text ) ) {
@ -146,7 +147,8 @@ namespace SCJMapper_V2.Table
string deviceFilter = ""; string deviceFilter = "";
if ( ( chkJoystick.Checked == false ) && ( chkGamepad.Checked == false ) && ( chkMouse.Checked == false ) && ( chkKbd.Checked == false ) ) { if ( ( chkJoystick.Checked == false ) && ( chkGamepad.Checked == false ) && ( chkMouse.Checked == false ) && ( chkKbd.Checked == false ) ) {
// none checked means all // none checked means all
} else { }
else {
deviceFilter = "( Device='X'" deviceFilter = "( Device='X'"
+ ( ( chkJoystick.Checked ) ? string.Format( " OR Device = 'joystick'" ) : "" ) + ( ( chkJoystick.Checked ) ? string.Format( " OR Device = 'joystick'" ) : "" )
+ ( ( chkGamepad.Checked ) ? string.Format( " OR Device = 'xboxpad'" ) : "" ) + ( ( chkGamepad.Checked ) ? string.Format( " OR Device = 'xboxpad'" ) : "" )
@ -229,21 +231,25 @@ namespace SCJMapper_V2.Table
private void FormTable_LocationChanged( object sender, EventArgs e ) private void FormTable_LocationChanged( object sender, EventArgs e )
{ {
LastLocation = this.Location; if ( this.WindowState == FormWindowState.Normal )
LastLocation = this.Location;
} }
private void FormTable_SizeChanged( object sender, EventArgs e ) private void FormTable_SizeChanged( object sender, EventArgs e )
{ {
LastSize = this.Size; if ( this.WindowState == FormWindowState.Normal )
LastSize = this.Size;
} }
private void DGV_ColumnWidthChanged( object sender, DataGridViewColumnEventArgs e ) private void DGV_ColumnWidthChanged( object sender, DataGridViewColumnEventArgs e )
{ {
string setting = ""; if ( this.WindowState == FormWindowState.Normal ) {
foreach ( DataGridViewColumn col in DGV.Columns ) { string setting = "";
setting += string.Format( "{0};", col.Width.ToString( ) ); foreach ( DataGridViewColumn col in DGV.Columns ) {
setting += string.Format( "{0};", col.Width.ToString( ) );
}
LastColSize = setting;
} }
LastColSize = setting;
} }
@ -294,7 +300,7 @@ namespace SCJMapper_V2.Table
if ( !chkEditBlend.Checked ) return; // only if Edit is allowed if ( !chkEditBlend.Checked ) return; // only if Edit is allowed
foreach ( DataGridViewRow row in DGV.Rows ) { foreach ( DataGridViewRow row in DGV.Rows ) {
if (string.IsNullOrEmpty((string) row.Cells[DGV.Columns["Usr_Binding"].Index].Value )) if ( string.IsNullOrEmpty( (string)row.Cells[DGV.Columns["Usr_Binding"].Index].Value ) )
row.Cells[DGV.Columns["Disabled"].Index].Value = true; row.Cells[DGV.Columns["Disabled"].Index].Value = true;
} }
} }
@ -308,9 +314,10 @@ namespace SCJMapper_V2.Table
// only if dirty and the Blended column .. // only if dirty and the Blended column ..
// it still has it's previous value i.e. inverse the logic here - commit the value imediately // it still has it's previous value i.e. inverse the logic here - commit the value imediately
if ( ( bool )DGV.Rows[DGV.CurrentCell.RowIndex].Cells[DGV.Columns["Disabled"].Index].Value == false ) { if ( (bool)DGV.Rows[DGV.CurrentCell.RowIndex].Cells[DGV.Columns["Disabled"].Index].Value == false ) {
DGV.Rows[DGV.CurrentCell.RowIndex].Cells[DGV.Columns["Disabled"].Index].Value = true; // toggle value - triggers the ValueChanged Event below DGV.Rows[DGV.CurrentCell.RowIndex].Cells[DGV.Columns["Disabled"].Index].Value = true; // toggle value - triggers the ValueChanged Event below
} else { }
else {
DGV.Rows[DGV.CurrentCell.RowIndex].Cells[DGV.Columns["Disabled"].Index].Value = false; DGV.Rows[DGV.CurrentCell.RowIndex].Cells[DGV.Columns["Disabled"].Index].Value = false;
} }
DGV.NotifyCurrentCellDirty( false ); // have set the value - so set not dirty anymore DGV.NotifyCurrentCellDirty( false ); // have set the value - so set not dirty anymore
@ -321,7 +328,7 @@ namespace SCJMapper_V2.Table
// set the Usr_Binding only if Blended column items Changes // set the Usr_Binding only if Blended column items Changes
if ( e.ColumnIndex != DGV.Columns["Disabled"].Index ) return; if ( e.ColumnIndex != DGV.Columns["Disabled"].Index ) return;
if ( ( bool )DGV.Rows[e.RowIndex].Cells[DGV.Columns["Disabled"].Index].Value == true ) if ( (bool)DGV.Rows[e.RowIndex].Cells[DGV.Columns["Disabled"].Index].Value == true )
DGV.Rows[e.RowIndex].Cells[DGV.Columns["Usr_Binding"].Index].Value = DeviceCls.DisabledInput; DGV.Rows[e.RowIndex].Cells[DGV.Columns["Usr_Binding"].Index].Value = DeviceCls.DisabledInput;
else else
DGV.Rows[e.RowIndex].Cells[DGV.Columns["Usr_Binding"].Index].Value = ""; // don't know anything else... DGV.Rows[e.RowIndex].Cells[DGV.Columns["Usr_Binding"].Index].Value = ""; // don't know anything else...

@ -47,7 +47,7 @@ namespace SCJMapper_V2.Actions
private static readonly log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod( ).DeclaringType ); private static readonly log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod( ).DeclaringType );
public string Key { get; set; } // the key is the "Daction" formatted item (as we can have the same name multiple times) public string Key { get; set; } // the key is the "Daction" formatted item (as we can have the same name multiple times)
public string ActionName { get; set; } // the plain action name e.g. v_yaw public string ActionName { get; set; } // the plain action name e.g. v_yaw
public Act.ActionDevice ActionDevice { get; set; } // the enum of the device public Act.ActionDevice ActionDevice { get; set; } // the enum of the device
public string Device { get; set; } // name of the device (uses DeviceClass) public string Device { get; set; } // name of the device (uses DeviceClass)
public string DefBinding { get; set; } // the default binding public string DefBinding { get; set; } // the default binding
@ -77,7 +77,6 @@ namespace SCJMapper_V2.Actions
public ActionCls ReassignJsN( JsReassingList newJsList ) public ActionCls ReassignJsN( JsReassingList newJsList )
{ {
ActionCls newAc = this.MyClone( ); ActionCls newAc = this.MyClone( );
// creates a copy of the list with reassigned jsN devs // creates a copy of the list with reassigned jsN devs
newAc.InputList.Clear( ); // get rid of cloned list newAc.InputList.Clear( ); // get rid of cloned list
foreach ( ActionCommandCls acc in InputList ) { foreach ( ActionCommandCls acc in InputList ) {
@ -87,7 +86,6 @@ namespace SCJMapper_V2.Actions
return newAc; return newAc;
} }
/// <summary> /// <summary>
/// ctor /// ctor
/// </summary> /// </summary>
@ -102,7 +100,6 @@ namespace SCJMapper_V2.Actions
InputList = new List<ActionCommandCls>( ); // empty list InputList = new List<ActionCommandCls>( ); // empty list
} }
/// <summary> /// <summary>
/// Creates and adds the inputCommand list with given input string /// Creates and adds the inputCommand list with given input string
/// AC2 style input is used i.e. with device tag in front /// AC2 style input is used i.e. with device tag in front
@ -122,17 +119,22 @@ namespace SCJMapper_V2.Actions
/// Add an ActionCommand with Input at nodeindex /// Add an ActionCommand with Input at nodeindex
/// apply default ActivationMode /// apply default ActivationMode
/// </summary> /// </summary>
/// <param name="devInput"></param> /// <param name="devInput">The input to apply</param>
/// <param name="index"></param> /// <param name="index">The nodeindex</param>
/// <returns></returns> /// <returns>The created ActionCommand</returns>
public ActionCommandCls AddCommand( string devInput, int index ) public ActionCommandCls AddCommand( string devInput, int index )
{ {
ActionCommandCls acc = new ActionCommandCls( devInput, index ); ActionCommandCls acc = new ActionCommandCls( devInput, index ) {
acc.ActivationMode = new ActivationMode( ActivationMode.Default ); ActivationMode = new ActivationMode( ActivationMode.Default )
};
InputList.Add( acc ); InputList.Add( acc );
return acc; return acc;
} }
/// <summary>
/// Delete an ActionCommand with nodeindex
/// </summary>
/// <param name="index">The nodeindex</param>
public void DelCommand( int index ) public void DelCommand( int index )
{ {
int removeIt = -1; int removeIt = -1;
@ -144,7 +146,6 @@ namespace SCJMapper_V2.Actions
if ( removeIt >= 0 ) InputList.RemoveAt( removeIt ); if ( removeIt >= 0 ) InputList.RemoveAt( removeIt );
} }
/// <summary> /// <summary>
/// Merge action is simply copying the new input control /// Merge action is simply copying the new input control
/// </summary> /// </summary>
@ -157,8 +158,6 @@ namespace SCJMapper_V2.Actions
} }
} }
/// <summary> /// <summary>
/// Updates an actionCommand with a new input (command) /// Updates an actionCommand with a new input (command)
/// </summary> /// </summary>
@ -193,7 +192,6 @@ namespace SCJMapper_V2.Actions
return acc; return acc;
} }
/// <summary> /// <summary>
/// Find an ActionCommand with index in an Action /// Find an ActionCommand with index in an Action
/// </summary> /// </summary>
@ -212,7 +210,6 @@ namespace SCJMapper_V2.Actions
return acc; return acc;
} }
/// <summary> /// <summary>
/// Dump the action as partial XML nicely formatted /// Dump the action as partial XML nicely formatted
/// </summary> /// </summary>
@ -233,7 +230,6 @@ namespace SCJMapper_V2.Actions
r += string.Format( "\t\t</action>\n" ); r += string.Format( "\t\t</action>\n" );
} }
} }
return r; return r;
} }

@ -26,7 +26,7 @@ namespace SCJMapper_V2.Actions
{ {
private static readonly log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod( ).DeclaringType ); private static readonly log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod( ).DeclaringType );
public string Name { get; set; } public string MapName { get; set; }
/// <summary> /// <summary>
/// Copy return the complete ActionMap while reassigning the JsN Tag /// Copy return the complete ActionMap while reassigning the JsN Tag
@ -47,11 +47,14 @@ namespace SCJMapper_V2.Actions
private ActionMapCls( ActionMapCls other ) private ActionMapCls( ActionMapCls other )
{ {
this.Name = other.Name; this.MapName = other.MapName;
// no deep copy of refs // no deep copy of refs
} }
public ActionMapCls() { } public ActionMapCls()
{
MapName = "";
}
/// <summary> /// <summary>
/// Merge the given Map with this Map /// Merge the given Map with this Map
@ -74,7 +77,6 @@ namespace SCJMapper_V2.Actions
} }
} }
/// <summary> /// <summary>
/// Dump the actionmap as partial XML nicely formatted /// Dump the actionmap as partial XML nicely formatted
/// </summary> /// </summary>
@ -87,7 +89,7 @@ namespace SCJMapper_V2.Actions
if ( !string.IsNullOrEmpty( x ) ) acs += string.Format( "\t{0}", x ); if ( !string.IsNullOrEmpty( x ) ) acs += string.Format( "\t{0}", x );
} }
if ( !string.IsNullOrWhiteSpace( acs ) ) { if ( !string.IsNullOrWhiteSpace( acs ) ) {
string r = string.Format( "\t<actionmap name=\"{0}\">\n", Name ); string r = string.Format( "\t<actionmap name=\"{0}\">\n", MapName );
r += acs; r += acs;
r += string.Format( "\t</actionmap>\n" ); r += string.Format( "\t</actionmap>\n" );
return r; return r;
@ -96,7 +98,6 @@ namespace SCJMapper_V2.Actions
return ""; return "";
} }
/// <summary> /// <summary>
/// Read an actionmap from XML - do some sanity check /// Read an actionmap from XML - do some sanity check
/// </summary> /// </summary>
@ -104,7 +105,7 @@ namespace SCJMapper_V2.Actions
/// <returns>True if an action was decoded</returns> /// <returns>True if an action was decoded</returns>
public bool fromXML( XElement actionmap ) public bool fromXML( XElement actionmap )
{ {
Name = (string)actionmap.Attribute( "name" ); // mandadory MapName = (string)actionmap.Attribute( "name" ); // mandadory
foreach ( XElement actionNode in actionmap.Nodes( ) ) { foreach ( XElement actionNode in actionmap.Nodes( ) ) {
ActionCls ac = new ActionCls( ); ActionCls ac = new ActionCls( );
if ( ac.fromXML( actionNode ) ) { if ( ac.fromXML( actionNode ) ) {

@ -1,9 +1,4 @@
 using System;
#define USE_DS_ACTIONMAPS
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using System.Xml; using System.Xml;
@ -111,10 +106,11 @@ namespace SCJMapper_V2.Actions
/// <returns>The ActionMaps copy with reassigned input</returns> /// <returns>The ActionMaps copy with reassigned input</returns>
public ActionMapsCls ReassignJsN( JsReassingList newJsList ) public ActionMapsCls ReassignJsN( JsReassingList newJsList )
{ {
var newMaps = new ActionMapsCls( this ); var newMaps = new ActionMapsCls( this ) {
newMaps.m_uiCustHeader = (UICustHeader)this.m_uiCustHeader.Clone( ); m_uiCustHeader = (UICustHeader)this.m_uiCustHeader.Clone( ),
newMaps.m_tuningOptions = (Tuningoptions)this.m_tuningOptions.Clone( ); m_tuningOptions = (Tuningoptions)this.m_tuningOptions.Clone( ),
newMaps.m_deviceOptions = (Deviceoptions)this.m_deviceOptions.Clone( ); m_deviceOptions = (Deviceoptions)this.m_deviceOptions.Clone( )
};
foreach ( ActionMapCls am in this ) { foreach ( ActionMapCls am in this ) {
newMaps.Add( am.ReassignJsN( newJsList ) ); // creates the deep copy of the tree newMaps.Add( am.ReassignJsN( newJsList ) ); // creates the deep copy of the tree
@ -125,7 +121,10 @@ namespace SCJMapper_V2.Actions
return newMaps; return newMaps;
} }
/// <summary>
/// cTor: private copy constructor
/// </summary>
/// <param name="other"></param>
private ActionMapsCls( ActionMapsCls other ) private ActionMapsCls( ActionMapsCls other )
{ {
this.version = other.version; this.version = other.version;
@ -135,7 +134,7 @@ namespace SCJMapper_V2.Actions
} }
/// <summary> /// <summary>
/// ctor /// cTor: plain, initializes values
/// </summary> /// </summary>
public ActionMapsCls() public ActionMapsCls()
{ {
@ -147,16 +146,14 @@ namespace SCJMapper_V2.Actions
for ( int i = 0; i < JoystickCls.JSnum_MAX; i++ ) { for ( int i = 0; i < JoystickCls.JSnum_MAX; i++ ) {
m_js[i] = ""; m_GUIDs[i] = ""; m_js[i] = ""; m_GUIDs[i] = "";
} }
// create the default mapped optiontree // create the default mapped optiontree
CreateNewOptions( ); // CreateNewOptions( );
//LoadSupportedActionMaps( ); // get them from config @@@@@@@@@
} }
/// <summary>
/// Helper to create all needed objs
private void CreateNewOptions() /// </summary>
public void CreateNewOptions()
{ {
// create options objs // create options objs
m_uiCustHeader = new UICustHeader( ); m_uiCustHeader = new UICustHeader( );
@ -171,11 +168,9 @@ namespace SCJMapper_V2.Actions
/// <param name="newAcm"></param> /// <param name="newAcm"></param>
private void Merge( ActionMapCls newAcm ) private void Merge( ActionMapCls newAcm )
{ {
log.Debug( "Merge - Entry" );
// do we find an actionmap like the new one in our list ? // do we find an actionmap like the new one in our list ?
ActionMapCls ACM = this.Find( delegate ( ActionMapCls acm ) { ActionMapCls ACM = this.Find( delegate ( ActionMapCls acm ) {
return acm.Name == newAcm.Name; return acm.MapName == newAcm.MapName;
} ); } );
if ( ACM == null ) { if ( ACM == null ) {
; // this.Add( newAcm ); // no, add new ; // this.Add( newAcm ); // no, add new
@ -186,8 +181,10 @@ namespace SCJMapper_V2.Actions
} }
#if USE_DS_ACTIONMAPS // see and (un)define on top of file to allow for editing the DataSet entities /// <summary>
/// Converts all maps into a DataSet
/// </summary>
/// <param name="dsa">The dataset to populate</param>
public void ToDataSet( DS_ActionMaps dsa ) public void ToDataSet( DS_ActionMaps dsa )
{ {
dsa.Clear( ); dsa.Clear( );
@ -196,7 +193,7 @@ namespace SCJMapper_V2.Actions
int AMcount = 1; int AMcount = 1;
foreach ( ActionMapCls am in this ) { foreach ( ActionMapCls am in this ) {
DS_ActionMaps.T_ActionMapRow amr = dsa.T_ActionMap.NewT_ActionMapRow( ); DS_ActionMaps.T_ActionMapRow amr = dsa.T_ActionMap.NewT_ActionMapRow( );
string amShown = DS_ActionMap.ActionMapShown( am.Name, AMcount++ ); string amShown = DS_ActionMap.ActionMapShown( SCUiText.Instance.Text( am.MapName), AMcount++ );
amr.ID_ActionMap = amShown; amr.ID_ActionMap = amShown;
dsa.T_ActionMap.AddT_ActionMapRow( amr ); dsa.T_ActionMap.AddT_ActionMapRow( amr );
@ -205,10 +202,11 @@ namespace SCJMapper_V2.Actions
int ilIndex = 0; int ilIndex = 0;
while ( ac.InputList.Count > ilIndex ) { while ( ac.InputList.Count > ilIndex ) {
DS_ActionMaps.T_ActionRow ar = dsa.T_Action.NewT_ActionRow( ); DS_ActionMaps.T_ActionRow ar = dsa.T_Action.NewT_ActionRow( );
ar.ID_Action = DS_ActionMap.ActionID( am.Name, ac.Key, ac.InputList[ilIndex].NodeIndex ); // make a unique key ar.ID_Action = DS_ActionMap.ActionID( am.MapName, ac.Key, ac.InputList[ilIndex].NodeIndex ); // make a unique key
ar.AddBind = ( ilIndex > 0 ); // all but the first are addbinds ar.AddBind = ( ilIndex > 0 ); // all but the first are addbinds
ar.REF_ActionMap = amShown; ar.REF_ActionMap = amShown;
ar.ActionName = ac.ActionName; ar.ActionName = ac.ActionName;
ar.ActionText = SCUiText.Instance.Text( ac.ActionName );
ar.Device = ac.Device; ar.Device = ac.Device;
ar.Def_Binding = ac.DefBinding; ar.Def_Binding = ac.DefBinding;
ar.Def_Modifier = ac.DefActivationMode.Name; ar.Def_Modifier = ac.DefActivationMode.Name;
@ -228,6 +226,11 @@ namespace SCJMapper_V2.Actions
dsa.AcceptChanges( ); dsa.AcceptChanges( );
} }
/// <summary>
/// Update the dataset
/// </summary>
/// <param name="dsa">The dataset</param>
/// <param name="actionID">The actionID to update from</param>
public void UpdateDataSet( DS_ActionMaps dsa, string actionID ) public void UpdateDataSet( DS_ActionMaps dsa, string actionID )
{ {
foreach ( ActionMapCls am in this ) { foreach ( ActionMapCls am in this ) {
@ -236,7 +239,7 @@ namespace SCJMapper_V2.Actions
foreach ( ActionCls ac in am ) { foreach ( ActionCls ac in am ) {
int ilIndex = 0; int ilIndex = 0;
while ( ac.InputList.Count > ilIndex ) { while ( ac.InputList.Count > ilIndex ) {
if ( actionID == DS_ActionMap.ActionID( am.Name, ac.Key, ac.InputList[ilIndex].NodeIndex ) ) { if ( actionID == DS_ActionMap.ActionID( am.MapName, ac.Key, ac.InputList[ilIndex].NodeIndex ) ) {
DS_ActionMaps.T_ActionRow ar = dsa.T_Action.FindByID_Action( actionID ); DS_ActionMaps.T_ActionRow ar = dsa.T_Action.FindByID_Action( actionID );
ar.Usr_Binding = ac.InputList[ilIndex].DevInput; ar.Usr_Binding = ac.InputList[ilIndex].DevInput;
ar.Usr_Modifier = ac.InputList[ilIndex].ActivationMode.Name; ar.Usr_Modifier = ac.InputList[ilIndex].ActivationMode.Name;
@ -248,13 +251,8 @@ namespace SCJMapper_V2.Actions
} }
}// each Action }// each Action
}// each ActionMap }// each ActionMap
} }
#endif
/// <summary> /// <summary>
/// Dump the ActionMaps as partial XML nicely formatted /// Dump the ActionMaps as partial XML nicely formatted
/// </summary> /// </summary>
@ -281,7 +279,6 @@ namespace SCJMapper_V2.Actions
// close the tag // close the tag
r += string.Format( ">\n" ); r += string.Format( ">\n" );
// *** CustomisationUIHeader // *** CustomisationUIHeader
// and dump the option contents - prepare with new data // and dump the option contents - prepare with new data

@ -52,6 +52,10 @@ namespace SCJMapper_V2.Actions
private TreeView m_MasterTree = new TreeView( ); // the master TreeView (mem only) private TreeView m_MasterTree = new TreeView( ); // the master TreeView (mem only)
private TreeView m_tvCtrlRef = null; // the TreeView in the GUI - injected from GUI via Ctrl property private TreeView m_tvCtrlRef = null; // the TreeView in the GUI - injected from GUI via Ctrl property
/// <summary>
/// Property TreeView Control
/// The class is owning the TreeView Control and manages it
/// </summary>
public TreeView Ctrl public TreeView Ctrl
{ {
get { return m_tvCtrlRef; } get { return m_tvCtrlRef; }
@ -70,8 +74,6 @@ namespace SCJMapper_V2.Actions
} }
} }
/// <summary> /// <summary>
/// If a node was selected, update it from the tree content /// If a node was selected, update it from the tree content
/// </summary> /// </summary>
@ -82,13 +84,15 @@ namespace SCJMapper_V2.Actions
NodeSelected( ); NodeSelected( );
} }
// filters
private bool m_showJoy = true; private bool m_showJoy = true;
private bool m_showGameP = true; private bool m_showGameP = true;
private bool m_showKbd = true; private bool m_showKbd = true;
private bool m_showMouse = true; private bool m_showMouse = true;
private bool m_showMappedOnly = false; private bool m_showMappedOnly = false;
private string m_Filter = ""; // the tree content filter
/// <summary> /// <summary>
/// maintains the change status (gets reset by reloading the complete tree) /// maintains the change status (gets reset by reloading the complete tree)
@ -100,9 +104,6 @@ namespace SCJMapper_V2.Actions
/// </summary> /// </summary>
public string IgnoreMaps { get; set; } public string IgnoreMaps { get; set; }
private string m_Filter = ""; // the tree content filter
/// <summary> /// <summary>
/// ctor /// ctor
/// </summary> /// </summary>
@ -146,6 +147,9 @@ namespace SCJMapper_V2.Actions
#region Properties #region Properties
/// <summary>
/// Returns if one can Assign a new binding on the selected node
/// </summary>
public bool CanAssignBinding public bool CanAssignBinding
{ {
get { get {
@ -154,7 +158,10 @@ namespace SCJMapper_V2.Actions
} }
} }
public bool CanBlendBinding /// <summary>
/// Returns if one can Disable (mask) a binding on the selected node
/// </summary>
public bool CanDisableBinding
{ {
get { get {
if ( Ctrl.SelectedNode == null ) return false; if ( Ctrl.SelectedNode == null ) return false;
@ -163,7 +170,7 @@ namespace SCJMapper_V2.Actions
} }
/// <summary> /// <summary>
/// Returns true if a binding can be cleared /// Returns true if a binding can be cleared on the selected node
/// </summary> /// </summary>
public bool CanClearBinding public bool CanClearBinding
{ {
@ -173,7 +180,9 @@ namespace SCJMapper_V2.Actions
} }
} }
/// <summary>
/// Returns if one can Add a binding on the selected node
/// </summary>
public bool CanAddBinding public bool CanAddBinding
{ {
get { get {
@ -182,6 +191,9 @@ namespace SCJMapper_V2.Actions
} }
} }
/// <summary>
/// Returns if one can Delete a binding on the selected node
/// </summary>
public bool CanDelBinding public bool CanDelBinding
{ {
get { get {
@ -218,7 +230,12 @@ namespace SCJMapper_V2.Actions
} }
} }
/// <summary>
/// Returns if an Action must be shown (based on device, mapped filters)
/// </summary>
/// <param name="actDev">The Action device</param>
/// <param name="input">The device input string</param>
/// <returns>True if it must be shown</returns>
public bool ShowAction( Act.ActionDevice actDev, string input ) public bool ShowAction( Act.ActionDevice actDev, string input )
{ {
if ( Act.IsDisabledInput( input ) && m_showMappedOnly ) return false; if ( Act.IsDisabledInput( input ) && m_showMappedOnly ) return false;
@ -231,7 +248,6 @@ namespace SCJMapper_V2.Actions
} }
} }
#endregion #endregion
/// <summary> /// <summary>
@ -262,7 +278,6 @@ namespace SCJMapper_V2.Actions
} }
} }
/// <summary> /// <summary>
/// Delete the selected ActionChild and remove corresponding ActionCommands /// Delete the selected ActionChild and remove corresponding ActionCommands
/// </summary> /// </summary>
@ -282,18 +297,22 @@ namespace SCJMapper_V2.Actions
FindAndSelectCtrlByName( matn.Name, ( matn.Parent as ActionTreeNode ).Action ); FindAndSelectCtrlByName( matn.Name, ( matn.Parent as ActionTreeNode ).Action );
} }
/// <summary>
/// Disables the binding of the selected node
/// </summary>
public void DisableBinding() public void DisableBinding()
{ {
UpdateSelectedItem( DeviceCls.DisabledInput, Act.ActionDevice.AD_Unknown, false ); UpdateSelectedItem( DeviceCls.DisabledInput, Act.ActionDevice.AD_Unknown, false );
} }
/// <summary>
/// Clears the binding of the selected node
/// </summary>
public void ClearBinding() public void ClearBinding()
{ {
UpdateSelectedItem( "", Act.ActionDevice.AD_Unknown, false ); UpdateSelectedItem( "", Act.ActionDevice.AD_Unknown, false );
} }
/// <summary> /// <summary>
/// Dumps the actions to an XML string /// Dumps the actions to an XML string
/// </summary> /// </summary>
@ -311,6 +330,10 @@ namespace SCJMapper_V2.Actions
#region MasterTree Actions #region MasterTree Actions
/// <summary>
/// Update the master tree with the given node
/// </summary>
/// <param name="node">The node to update from</param>
private void UpdateMasterNode( ActionTreeNode node ) private void UpdateMasterNode( ActionTreeNode node )
{ {
// copy to master node // copy to master node
@ -324,6 +347,10 @@ namespace SCJMapper_V2.Actions
} }
} }
/// <summary>
/// Update the master tree with the given input node
/// </summary>
/// <param name="node">The input node to update from</param>
private void UpdateMasterNode( ActionTreeInputNode node ) private void UpdateMasterNode( ActionTreeInputNode node )
{ {
log.DebugFormat( "UpdateMasterNode - Entry {0}", m_MasterTree.GetHashCode( ).ToString( ) ); log.DebugFormat( "UpdateMasterNode - Entry {0}", m_MasterTree.GetHashCode( ).ToString( ) );
@ -338,7 +365,6 @@ namespace SCJMapper_V2.Actions
} }
} }
/// <summary> /// <summary>
/// Find the master element for the given ActionNode /// Find the master element for the given ActionNode
/// </summary> /// </summary>
@ -381,8 +407,6 @@ namespace SCJMapper_V2.Actions
return null; return null;
} }
/// <summary> /// <summary>
/// Apply the filter to the GUI TreeView /// Apply the filter to the GUI TreeView
/// </summary> /// </summary>
@ -448,7 +472,6 @@ namespace SCJMapper_V2.Actions
ApplyFilter( ); // to the GUI tree ApplyFilter( ); // to the GUI tree
} }
/// <summary> /// <summary>
/// Filters entries with given criteria /// Filters entries with given criteria
/// </summary> /// </summary>
@ -462,10 +485,9 @@ namespace SCJMapper_V2.Actions
#endregion #endregion
/// <summary> /// <summary>
/// Load Mappings into the ActionList and create the Master TreeView /// Load Mappings from defaultProfile into the ActionList and create the Master TreeView
/// </summary> /// </summary>
/// <param name="defaultProfileName">The name of the profile to load (w extension)</param> /// <param name="applyDefaults">True if default mappings should be used as current mappings</param>
/// <param name="applyDefaults">True if default mappings should be carried on</param>
public void LoadProfileTree( bool applyDefaults ) public void LoadProfileTree( bool applyDefaults )
{ {
log.Debug( "LoadProfileTree - Entry" ); log.Debug( "LoadProfileTree - Entry" );
@ -507,8 +529,9 @@ namespace SCJMapper_V2.Actions
if ( !IgnoreMaps.Contains( "," + elem[iMap] + "," ) ) { if ( !IgnoreMaps.Contains( "," + elem[iMap] + "," ) ) {
// must have 2 elements min // must have 2 elements min
Array.Resize( ref cnl, 0 ); Array.Resize( ref cnl, 0 );
acm = new ActionMapCls { Name = elem[iMap] }; // get actionmap name acm = new ActionMapCls { MapName = elem[iMap] };
for ( int eIndex = iAction; eIndex < elem.Length; eIndex += 5 ) { // step 2 - action;actionlabel;defaultBinding;defaultActivationMode;defMultiTap come in as 5groups for ( int eIndex = iAction; eIndex < elem.Length; eIndex += 5 ) {
// step 2 - action;actionlabel;defaultBinding;defaultActivationMode;defMultiTap come in as 5groups
if ( !string.IsNullOrEmpty( elem[eIndex] ) ) { if ( !string.IsNullOrEmpty( elem[eIndex] ) ) {
// default assignments // default assignments
string action = elem[eIndex].Substring( 1 ); // has a device Tag as first char string action = elem[eIndex].Substring( 1 ); // has a device Tag as first char
@ -524,7 +547,7 @@ namespace SCJMapper_V2.Actions
// visual item for the action // visual item for the action
cn = new ActionTreeNode( "UNDEF" ) { cn = new ActionTreeNode( "UNDEF" ) {
Name = elem[eIndex], Action = action, ActionLabel = actionLabel, BackColor = Color.White, ImageKey = devID // name with the key it to find it.. Name = elem[eIndex], Action = action, BackColor = Color.White, ImageKey = devID // name with the key it to find it..
}; };
cn.BackColor = Color.White; // some stuff does not work properly... cn.BackColor = Color.White; // some stuff does not work properly...
if ( ActivationMode.IsDefault( defActivationModeName ) ) { if ( ActivationMode.IsDefault( defActivationModeName ) ) {
@ -586,9 +609,9 @@ namespace SCJMapper_V2.Actions
} }
}//for }//for
// ActionMap node // ActionMap node
tn = new ActionTreeNode( acm.Name, cnl ) { tn = new ActionTreeNode( acm.MapName, cnl ) {
Name = acm.Name, ActionLabel = elem[iMapLabel], Name = acm.MapName,
Action = acm.Name, // name it to find it.. Action = acm.MapName, // name it to find it..
ImageIndex = 0, NodeFont = FontActionmap // new Font( m_MasterTree.Font, FontStyle.Bold ); ImageIndex = 0, NodeFont = FontActionmap // new Font( m_MasterTree.Font, FontStyle.Bold );
}; };
m_MasterTree.BackColor = Color.White; // fix for defect TreeView (cut off bold text) m_MasterTree.BackColor = Color.White; // fix for defect TreeView (cut off bold text)
@ -610,6 +633,7 @@ namespace SCJMapper_V2.Actions
m_MasterTree.Nodes.RemoveByKey( "DUMMY" ); m_MasterTree.Nodes.RemoveByKey( "DUMMY" );
// fix for defect TreeView (cut off bold text) // fix for defect TreeView (cut off bold text)
ActionMaps.CreateNewOptions( );
txReader = null; txReader = null;
Dirty = false; Dirty = false;
@ -669,7 +693,6 @@ namespace SCJMapper_V2.Actions
// this is the main node with Action Cmd // this is the main node with Action Cmd
ActionTreeNode atn = ( Ctrl.SelectedNode as ActionTreeNode ); // the treenode from a level 1 ActionTreeNode 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 ActionCls ac = FindActionObject( atn.Parent.Name, atn.Name ); if ( ac == null ) return; // ERROR exit
// ActionCommandCls acc = ac.FindActionInputObject( ActionTreeNode.CommandFromNodeText( atn.Text ) ); if ( acc == null ) return; // ERROR exit
ActionCommandCls acc = ac.FindActionInputObject( atn.Command ); if ( acc == 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..) // new am is either a named one or the Default from Profile (which is the default from the Action due to multiTaps..)
if ( ActivationMode.IsDefault( newActivationModeName ) ) { if ( ActivationMode.IsDefault( newActivationModeName ) ) {
@ -724,7 +747,6 @@ namespace SCJMapper_V2.Actions
ActionCls ac = FindActionObject( atn.Parent.Name, atn.Name ); // the related action in an actionmap ActionCls ac = FindActionObject( atn.Parent.Name, atn.Name ); // the related action in an actionmap
if ( ac == null ) return false; // ERROR exit if ( ac == null ) return false; // ERROR exit
if ( checkKind && ( ac.ActionDevice != inKind ) ) return false; // ERROR exit if ( checkKind && ( ac.ActionDevice != inKind ) ) return false; // ERROR exit
// ActionCommandCls acc = ac.FindActionInputObject( ActionTreeNode.CommandFromNodeText( atn.Text ) );
ActionCommandCls acc = ac.FindActionInputObject( atn.Command ); if ( acc == null ) return false; // ERROR exit ActionCommandCls acc = ac.FindActionInputObject( atn.Command ); if ( acc == null ) return false; // ERROR exit
// have it - continue // have it - continue
ac.UpdateCommandFromInput( Act.DevInput( input, inKind ), acc.NodeIndex + 1 ); ac.UpdateCommandFromInput( Act.DevInput( input, inKind ), acc.NodeIndex + 1 );
@ -771,10 +793,9 @@ namespace SCJMapper_V2.Actions
/// <returns>An actionCommand or null if not found</returns> /// <returns>An actionCommand or null if not found</returns>
private ActionCommandCls FindActionInputObject( string actionMap, string actionKey, string devInput ) private ActionCommandCls FindActionInputObject( string actionMap, string actionKey, string devInput )
{ {
//log.Debug( "FindActionInputObject - Entry" );
// Apply the input to the ActionTree // Apply the input to the ActionTree
ActionCls ac = null; ActionCommandCls acc = null; ActionCls ac = null; ActionCommandCls acc = null;
ActionMapCls ACM = ActionMaps.Find( delegate ( ActionMapCls _ACM ) { return _ACM.Name == actionMap; } ); ActionMapCls ACM = ActionMaps.Find( delegate ( ActionMapCls _ACM ) { return _ACM.MapName == actionMap; } );
if ( ACM != null ) ac = ACM.Find( delegate ( ActionCls _AC ) { return _AC.Key == actionKey; } ); if ( ACM != null ) ac = ACM.Find( delegate ( ActionCls _AC ) { return _AC.Key == actionKey; } );
if ( ac != null ) acc = ac.InputList.Find( delegate ( ActionCommandCls _ACC ) { return _ACC.DevInput == devInput; } ); if ( ac != null ) acc = ac.InputList.Find( delegate ( ActionCommandCls _ACC ) { return _ACC.DevInput == devInput; } );
if ( acc == null ) { if ( acc == null ) {
@ -793,10 +814,9 @@ namespace SCJMapper_V2.Actions
/// <returns>An actionCommand or null if not found</returns> /// <returns>An actionCommand or null if not found</returns>
private ActionCommandCls FindActionInputObject( ActionTree tree, string actionMap, string actionKey, int index ) private ActionCommandCls FindActionInputObject( ActionTree tree, string actionMap, string actionKey, int index )
{ {
//log.Debug( "FindActionInputObject - Entry" );
// Apply the input to the ActionTree // Apply the input to the ActionTree
ActionCls ac = null; ActionCommandCls acc = null; ActionCls ac = null; ActionCommandCls acc = null;
ActionMapCls ACM = tree.ActionMaps.Find( delegate ( ActionMapCls _ACM ) { return _ACM.Name == actionMap; } ); ActionMapCls ACM = tree.ActionMaps.Find( delegate ( ActionMapCls _ACM ) { return _ACM.MapName == actionMap; } );
if ( ACM != null ) ac = ACM.Find( delegate ( ActionCls _AC ) { return _AC.Key == actionKey; } ); if ( ACM != null ) ac = ACM.Find( delegate ( ActionCls _AC ) { return _AC.Key == actionKey; } );
if ( ac != null ) acc = ac.InputList.Find( delegate ( ActionCommandCls _ACC ) { return _ACC.NodeIndex == index; } ); if ( ac != null ) acc = ac.InputList.Find( delegate ( ActionCommandCls _ACC ) { return _ACC.NodeIndex == index; } );
if ( acc == null ) { if ( acc == null ) {
@ -814,10 +834,9 @@ namespace SCJMapper_V2.Actions
/// <returns>An action or null if not found</returns> /// <returns>An action or null if not found</returns>
private ActionCls FindActionObject( string actionMap, string action ) private ActionCls FindActionObject( string actionMap, string action )
{ {
//log.Debug( "FindActionObject - Entry" );
// Apply the input to the ActionTree // Apply the input to the ActionTree
ActionCls ac = null; ActionCls ac = null;
ActionMapCls ACM = ActionMaps.Find( delegate ( ActionMapCls acm ) { return acm.Name == actionMap; } ); ActionMapCls ACM = ActionMaps.Find( delegate ( ActionMapCls acm ) { return acm.MapName == actionMap; } );
if ( ACM != null ) ac = ACM.Find( delegate ( ActionCls _AC ) { return _AC.Key == action; } ); if ( ACM != null ) ac = ACM.Find( delegate ( ActionCls _AC ) { return _AC.Key == action; } );
if ( ac == null ) { if ( ac == null ) {
log.Error( "FindActionObject - Action Not found in tree" ); log.Error( "FindActionObject - Action Not found in tree" );
@ -842,7 +861,6 @@ namespace SCJMapper_V2.Actions
m_showMappedOnly = showMappedOnly; m_showMappedOnly = showMappedOnly;
} }
/// <summary> /// <summary>
/// Loads the mappings back into the treeview control /// Loads the mappings back into the treeview control
/// Note: this takes a while as the list grows... /// Note: this takes a while as the list grows...
@ -852,9 +870,9 @@ namespace SCJMapper_V2.Actions
log.DebugFormat( "ReloadTreeView - Entry {0}", m_MasterTree.GetHashCode( ).ToString( ) ); log.DebugFormat( "ReloadTreeView - Entry {0}", m_MasterTree.GetHashCode( ).ToString( ) );
foreach ( ActionMapCls acm in ActionMaps ) { foreach ( ActionMapCls acm in ActionMaps ) {
if ( IgnoreMaps.Contains( "," + acm.Name + "," ) ) break; // next if ( IgnoreMaps.Contains( "," + acm.MapName + "," ) ) break; // next
try { try {
ActionTreeNode mtn = (ActionTreeNode)m_MasterTree.Nodes[acm.Name]; // get the map node ActionTreeNode mtn = (ActionTreeNode)m_MasterTree.Nodes[acm.MapName]; // get the map node
// find the item to reload into the treeview // find the item to reload into the treeview
foreach ( ActionCls ac in acm ) { foreach ( ActionCls ac in acm ) {
ActionTreeNode matn = (ActionTreeNode)mtn.Nodes[ac.Key]; // get the action node ActionTreeNode matn = (ActionTreeNode)mtn.Nodes[ac.Key]; // get the action node
@ -871,10 +889,8 @@ namespace SCJMapper_V2.Actions
} }
else { else {
// have to recreate the action child nodes // have to recreate the action child nodes
//ActionTreeInputNode matin = new ActionTreeInputNode( "UNDEF" ); matin.ImageKey = "Add";
ActionTreeInputNode matin = new ActionTreeInputNode( ac.ActionName ) { ImageKey = "Add" }; ActionTreeInputNode matin = new ActionTreeInputNode( ac.ActionName ) { ImageKey = "Add" };
matin.Update( matn); matin.Command = ""; matin.Update( matn); matin.Command = "";
acc.NodeIndex = matin.Index; // assign visual reference acc.NodeIndex = matin.Index; // assign visual reference
matn.Nodes.Add( matin ); // add to master tree matn.Nodes.Add( matin ); // add to master tree
matin.UpdateAction( acc ); UpdateMasterNode( matin ); matin.UpdateAction( acc ); UpdateMasterNode( matin );
@ -895,7 +911,6 @@ namespace SCJMapper_V2.Actions
FilterTree( ); FilterTree( );
} }
/// <summary> /// <summary>
/// Find a control that contains the string and mark it /// Find a control that contains the string and mark it
/// this method is applied to the GUI TreeView only /// this method is applied to the GUI TreeView only
@ -906,7 +921,6 @@ namespace SCJMapper_V2.Actions
log.Debug( "FindAndSelectActionKey - Entry" ); log.Debug( "FindAndSelectActionKey - Entry" );
foreach ( ActionTreeNode tn in Ctrl.Nodes ) { foreach ( ActionTreeNode tn in Ctrl.Nodes ) {
// if ( string.IsNullOrEmpty( actionmap ) || ( tn.Text == actionmap ) ) {
if ( string.IsNullOrEmpty( actionmap ) || ( tn.Action == actionmap ) ) { if ( string.IsNullOrEmpty( actionmap ) || ( tn.Action == actionmap ) ) {
// have to search nodes of nodes // have to search nodes of nodes
foreach ( ActionTreeNode stn in tn.Nodes ) { foreach ( ActionTreeNode stn in tn.Nodes ) {
@ -948,8 +962,7 @@ namespace SCJMapper_V2.Actions
// have to search nodes of nodes // have to search nodes of nodes
if ( string.IsNullOrEmpty( actionmap ) || ( tn.Action == actionmap ) ) { if ( string.IsNullOrEmpty( actionmap ) || ( tn.Action == actionmap ) ) {
foreach ( ActionTreeNode stn in tn.Nodes ) { foreach ( ActionTreeNode stn in tn.Nodes ) {
//if ( stn.Text.Contains( ctrl ) ) { if ( stn.ContainsCtrl( ctrl ) ) {
if ( stn.Contains( ctrl ) ) {
if ( Ctrl.SelectedNode == stn ) NodeSelected( ); if ( Ctrl.SelectedNode == stn ) NodeSelected( );
Ctrl.SelectedNode = stn; Ctrl.SelectedNode = stn;
Ctrl.SelectedNode.EnsureVisible( ); Ctrl.SelectedNode.EnsureVisible( );
@ -957,8 +970,7 @@ namespace SCJMapper_V2.Actions
} }
// have to search nodes of nodes // have to search nodes of nodes
foreach ( ActionTreeInputNode sstn in stn.Nodes ) { foreach ( ActionTreeInputNode sstn in stn.Nodes ) {
//if ( sstn.Text.Contains( ctrl ) ) { if ( sstn.ContainsCtrl( ctrl ) ) {
if ( sstn.Contains( ctrl ) ) {
if ( Ctrl.SelectedNode == sstn ) NodeSelected( ); if ( Ctrl.SelectedNode == sstn ) NodeSelected( );
Ctrl.SelectedNode = sstn; Ctrl.SelectedNode = sstn;
Ctrl.SelectedNode.EnsureVisible( ); Ctrl.SelectedNode.EnsureVisible( );
@ -970,7 +982,6 @@ namespace SCJMapper_V2.Actions
} }
} }
/// <summary> /// <summary>
/// Find a control that contains the string and mark it /// Find a control that contains the string and mark it
/// this method is applied to the GUI TreeView only /// this method is applied to the GUI TreeView only
@ -1003,7 +1014,6 @@ namespace SCJMapper_V2.Actions
} }
} }
/// <summary> /// <summary>
/// Find all actions that are mapped to this input /// Find all actions that are mapped to this input
/// </summary> /// </summary>
@ -1026,7 +1036,7 @@ namespace SCJMapper_V2.Actions
if ( ac.DefBinding == input ) { if ( ac.DefBinding == input ) {
ret.Add( "" ); ret.Add( "" );
aMode = string.Format( "{0};{1}", ac.DefActivationMode.Name, ac.DefActivationMode.MultiTap ); aMode = string.Format( "{0};{1}", ac.DefActivationMode.Name, ac.DefActivationMode.MultiTap );
l = string.Format( "{0} - {1} - {2} - {3}", "profile", ac.ActionName, acm.Name, aMode ); l = string.Format( "{0} - {1} - {2} - {3}", "profile", ac.ActionName, acm.MapName, aMode );
ret.Add( l ); ret.Add( l );
} }
foreach ( ActionCommandCls acc in ac.InputList ) { foreach ( ActionCommandCls acc in ac.InputList ) {
@ -1034,7 +1044,7 @@ namespace SCJMapper_V2.Actions
aMode = string.Format( "modified;{0};{1}", acc.ActivationMode.Name, acc.ActivationMode.MultiTap ); aMode = string.Format( "modified;{0};{1}", acc.ActivationMode.Name, acc.ActivationMode.MultiTap );
if ( acc.ActivationMode == ActivationMode.Default ) if ( acc.ActivationMode == ActivationMode.Default )
aMode = string.Format( "default" ); aMode = string.Format( "default" );
l = string.Format( "{0} - {1} - {2} - {3}", "mapped ", ac.ActionName, acm.Name, aMode ); l = string.Format( "{0} - {1} - {2} - {3}", "mapped ", ac.ActionName, acm.MapName, aMode );
ret.Add( l ); ret.Add( l );
} }
} }
@ -1075,7 +1085,7 @@ namespace SCJMapper_V2.Actions
if ( acc.ActivationMode == ActivationMode.Default ) if ( acc.ActivationMode == ActivationMode.Default )
aMode = string.Format( "default" ); aMode = string.Format( "default" );
rtf.RHighlightColor = RTF.RTFformatter.ERColor.ERC_Green; rtf.RHighlightColor = RTF.RTFformatter.ERColor.ERC_Green;
rtf.Write( "mapped" ); rtf.WriteTab( ac.ActionName ); rtf.WriteTab( acm.Name ); rtf.WriteTab( aMode.PadRight( 80 ) ); rtf.WriteLn( ); rtf.Write( "mapped" ); rtf.WriteTab( ac.ActionName ); rtf.WriteTab( acm.MapName ); rtf.WriteTab( aMode.PadRight( 80 ) ); rtf.WriteLn( );
rtf.RHighlightColor = RTF.RTFformatter.ERColor.ERC_Black; rtf.RHighlightColor = RTF.RTFformatter.ERColor.ERC_Black;
rtf.WriteLn( ); rtf.WriteLn( );
used = true; used = true;
@ -1084,16 +1094,15 @@ namespace SCJMapper_V2.Actions
} }
if ( ( !used ) && ac.DefBinding == input ) { if ( ( !used ) && ac.DefBinding == input ) {
aMode = string.Format( "{0};{1}", ac.DefActivationMode.Name, ac.DefActivationMode.MultiTap ); aMode = string.Format( "{0};{1}", ac.DefActivationMode.Name, ac.DefActivationMode.MultiTap );
rtf.Write( "profile" ); rtf.WriteTab( ac.ActionName ); rtf.WriteTab( acm.Name ); rtf.WriteTab( aMode ); rtf.WriteLn( ); rtf.Write( "profile" ); rtf.WriteTab( ac.ActionName ); rtf.WriteTab( acm.MapName ); rtf.WriteTab( aMode ); rtf.WriteLn( );
rtf.WriteLn( ); rtf.WriteLn( );
} }
} }
} }
} }
/// <summary> /// <summary>
/// Find a control the the actionmap that contains the Text /// Find a control the the actionmap that contains the ActionText
/// </summary> /// </summary>
/// <param name="actionmap">The actionmap to find the string, empty string matches all actionmaps</param> /// <param name="actionmap">The actionmap to find the string, empty string matches all actionmaps</param>
/// <param name="text">The string to find</param> /// <param name="text">The string to find</param>
@ -1125,7 +1134,6 @@ namespace SCJMapper_V2.Actions
return FindText( "", text ); return FindText( "", text );
} }
/// <summary> /// <summary>
/// Returns Action and Ctrl of the currently selected node /// Returns Action and Ctrl of the currently selected node
/// </summary> /// </summary>
@ -1138,15 +1146,11 @@ namespace SCJMapper_V2.Actions
if ( Ctrl.SelectedNode.Level == 1 ) { if ( Ctrl.SelectedNode.Level == 1 ) {
ActionTreeNode matn = FindMasterAction( (ActionTreeNode)Ctrl.SelectedNode ); ActionTreeNode matn = FindMasterAction( (ActionTreeNode)Ctrl.SelectedNode );
// action = ActionTreeNode.ActionFromNodeText( matn.Text );
// ctrl = ActionTreeNode.CommandFromNodeText( matn.Text );
action = matn.Action; action = matn.Action;
ctrl = matn.Command; ctrl = matn.Command;
} }
else if ( Ctrl.SelectedNode.Level == 2 ) { else if ( Ctrl.SelectedNode.Level == 2 ) {
ActionTreeNode matn = FindMasterAction( (ActionTreeInputNode)Ctrl.SelectedNode ); // the parent treenode ActionTreeNode matn = FindMasterAction( (ActionTreeInputNode)Ctrl.SelectedNode ); // the parent treenode
// action = ActionTreeNode.ActionFromNodeText( matn.Text );
// ctrl = ActionTreeNode.CommandFromNodeText( matn.Text );
action = matn.Action; action = matn.Action;
ctrl = matn.Command; ctrl = matn.Command;
} }
@ -1161,12 +1165,10 @@ namespace SCJMapper_V2.Actions
if ( Ctrl.SelectedNode == null ) return ""; if ( Ctrl.SelectedNode == null ) return "";
if ( Ctrl.SelectedNode.Level == 1 ) { if ( Ctrl.SelectedNode.Level == 1 ) {
ActionTreeNode matn = FindMasterAction( (ActionTreeNode)Ctrl.SelectedNode ); ActionTreeNode matn = FindMasterAction( (ActionTreeNode)Ctrl.SelectedNode );
// return ActionTreeNode.CommandFromNodeText( matn.Text );
return matn.Command; return matn.Command;
} }
else if ( Ctrl.SelectedNode.Level == 2 ) { else if ( Ctrl.SelectedNode.Level == 2 ) {
ActionTreeNode matn = FindMasterAction( (ActionTreeInputNode)Ctrl.SelectedNode ); // the parent treenode ActionTreeNode matn = FindMasterAction( (ActionTreeInputNode)Ctrl.SelectedNode ); // the parent treenode
// return ActionTreeNode.CommandFromNodeText( matn.Text );
return matn.Command; return matn.Command;
} }
else return ""; else return "";
@ -1182,12 +1184,10 @@ namespace SCJMapper_V2.Actions
if ( Ctrl.SelectedNode == null ) return ""; if ( Ctrl.SelectedNode == null ) return "";
if ( Ctrl.SelectedNode.Level == 1 ) { if ( Ctrl.SelectedNode.Level == 1 ) {
ActionTreeNode matn = FindMasterAction( (ActionTreeNode)Ctrl.SelectedNode ); ActionTreeNode matn = FindMasterAction( (ActionTreeNode)Ctrl.SelectedNode );
// return ActionTreeNode.ActionFromNodeText( matn.Text );
return matn.Action; return matn.Action;
} }
else if ( Ctrl.SelectedNode.Level == 2 ) { else if ( Ctrl.SelectedNode.Level == 2 ) {
ActionTreeNode matn = FindMasterAction( (ActionTreeNode)Ctrl.SelectedNode.Parent ); // the parent treenode ActionTreeNode matn = FindMasterAction( (ActionTreeNode)Ctrl.SelectedNode.Parent ); // the parent treenode
// return ActionTreeNode.ActionFromNodeText( matn.Text );
return matn.Action; return matn.Action;
} }
else return ""; else return "";
@ -1210,7 +1210,6 @@ namespace SCJMapper_V2.Actions
ActionTreeNode atn = ( Ctrl.SelectedNode as ActionTreeNode ); // the treenode from a level 1 ActionTreeNode 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 ActionCls ac = FindActionObject( atn.Parent.Name, atn.Name ); // the related action in an actionmap
if ( ac == null ) return ""; // ERROR exit if ( ac == null ) return ""; // ERROR exit
// ActionCommandCls acc = ac.FindActionInputObject( ActionTreeNode.CommandFromNodeText( atn.Text ) ); if ( acc == null ) return ""; // ERROR exit
ActionCommandCls acc = ac.FindActionInputObject( atn.Command ); if ( acc == null ) return ""; // ERROR exit ActionCommandCls acc = ac.FindActionInputObject( atn.Command ); if ( acc == null ) return ""; // ERROR exit
// have it - continue // have it - continue
string actionID = DS_ActionMap.ActionID( atn.Parent.Name, ac.Key, acc.NodeIndex ); string actionID = DS_ActionMap.ActionID( atn.Parent.Name, ac.Key, acc.NodeIndex );
@ -1277,15 +1276,13 @@ namespace SCJMapper_V2.Actions
} }
/// <summary> /// <summary>
/// Reports a summary list of the mapped items /// Reports a summary list of the mapped items
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public string ReportActions() public string ReportActions()
{ {
log.Debug( "FindCtrl - ReportActions" ); log.Debug( "ReportActions - Entry" );
string repList = ""; string repList = "";
// JS assignments // JS assignments
@ -1293,25 +1290,30 @@ namespace SCJMapper_V2.Actions
if ( !string.IsNullOrEmpty( ActionMaps.jsN[i] ) ) repList += string.Format( "** js{0} = {1}\n", i + 1, ActionMaps.jsN[i] ); if ( !string.IsNullOrEmpty( ActionMaps.jsN[i] ) ) repList += string.Format( "** js{0} = {1}\n", i + 1, ActionMaps.jsN[i] );
} }
// now the mapped actions // now the mapped actions
const int padAction = 42; const int padAction = 50;
const int padDevice = 4; const int padDevice = 4;
const int padInput = 25; const int padInput = 25;
repList += string.Format( "\n" ); repList += string.Format( "\n" );
repList += string.Format( " {0}+- {1} _ {2}#-[{4}] {3}\n\n", "Action".PadRight( padAction ), "Dev".PadRight( padDevice ), "Binding".PadRight( padInput ), "Activation", "T" ); // col description line repList += string.Format( " {0}+- {1} _ {2}#-[{4}] {3}\n\n", "Action".PadRight( padAction ),
"Dev".PadRight( padDevice ),
"Binding".PadRight( padInput ),
"Activation", "T" ); // col description line
foreach ( ActionMapCls acm in ActionMaps ) { foreach ( ActionMapCls acm in ActionMaps ) {
string rep = string.Format( "*** {0}\n", acm.Name ); string rep = string.Format( "*** {0}\n", SCUiText.Instance.Text( acm.MapName ) );
repList += rep; repList += rep;
foreach ( ActionCls ac in acm ) { foreach ( ActionCls ac in acm ) {
foreach ( ActionCommandCls acc in ac.InputList ) { foreach ( ActionCommandCls acc in ac.InputList ) {
if ( ShowAction( ac.ActionDevice, acc.Input ) ) { if ( ShowAction( ac.ActionDevice, acc.Input ) ) {
if ( !string.IsNullOrEmpty( acc.Input ) /* && !( acc.Input == DeviceCls.BlendedInput )*/ ) { if ( !string.IsNullOrEmpty( acc.Input ) /* && !( acc.Input == DeviceCls.BlendedInput )*/ ) {
string actionName = SCUiText.Instance.Text( ac.ActionName );
if ( actionName.Length > padAction ) actionName = actionName.Substring( 0, padAction );
if ( acc.DevInput == ac.DefBinding ) { if ( acc.DevInput == ac.DefBinding ) {
rep = string.Format( " {0} . {1} _ {2}", ac.ActionName.PadRight( padAction ), acc.DevID.PadRight( padDevice ), acc.Input.PadRight( padInput ) ); rep = string.Format( " {0} . {1} _ {2}", actionName.PadRight( padAction ), acc.DevID.PadRight( padDevice ), acc.Input.PadRight( padInput ) );
} }
else { else {
rep = string.Format( " {0} + {1} _ {2}", ac.ActionName.PadRight( padAction ), acc.DevID.PadRight( padDevice ), acc.Input.PadRight( padInput ) ); // my binding rep = string.Format( " {0} + {1} _ {2}", actionName.PadRight( padAction ), acc.DevID.PadRight( padDevice ), acc.Input.PadRight( padInput ) ); // my binding
} }
if ( acc.ActivationMode == ActivationMode.Default ) { if ( acc.ActivationMode == ActivationMode.Default ) {
rep += string.Format( " . [{1}] {0}\n", ac.DefActivationMode.Name, ac.DefActivationMode.MultiTap ); rep += string.Format( " . [{1}] {0}\n", ac.DefActivationMode.Name, ac.DefActivationMode.MultiTap );
@ -1330,14 +1332,13 @@ namespace SCJMapper_V2.Actions
return repList; return repList;
} }
/// <summary> /// <summary>
/// Reports a summary list of the mapped items /// Reports a summary list of the mapped items
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public string ReportActionsCSV( bool listModifiers ) public string ReportActionsCSV( bool listModifiers )
{ {
log.Debug( "FindCtrl - ReportActions2" ); log.Debug( "ReportActionsCSV - Entry" );
string repList = ""; string repList = "";
// JS assignments // JS assignments
@ -1384,7 +1385,8 @@ namespace SCJMapper_V2.Actions
} }
// action changed - restart collection // action changed - restart collection
action = ac.ActionName; action = ac.ActionName;
rep = string.Format( "{0};{1};", acm.Name, ac.ActionName ); // actionmap; action rep = string.Format( "{0};{1};", 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 // note: don't add trailing semicolons as the are applied in the output formatting
if ( listModifiers ) { if ( listModifiers ) {
kbA = "n.a.;;;;"; // defaults tag;input;mod-tag;mod-name;mod-mult kbA = "n.a.;;;;"; // defaults tag;input;mod-tag;mod-name;mod-mult

@ -7,67 +7,12 @@ using System.Windows.Forms;
namespace SCJMapper_V2.Actions namespace SCJMapper_V2.Actions
{ {
/// <summary> /// <summary>
/// Our INPUT TreeNode - inherits a ActionTreeNode one and adds some functionality /// Our INPUT TreeNode - inherits from ActionTreeNode - serves as a distinct type in the ActionTree for Inputs
/// ///
/// contains the input command i.e. - js2_button3 OR ! js1_x (MODs applies at the very beginning of the string)
/// </summary> /// </summary>
class ActionTreeInputNode : ActionTreeNode class ActionTreeInputNode : ActionTreeNode
{ {
#region Static items
// Handle all text label composition and extraction here
///// <summary>
///// Returns a the cmd with standard modifier if modified == true
///// </summary>
///// <param name="cmd">Any string</param>
///// <param name="modified">Bool true if a modifier shall be added</param>
///// <returns>The string with added Modifier if requested</returns>
//private static string ComposeNodeText( string cmd, bool modified = false )
//{
// if ( string.IsNullOrEmpty( cmd ) ) {
// return "";
// }
// else {
// if ( modified )
// return string.Format( "{0} {1}", cmd, ActionTreeNode.ModDiv ); // js1_button1 #
// else
// return string.Format( "{0}", cmd ); // js1_button1
// }
//}
///// <summary>
///// Returns the cmd part of a string like "cmd - anything #"
///// </summary>
///// <param name="nodeText">A nodetext string like "cmd - anything #"</param>
///// <param name="cmd">contains the cmd part if delimiters are present - else returns the input</param>
//private static void DecompNodeText( string nodeText, out string cmd )
//{
// string[] e = nodeText.Split( new char[] { RegDiv, ModDiv }, StringSplitOptions.RemoveEmptyEntries );
// if ( e.Length > 0 )
// cmd = e[0].TrimEnd( );
// else
// cmd = nodeText;
//}
///// <summary>
///// Returns the command part from a node text
///// i.e. "v_pitch - js1_x" returns v_pitch
///// </summary>
///// <param name="nodeText">The node text in 'action - command' notation</param>
///// <returns>the command part or an empty string</returns>
//private new static string CommandFromNodeText( string nodeText )
//{
// ActionTreeInputNode.DecompNodeText( nodeText, out string cmd );
// return cmd;
//}
#endregion
// Object defs // Object defs
/// <summary> /// <summary>
@ -108,35 +53,5 @@ namespace SCJMapper_V2.Actions
{ {
} }
///// <summary>
///// Property Text of an Input node
///// </summary>
//public new string Text
//{
// get { return base.Text; }
// set
// {
// ActionTreeInputNode.DecompNodeText( value, out m_command );
// m_actionText = ActionTreeInputNode.ComposeNodeText( AddDiv + m_command, m_modified ); // tag for the node processing
// base.Text = m_actionText; // TODO
// }
//}
//public new string Command
///// <summary>
///// Property Command of an Input node
///// </summary>
//{
// get { return m_command; }
// set
// {
// m_command = value;
// m_actionText = ActionTreeInputNode.ComposeNodeText( m_command, m_modified ); // compose - later it will be decomposed again
// base.Text = m_actionText; // TODO
// }
//}
} }
} }

@ -155,7 +155,6 @@ namespace SCJMapper_V2.Actions
this.NodeFont = srcNode.NodeFont; this.NodeFont = srcNode.NodeFont;
this.ImageKey = srcNode.ImageKey; this.ImageKey = srcNode.ImageKey;
this.Tag = srcNode.Tag; this.Tag = srcNode.Tag;
this.m_actionLabel = srcNode.m_actionLabel;
this.m_action = srcNode.m_action; this.m_action = srcNode.m_action;
this.m_actionDevice = srcNode.m_actionDevice; this.m_actionDevice = srcNode.m_actionDevice;
this.m_actionText = srcNode.m_actionText; this.m_actionText = srcNode.m_actionText;
@ -165,7 +164,6 @@ namespace SCJMapper_V2.Actions
} }
// our own properties // our own properties
private string m_actionLabel = ""; // the text shown - translated m_action
protected string m_actionText = ""; // contains the former Text property of the TreeNode protected string m_actionText = ""; // contains the former Text property of the TreeNode
private string m_action = ""; // i.e. v_pitch private string m_action = ""; // i.e. v_pitch
protected string m_command = ""; // i.e. js2_button3 protected string m_command = ""; // i.e. js2_button3
@ -176,9 +174,9 @@ namespace SCJMapper_V2.Actions
/// Crates the translated node text for display /// Crates the translated node text for display
/// </summary> /// </summary>
/// <returns>A composed string</returns> /// <returns>A composed string</returns>
protected string ComposeNodeText( ) protected string ComposeNodeText()
{ {
string tAction = SC.SCUiText.Instance.Text( m_actionLabel, m_action ); string tAction = SC.SCUiText.Instance.Text( m_action );
if ( string.IsNullOrEmpty( m_command ) ) { if ( string.IsNullOrEmpty( m_command ) ) {
return tAction; // v_eject return tAction; // v_eject
@ -194,8 +192,6 @@ namespace SCJMapper_V2.Actions
} }
} }
/// <summary> /// <summary>
/// Update this node from the other node /// Update this node from the other node
/// applies dynamic props only /// applies dynamic props only
@ -205,10 +201,11 @@ namespace SCJMapper_V2.Actions
{ {
// TreeNode props // TreeNode props
this.BackColor = other.BackColor; this.BackColor = other.BackColor;
this.ToolTipText = other.ToolTipText;
// own props // own props
this.Command = other.Command; this.Command = other.Command;
this.Modified = other.Modified; this.Modified = other.Modified;
this.ActionLabel = other.ActionLabel;
this.Action = other.Action; //? does this fill all the rest properly? this.Action = other.Action; //? does this fill all the rest properly?
} }
@ -228,7 +225,6 @@ namespace SCJMapper_V2.Actions
this.Command = ""; this.BackColor = MyColors.UnassignedColor; this.Command = ""; this.BackColor = MyColors.UnassignedColor;
if ( this.Level == 2 ) { if ( this.Level == 2 ) {
this.Action = ( this.Parent as ActionTreeNode ).Action; this.Action = ( this.Parent as ActionTreeNode ).Action;
this.ActionLabel = (this.Parent as ActionTreeNode).ActionLabel; // apply UNDEF - 20160525 fix addbind not showing UNDEF if assigned
} }
} }
// blended mapped ones - can only get a Blend Background // blended mapped ones - can only get a Blend Background
@ -244,29 +240,10 @@ namespace SCJMapper_V2.Actions
this.Modified = !actionCmd.DefaultActivationMode; // apply modifier visual this.Modified = !actionCmd.DefaultActivationMode; // apply modifier visual
} }
///// <summary>
///// Property Text of an Action node
///// </summary>
//public new string Text
//{
// get { return base.Text; }
// private set {
// ActionTreeNode.DecompNodeActionText( value, out m_action, out m_command );
// m_actionText = ActionTreeNode.ComposeNodeActionText( m_action, m_command, m_modified );
// base.Text = ComposeNodeText(); // TODO for now
// }
//}
/// <summary> /// <summary>
/// Property ActionText (action in profile notation i.e. v_something) of an Action node /// Property ActionText (action in profile notation i.e. v_something) of an Action node
/// </summary> /// </summary>
public string ActionText { get => m_actionText; } public string ActionText { get => m_actionText; }
/// <summary>
/// Property ActionLabel of an Action node
/// </summary>
public string ActionLabel { get => m_actionLabel; set => m_actionLabel = value; }
/// <summary> /// <summary>
/// Property Action of an Action node /// Property Action of an Action node
@ -277,6 +254,7 @@ namespace SCJMapper_V2.Actions
set { set {
m_action = value; m_action = value;
// may need to update too // may need to update too
this.ToolTipText = m_action;
m_actionText = ActionTreeNode.ComposeNodeActionText( m_action, m_command, m_modified ); m_actionText = ActionTreeNode.ComposeNodeActionText( m_action, m_command, m_modified );
base.Text = ComposeNodeText( ); base.Text = ComposeNodeText( );
} }
@ -306,19 +284,37 @@ namespace SCJMapper_V2.Actions
m_modified = value; m_modified = value;
// may need to update too // may need to update too
m_actionText = ActionTreeNode.ComposeNodeActionText( m_action, m_command, m_modified ); m_actionText = ActionTreeNode.ComposeNodeActionText( m_action, m_command, m_modified );
base.Text = ComposeNodeText( ); base.Text = ComposeNodeText( );
} }
} }
/// <summary> /// <summary>
/// Property ActionDevice of an Action node /// Property ActionDevice of an Action node
/// </summary> /// </summary>
public Act.ActionDevice ActionDevice public Act.ActionDevice ActionDevice { get => m_actionDevice; set => m_actionDevice = value; }
/// <summary>
/// Return true if the content of Action - Command contains the match string
/// </summary>
/// <param name="match">A string to match</param>
/// <returns>True if the node contains the match</returns>
public bool Contains( string match )
{
string m = match.ToLowerInvariant( );
if ( m_actionText.Contains( m ) || this.Text.ToLowerInvariant().Contains( m ) ) return true;
return false;
}
/// <summary>
/// Return true if the content of Action - Command contains the match string
/// </summary>
/// <param name="match">A string to match</param>
/// <returns>True if the node contains the match</returns>
public bool ContainsCtrl( string match )
{ {
get { return m_actionDevice; } string m = match.ToLowerInvariant( );
set { if ( m_command.Contains( m ) ) return true;
m_actionDevice = value; return false;
}
} }
/// <summary> /// <summary>
@ -326,9 +322,10 @@ namespace SCJMapper_V2.Actions
/// </summary> /// </summary>
/// <param name="match">A string to match</param> /// <param name="match">A string to match</param>
/// <returns>True if the node contains the match</returns> /// <returns>True if the node contains the match</returns>
public bool Contains( string match ) public bool ContainsAction( string match )
{ {
if ( m_actionText.Contains( match ) ) return true; string m = match.ToLowerInvariant( );
if ( m_action.Contains( m ) ) return true;
return false; return false;
} }

Binary file not shown.
Loading…
Cancel
Save