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 6 years ago
parent 158349474b
commit 3c7a628795

Binary file not shown.

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

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

@ -92,6 +92,18 @@ namespace SCJMapper_V2.Devices.Gamepad
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]$";
static Regex rgx_xil = new Regex( xil_pattern, RegexOptions.IgnoreCase );

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

@ -39,7 +39,7 @@ namespace SCJMapper_V2.Devices.Mouse
/// Returns the currently valid color
/// </summary>
/// <returns>A color</returns>
static public System.Drawing.Color MouseColor( )
static public System.Drawing.Color MouseColor()
{
return MyColors.MouseColor;
}
@ -91,6 +91,16 @@ namespace SCJMapper_V2.Devices.Mouse
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>
/// 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 ??)
// try easy: add mo1_ at the beginning
string retVal = input.Replace(" ","");
string retVal = input.Replace( " ", "" );
if ( IsDisabledInput( input ) ) return input;
return "mo1_" + retVal;
@ -146,7 +156,7 @@ namespace SCJMapper_V2.Devices.Mouse
/// <summary>
/// The JS ProductName property
/// </summary>
public override string DevName { get { return m_device.Properties.ProductName; } }
public override string DevName { get { return "Mouse"; } } // no props in directX
/// <summary>
/// The JS Instance GUID for multiple device support (VJoy gets 2 of the same name)
/// </summary>
@ -170,8 +180,7 @@ namespace SCJMapper_V2.Devices.Mouse
private bool Activated_low
{
get { return m_activated; }
set
{
set {
m_activated = value;
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;
}
public void Activate( )
public void Activate()
{
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.
/// </summary>
/// <returns>The last action as CryEngine compatible string</returns>
public override string GetLastChange( )
public override string GetLastChange()
{
// TODO: Expand this out into a joystick class (see commit for details)
Dictionary<string, string> axies = new Dictionary<string, string>( )
@ -246,11 +255,11 @@ namespace SCJMapper_V2.Devices.Mouse
foreach ( KeyValuePair<string, string> entry in axies ) {
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;
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;
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>
/// Collect the current data from the device (DUMMY for Mouse)
/// Collect the current data from the device (using WinForms.Cursor)
/// </summary>
public override void GetCmdData( string cmd, out int data )
{
// Make sure there is a valid device.
data = 0;
System.Drawing.Point cPt = Cursor.Position;
// 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>
/// Collect the current data from the device
/// </summary>
public override void GetData( )
public override void GetData()
{
// Make sure there is a valid device.
if ( null == m_device )

@ -5,6 +5,8 @@ using System.Xml;
using System.Xml.Linq;
using SCJMapper_V2.Actions;
using SCJMapper_V2.Devices.Joystick;
using SCJMapper_V2.Devices.Keyboard;
using SCJMapper_V2.Devices.Mouse;
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_action = ""; // v_pitch
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
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_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_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_option == clone.m_option );
ret &= ( this.m_deviceName == clone.m_deviceName );
@ -106,11 +108,11 @@ namespace SCJMapper_V2.Devices.Options
get { return m_deviceRef; }
set {
m_deviceRef = value;
m_class = "";
m_devClass = "";
m_devInstanceNo = -1;
if ( m_deviceRef == null ) return; // got a null device
m_class = m_deviceRef.DevClass;
m_devClass = m_deviceRef.DevClass;
m_devInstanceNo = m_deviceRef.XmlInstance;
}
}
@ -129,7 +131,7 @@ namespace SCJMapper_V2.Devices.Options
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_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
else {
// get parts
@ -291,7 +303,12 @@ namespace SCJMapper_V2.Devices.Options
if ( DevInstanceNo < 1 ) return ""; // no device to assign it to..
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 );
if ( InvertUsed ) {
@ -334,7 +351,7 @@ namespace SCJMapper_V2.Devices.Options
/// <param name="reader">A prepared XML reader</param>
/// <param name="instance">the Joystick instance number</param>
/// <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" >
@ -345,7 +362,7 @@ namespace SCJMapper_V2.Devices.Options
</nonlinearity_curve>
</flight_move_pitch>
*/
m_class = type;
m_devClass = deviceClass;
m_devInstanceNo = instance;
m_option = option.Name.LocalName;
@ -377,6 +394,8 @@ namespace SCJMapper_V2.Devices.Options
string ptOut = RoundString( (string)point.Attribute( "out" ) );
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
// add 2nd

@ -6,12 +6,15 @@ using System.Xml.Linq;
using SCJMapper_V2.Devices.Joystick;
using SCJMapper_V2.Devices.Gamepad;
using System.Linq;
using SCJMapper_V2.Devices.Mouse;
namespace SCJMapper_V2.Devices.Options
{
/// <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">
/// <!-- Reduce the deadzone -->
/// <option input="x" deadzone="0.015" />
@ -27,8 +30,7 @@ namespace SCJMapper_V2.Devices.Options
public class Deviceoptions : CloneableDictionary<string, DeviceOptionParameter>
{
private static readonly log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod( ).DeclaringType );
#region Static parts
// DevOptions GUI Slider properties - have them in one place only
@ -99,10 +101,7 @@ namespace SCJMapper_V2.Devices.Options
#endregion
private List<string> m_stringOptions = new List<string>( ); // collected options from XML that are not parsed
#region Cloning support
/// <summary>
/// Clone this object
@ -147,8 +146,14 @@ namespace SCJMapper_V2.Devices.Options
}
#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 )
{
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()
{
// 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
{
get { return ( m_stringOptions.Count + base.Count ); }
@ -203,8 +225,7 @@ namespace SCJMapper_V2.Devices.Options
kv.Value.Action = "";
}
}
/// <summary>
/// Rounds a string to 3 decimals (if it is a number..)
/// </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 )
{
try {
@ -252,7 +277,6 @@ namespace SCJMapper_V2.Devices.Options
r += string.Format( "\n" );
}
// dump Tuning
foreach ( KeyValuePair<string, DeviceOptionParameter> kv in this ) {
r += kv.Value.Deviceoptions_toXML( );

@ -13,6 +13,8 @@ using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting;
using SCJMapper_V2.Actions;
using SCJMapper_V2.Devices.Mouse;
using SCJMapper_V2.SC;
namespace SCJMapper_V2.Devices.Options
{
@ -155,7 +157,8 @@ namespace SCJMapper_V2.Devices.Options
UpdateLiveTuning( );
UpdateLiveDevOption( );
}
} catch {
}
catch {
;
}
@ -283,175 +286,53 @@ namespace SCJMapper_V2.Devices.Options
ListViewGroup lvg = null;
ListViewItem lvi;
List<string> devNamesDone = new List<string>( );
string devClass = DeviceCls.DeviceClass;
// first the analog controls for the device
string gpGUID = "";
// scan for DeviceOptions to be added for this device(GUID)
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 ) {
devClass = kv.Value.DevClass;
if ( !devNamesDone.Contains( kv.Value.DevName ) ) {
lvg = new ListViewGroup( "Device Options" ); lview.Groups.Add( lvg );
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 );
UpdateLvDevOptionFromLiveValues( kv.Value );
}
}
// then the functions
lvg = new ListViewGroup( "0", "flight_move " ); lview.Groups.Add( lvg );
{
option = "flight_move_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; lvi.Name = option; lview.Items.Add( lvi ); ListViewItemSetup( lvi );
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 );
}
if ( DeviceCls.IsUndefined(devClass) ) {
// still undefined - solve here
if ( devGUID == DeviceInst.GamepadRef?.DevInstanceGUID )
devClass = GamepadCls.DeviceClass;
else if ( devGUID == DeviceInst.MouseRef?.DevInstanceGUID )
devClass = MouseCls.DeviceClass;
}
lvg = new ListViewGroup( "3", "flight_view" ); lview.Groups.Add( lvg );
{
option = "flight_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 = "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 );
int lvCount = 0;
// then the functions
string group = "";
foreach ( var pOpt in OptionTree.ProfileOptions.Where( x => x.DeviceClass == devClass ) ) {
if ( pOpt.OptGroup != group ) {
group = pOpt.OptGroup;
lvg = new ListViewGroup( lvCount++.ToString( ), SCUiText.Instance.Text( group ) ); lview.Groups.Add( lvg );
}
}
lvg = new ListViewGroup( "4", "Turret_aim" ); lview.Groups.Add( lvg );
{
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 );
option = pOpt.OptName; 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 );
lvi = new ListViewItem( SCUiText.Instance.Text( option ), lvg ) { Name = option };
lvi.Name = option; lview.Items.Add( lvi ); ListViewItemSetup( lvi );
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" );
}
#endregion
public void SetTuningRecord( DeviceTuningParameter tp )
{
}
private void button2_Click( object sender, EventArgs e )
{
; // break
@ -895,7 +776,7 @@ namespace SCJMapper_V2.Devices.Options
}
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 )
lvi.SubItems[LV_Saturation].Text = dp.Saturation; // saturation
else if ( dp.SaturationSupported )
@ -1329,7 +1210,8 @@ namespace SCJMapper_V2.Devices.Options
UpdateGUIFromLiveValues( m_live );
UpdateChartItems( );
} catch {
}
catch {
;
}
log.Debug( "lvOptionTree_SelectedIndexChanged - Exit" );

@ -6,11 +6,15 @@ using System.Xml;
using System.IO;
using System.Xml.Linq;
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
{
/// <summary>
/// Maintains an Options - something like:
/// Maintains Options - something like:
///
/// <options type="joystick" instance="1">
/// <!-- Make all piloting input linear -->
@ -21,7 +25,7 @@ namespace SCJMapper_V2.Devices.Options
/// <flight_move_strafe_longitudinal invert="1" />
/// </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
/// [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
@ -37,11 +41,11 @@ namespace SCJMapper_V2.Devices.Options
// Support only one set of independent options (string storage)
List<string> m_stringOptions = new List<string>( );
#region Clonable support
// bag for all tuning items - key is the option name
CloneableDictionary<string, DeviceTuningParameter> m_tuning = new CloneableDictionary<string, DeviceTuningParameter>( );
/// <summary>
/// Clone this object
/// </summary>
@ -80,41 +84,21 @@ namespace SCJMapper_V2.Devices.Options
return ret;
}
#endregion
// ctor
public OptionTree( DeviceCls device )
{
m_tuning.Add( "flight_move_pitch", new DeviceTuningParameter( "flight_move_pitch", device ) );
m_tuning.Add( "flight_move_yaw", new DeviceTuningParameter( "flight_move_yaw", device ) );
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 ) );
if ( m_profileOptions.Count( ) == 0 ) {
log.Error( "cTor OptionTree - profile not yet read" );
}
m_tuning.Add( "mgv_view_pitch", new DeviceTuningParameter( "mgv_view_pitch", device ) );
m_tuning.Add( "mgv_view_yaw", new DeviceTuningParameter( "mgv_view_yaw", device ) );
// get options for the device class
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 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
/*
* <flight> instance="0/1" sensitivity="n.nn" exponent="n.nn" (instance should be invert)
* <flight_move>
* <flight_move_pitch>
* <flight_move_yaw>
* <flight_move_roll>
* <flight_move_strafe_vertical>
* <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>
*
*
*
*/
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...)
// mouse arrives as type keyboard - fix it to deviceClass mouse here
if ( KeyboardCls.IsDeviceClass( devClass ) )
devClass = MouseCls.DeviceClass;
// check if the profile contains the one we found in the map - then parse the element
foreach ( XElement item in options.Elements( ) ) {
if ( item.Name.LocalName == "flight_move_pitch" ) {
m_tuning["flight_move_pitch"].Options_fromXML( item, type, int.Parse( instance ) );
if ( m_profileOptions.Contains( new ProfileOptionRec( ) { DeviceClass = devClass, OptName = item.Name.LocalName } ) ) {
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 ) );
}
}
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 ) );
return true;
}
#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" ) {
m_tuning["flight_view_pitch"].Options_fromXML( item, type, int.Parse( instance ) );
}
else if ( item.Name.LocalName == "flight_view_yaw" ) {
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 ) );
attr = (string)optiongroupIn.Attribute( "UIShowInvert" );
if ( !string.IsNullOrEmpty( attr ) ) {
if ( int.TryParse( attr, out int showInvert ) ) {
optRec.ShowInvert = ( showInvert == 1 );
}
}
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.Joystick;
using SCJMapper_V2.Devices.Keyboard;
using SCJMapper_V2.Devices.Mouse;
using System;
using System.Collections.Generic;
using System.IO;
@ -11,14 +13,16 @@ using System.Xml.Linq;
namespace SCJMapper_V2.Devices.Options
{
/// <summary>
/// One tuning item - curves, saturation
/// </summary>
public class Tuningoptions : CloneableDictionary<string, OptionTree>, ICloneable
{
private static readonly log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod( ).DeclaringType );
#region Static parts
private static readonly log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod( ).DeclaringType );
private static char ID_Delimiter = '⁞';
private static char ID_Delimiter = '⁞'; // rarely used char to build lists
// Translate toID keys to the proper OptionTree.. (reassing stuff)
// 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
}
else {
else if ( GamepadCls.IsDeviceClass( deviceClass ) ) {
// gamepad
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 "";
}
else {
// gamepad
// gamepad, mouse
return toIDjs;
}
}
@ -108,7 +119,7 @@ namespace SCJMapper_V2.Devices.Options
else return inst;
}
else {
//Gamepad
//Gamepad, mouse
return inst;
}
}
@ -218,6 +229,17 @@ namespace SCJMapper_V2.Devices.Options
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>
@ -341,6 +363,15 @@ namespace SCJMapper_V2.Devices.Options
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;
}

@ -544,7 +544,6 @@
this.tdiAddMod3});
this.cmAddDel.Name = "cmAddDel";
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);
//
// tdiCollapseAll

@ -139,12 +139,36 @@ namespace SCJMapper_V2
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
#region Main Form Handling
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()
{
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>
/// Handle the load event
/// </summary>
@ -210,10 +247,11 @@ namespace SCJMapper_V2
log.Debug( "MainForm_Load - Entry" );
// some applic initialization
// Assign Size property, since databinding to Size doesn't work well.
this.Size = AppSettings.Instance.FormSize;
this.Location = AppSettings.Instance.FormLocation;
// 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.Location = AppSettings.Instance.FormLocation;
}
string version = Application.ProductVersion; // get the version information
// 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 ) ) {
SCUiText.Instance.Language = lang;
}
treeView1.ShowNodeToolTips = AppSettings.Instance.ShowTreeTips;
// load 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
// must take care of Gamepads if there are (but we take care of one only...)
//@@@@@@@
int joyStickIndex = 0; // Joystick List Index
for ( int deviceTabIndex = 0; deviceTabIndex < JoystickCls.JSnum_MAX; deviceTabIndex++ ) {
if ( tc1.TabPages.Count > deviceTabIndex ) {
@ -457,8 +495,6 @@ namespace SCJMapper_V2
m_AT.FilterTree( txFilter.Text );
}
// Helper: collect the joysticks here
struct myDxJoystick
{
@ -472,45 +508,44 @@ namespace SCJMapper_V2
/// <returns></returns>
public bool InitDirectInput()
{
log.Debug( "Entry" );
log.Debug( "InitDirectInput - Entry" );
// Enumerate gamepads in the system.
SharpDX.XInput.UserIndex gpDeviceIndex = SharpDX.XInput.UserIndex.Any;
// Initialize DirectInput
log.Debug( "Instantiate DirectInput" );
log.Debug( " - Instantiate DirectInput" );
var directInput = new DirectInput( );
try {
log.Debug( "Get Keyboard device" );
log.Debug( " - Get Keyboard device" );
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 );
}
catch ( Exception ex ) {
log.Debug( "InitDirectInput phase 1 failed unexpectedly", ex );
log.Debug( " *** InitDirectInput phase 1 failed unexpectedly", ex );
return false;
}
List<myDxJoystick> dxJoysticks = new List<myDxJoystick>( );
SharpDX.XInput.Controller dxGamepad = null;
try {
// 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 ) ) {
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
log.Debug( "Create the device interface" );
log.Debug( " - Create the device interface" );
if ( AppSettings.Instance.DetectGamepad && ( instance.Usage == SharpDX.Multimedia.UsageId.GenericGamepad ) ) {
// 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++ ) {
dxGamepad = new SharpDX.XInput.Controller( i );
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;
break; // get only the first one
}
@ -521,25 +556,24 @@ namespace SCJMapper_V2
myJs.js = new SharpDX.DirectInput.Joystick( directInput, instance.InstanceGuid );
myJs.prodName = instance.ProductName;
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 ) {
log.Debug( "InitDirectInput phase 2 failed unexpectedly", ex );
log.Debug( " *** InitDirectInput phase 2 failed unexpectedly", ex );
return false;
}
int tabs = 0;
// make the GP the first device if there is one.
if ( dxGamepad != null ) {
log.Debug( "Add first Gamepad panel" );
log.Debug( " - Add first Gamepad panel" );
tc1.TabPages[tabs].Text = "Gamepad ";
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;
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.GamepadRef.SetDeviceName( GamepadCls.DevNameCIG ); // this is fixed ...
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;
if ( tabs == 0 ) {
// first panel - The Tab content exists already
log.Debug( "Add first Joystick panel" );
log.Debug( " - Add first Joystick panel" );
uUC_JoyPanelNew = UC_JoyPanel;
}
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)
tc1.TabPages.Add( "" ); // numbering is 1 based for the user
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.Dock = UC_JoyPanel.Dock; uUC_JoyPanelNew.Anchor = UC_JoyPanel.Anchor;
//uUC_JoyPanelNew.AutoScaleMode = UC_JoyPanel.AutoScaleMode; uUC_JoyPanelNew.AutoSize = UC_JoyPanel.AutoSize;
}
// common part
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
DeviceInst.JoystickListRef.Add( js ); // add to joystick list
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
}
log.DebugFormat( "Added {0} GameControl devices", tabs );
log.DebugFormat( " - Added {0} GameControl devices", tabs );
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 );
return false;
}
// load the profile items from the XML
log.Debug( "Init ActionTree" );
log.Debug( " - End of, InitActionTree now" );
InitActionTree( true );
return true;
@ -605,8 +637,7 @@ namespace SCJMapper_V2
#endregion
#region Tree Handling
/// <summary>
/// Grab the rtb data and load them into config
@ -683,30 +714,11 @@ namespace SCJMapper_V2
txRebind.Text = "pp_rebindkeys " + map;
}
#endregion
#region Event Handling
// Form 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( );
}
// *** Timer Events
// polls the devices to get the latest update
private void timer1_Tick( object sender, System.EventArgs e )
@ -715,7 +727,6 @@ namespace SCJMapper_V2
m_modifierTimeout -= timer1.Interval; // decrement timeout
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
string ctrl = "";
@ -758,7 +769,7 @@ namespace SCJMapper_V2
}
// TreeView Events
// *** TreeView Events
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
private void M_AT_NodeSelectedEvent( object sender, ActionTreeEventArgs e )
{
lblAction.Text = e.SelectedAction;
lblAction.Text = SCUiText.Instance.Text( e.SelectedAction );
lblAssigned.Text = e.SelectedCtrl;
}
// Show options
// *** Show options
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 )
{
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 )
@ -811,7 +823,7 @@ namespace SCJMapper_V2
private void btBlend_Click( object sender, EventArgs e )
{
log.Debug( "btBlend_Click" );
if ( m_AT.CanBlendBinding ) {
if ( m_AT.CanDisableBinding ) {
m_AT.DisableBinding( );
UpdateTableSelectedItem( );
if ( m_AT.Dirty ) btDump.BackColor = MyColors.DirtyColor;
@ -822,7 +834,7 @@ namespace SCJMapper_V2
private void btClear_Click( object sender, EventArgs e )
{
log.Debug( "btClear_Click" );
if ( m_AT.CanClearBinding || m_AT.CanBlendBinding ) {
if ( m_AT.CanClearBinding || m_AT.CanDisableBinding ) {
m_AT.ClearBinding( );
UpdateTableSelectedItem( );
if ( m_AT.Dirty ) btDump.BackColor = MyColors.DirtyColor;
@ -830,7 +842,7 @@ namespace SCJMapper_V2
else MySounds.PlayCannot( );
}
// General Area Items
// *** General Area Items
private void btDump_Click( object sender, EventArgs e )
{
@ -857,7 +869,7 @@ namespace SCJMapper_V2
AppSettings.Instance.AutoTabXML = cbxAutoTabXML.Checked; AppSettings.Instance.Save( );
}
// Toolstrip Items
// *** Toolstrip Items
private void meResetDefaults_Click( object sender, EventArgs e )
{
@ -906,7 +918,7 @@ namespace SCJMapper_V2
Dump( );
}
// Dialogs
// *** Dialogs
// Show the Table Window
private void meShowToggleTable_Click( object sender, EventArgs e )
@ -924,11 +936,9 @@ namespace SCJMapper_V2
AppSettings.Instance.FormTableLocation = FTAB.LastLocation;
AppSettings.Instance.FormTableColumnWidth = FTAB.LastColSize;
FTAB.Hide( );
}
else {
FTAB.Show( );
if ( created ) {
FTAB.Size = AppSettings.Instance.FormTableSize;
FTAB.Location = AppSettings.Instance.FormTableLocation;
@ -946,14 +956,20 @@ namespace SCJMapper_V2
FormOptions OPT = new FormOptions( );
// Have to attach here to capture the currently valid settings
UpdateTuningItems( );
UpdateMoreOptionItems( );
// cleanup - Actions will be assigned new in below calls
m_AT.ActionMaps.DeviceOptions.ResetDynamicItems( );
m_AT.ActionMaps.TuningOptions.ResetDynamicItems( );
UpdateAllTuningItems( JoystickCls.DeviceClass );
UpdateAllTuningItems( GamepadCls.DeviceClass );
UpdateAllTuningItems( MouseCls.DeviceClass );
DeviceList devlist = new DeviceList( );
if ( AppSettings.Instance.DetectGamepad && ( DeviceInst.GamepadRef != null ) ) {
devlist.Add( DeviceInst.GamepadRef );
}
devlist.AddRange( DeviceInst.JoystickListRef );
devlist.Add( DeviceInst.MouseRef );
OPT.TuningOptions = m_AT.ActionMaps.TuningOptions;
OPT.DeviceOptions = m_AT.ActionMaps.DeviceOptions;
@ -976,7 +992,12 @@ namespace SCJMapper_V2
JSCAL = new OGL.FormJSCalCurve( );
// 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( );
// run
JSCAL.TuningOptions = m_AT.ActionMaps.TuningOptions;
JSCAL.ShowDialog( this );
@ -989,7 +1010,8 @@ namespace SCJMapper_V2
}
// Settings
// *** Settings
private void meSettingsDialog_Click( object sender, EventArgs e )
{
// 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 ) ) {
SCUiText.Instance.Language = lang;
}
treeView1.ShowNodeToolTips = AppSettings.Instance.ShowTreeTips;
// now update the contents according to new settings
foreach ( JoystickCls j in DeviceInst.JoystickListRef ) j.ApplySettings( ); // update Seetings
m_AT.IgnoreMaps = AppSettings.Instance.IgnoreActionmaps;
@ -1011,7 +1035,6 @@ namespace SCJMapper_V2
InitActionTree( false );
UpdateTable( );
}
timer1.Enabled = true;
}
@ -1048,7 +1071,7 @@ namespace SCJMapper_V2
timer1.Enabled = true;
}
// Load maps
// *** Load maps
private void msSelectMapping_DropDownItemClicked( object sender, ToolStripItemClickedEventArgs e )
{
@ -1106,31 +1129,7 @@ namespace SCJMapper_V2
}
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
// *** Context Menu Items
// RTB Menu
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 );
@ -1193,13 +1192,12 @@ namespace SCJMapper_V2
tdiAssignBinding.Text = "Assign: " + JoystickCls.MakeThrottle( lblLastJ.Text, cbxThrottle.Checked );
}
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
tdiAddBinding.Visible = m_AT.CanAddBinding; any3 = any3 || m_AT.CanAddBinding; // Add
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
// there is no further decision on can or cannot - any(2) is enough to know
tdiCbxActivation.Visible = false;
@ -1225,11 +1223,6 @@ namespace SCJMapper_V2
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
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 );
}
// XML load and save
// *** XML load and save
private void btSaveMyMapping_Click( object sender, EventArgs e )
{
bool cancel = false;
@ -1379,7 +1372,7 @@ namespace SCJMapper_V2
}
}
// Hyperlink
// *** Hyperlink
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 )
{
@ -1407,145 +1400,125 @@ namespace SCJMapper_V2
/// <summary>
/// Updates Gamedevice, Nodetext for one Tuning (Option) item from current assignment
/// </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="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;
DeviceCls dev = null;
string find = "";
// 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
}
}
}
string match = "";
string nodeText = "";
if ( dev == null ) {
// nothing found? find action item for GPads
find = ActionTreeNode.ComposeNodeActionText( action, "xi" );
nodeText = m_AT.FindText( actionmap, find );
if ( !string.IsNullOrWhiteSpace( nodeText ) ) {
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
}
}
}
if ( JoystickCls.IsDeviceClass( deviceClass ) ) {
match = ActionTreeNode.ComposeNodeActionText( action, "js" );
}
else if ( GamepadCls.IsDeviceClass( deviceClass ) ) {
match = ActionTreeNode.ComposeNodeActionText( action, "xi" );
}
// dev might be null here if no device for the action was found
// tuning might be null here if no tuningitem for the device action was found (which should not happen !!)
if ( ( dev != null ) && ( tuning == null ) ) {
log.ErrorFormat( "UpdateOptionItem - Tuning item for device not found - dev: {0} - option: {1}", dev.DevName, optionName );
return; // ERROR EXIT
else if ( MouseCls.IsDeviceClass( deviceClass ) ) {
match = ActionTreeNode.ComposeNodeActionText( action + "_mouse", "mo" ); // CIG cannot decide on terminology rules at all...
}
if ( dev != null ) {
// having a device and a tuning item here
// JS commands that are supported
if ( nodeText.ToLowerInvariant( ).EndsWith( "_x" ) || nodeText.ToLowerInvariant( ).EndsWith( "_rotx" ) || nodeText.ToLowerInvariant( ).EndsWith( "_throttlex" )
|| nodeText.ToLowerInvariant( ).EndsWith( "_y" ) || nodeText.ToLowerInvariant( ).EndsWith( "_roty" ) || nodeText.ToLowerInvariant( ).EndsWith( "_throttley" )
|| nodeText.ToLowerInvariant( ).EndsWith( "_Z" ) || nodeText.ToLowerInvariant( ).EndsWith( "_rotz" ) || nodeText.ToLowerInvariant( ).EndsWith( "_throttlez" )
|| nodeText.ToLowerInvariant( ).EndsWith( "_slider1" ) || nodeText.ToLowerInvariant( ).EndsWith( "_slider2" ) ) {
// update dynamic properties
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 );
}
}
// 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 );
}
}
nodeText = m_AT.FindText( actionmap, match ); // returns "" or a complete text ("action - command")
// check for exit states
if ( string.IsNullOrWhiteSpace( nodeText ) ) return false; // EXIT - no node assigned
if ( Act.IsDisabledInput( ActionTreeNode.CommandFromActionText( nodeText ) ) ) return false; // EXIT disabled item
// find the device for the action if it is an axis (analog command)
string command = ActionTreeNode.CommandFromActionText( nodeText );
if ( JoystickCls.IsAxisCommand( command ) ) {
dev = DeviceInst.JoystickListRef.Find_jsN( JoystickCls.JSNum( command ) );
}
else if ( tuning != null && tuning.DevInstanceNo > 0 ) {
// a device was assigned but the action is not mapped
// try to find the gamedevice here ??
if ( JoystickCls.IsDeviceClass( tuning.DeviceClass ) ) {
tuning.AssignDynamicItems( DeviceInst.JoystickListRef.Find_jsN( tuning.DevInstanceNo ), null, "" );
else if ( GamepadCls.IsAxisCommand( command ) ) {
dev = DeviceInst.GamepadRef;
}
else if ( MouseCls.IsAxisCommand( command ) ) {
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 ) ) {
tuning.AssignDynamicItems( DeviceInst.GamepadRef, null, "" );
else {
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>
/// Get the assigned controls for some commands used in Tuning Yaw,Pitch,Roll and the Strafe ones
/// Connect deviceOption if known
/// </summary>
private void UpdateTuningItems()
{
// cleanup - Actions will be assigned new in below calls
m_AT.ActionMaps.DeviceOptions.ResetDynamicItems( );
m_AT.ActionMaps.TuningOptions.ResetDynamicItems( );
// 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" );
UpdateTuningPrioritized( "flight_move_pitch", "v_pitch", "spaceship_movement" );
UpdateTuningPrioritized( "flight_move_yaw", "v_yaw", "spaceship_movement" );
UpdateTuningPrioritized( "flight_move_roll", "v_roll", "spaceship_movement" );
UpdateOptionItem( "flight_move_strafe_vertical", "v_strafe_vertical", "spaceship_movement" );
UpdateOptionItem( "flight_move_strafe_lateral", "v_strafe_lateral", "spaceship_movement" );
UpdateOptionItem( "flight_move_strafe_longitudinal", "v_strafe_longitudinal", "spaceship_movement" );
UpdateTuningPrioritized( "flight_move_strafe_vertical", "v_strafe_vertical", "spaceship_movement" );
UpdateTuningPrioritized( "flight_move_strafe_lateral", "v_strafe_lateral", "spaceship_movement" );
UpdateTuningPrioritized( "flight_move_strafe_longitudinal", "v_strafe_longitudinal", "spaceship_movement" );
}
/// <summary>
/// Get the assigned controls for other Options - if available...
/// </summary>
private void UpdateMoreOptionItems()
private void UpdateAllTuningItems( string deviceClass )
{
// get current mapping from ActionMaps
UpdateOptionItem( "flight_throttle_abs", "v_throttle_abs", "spaceship_movement" );
UpdateOptionItem( "flight_throttle_rel", "v_throttle_rel", "spaceship_movement" );
UpdateTuningForDevice( deviceClass, "flight_move_pitch", "v_pitch", "spaceship_movement" );
UpdateTuningForDevice( deviceClass, "flight_move_yaw", "v_yaw", "spaceship_movement" );
UpdateTuningForDevice( deviceClass, "flight_move_roll", "v_roll", "spaceship_movement" );
UpdateOptionItem( "flight_aim_pitch", "v_aim_pitch", "spaceship_targeting" );
UpdateOptionItem( "flight_aim_yaw", "v_aim_yaw", "spaceship_targeting" );
UpdateTuningForDevice( deviceClass, "flight_move_strafe_vertical", "v_strafe_vertical", "spaceship_movement" );
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" );
UpdateOptionItem( "flight_view_yaw", "v_view_yaw", "spaceship_view" );
UpdateTuningForDevice( deviceClass, "flight_view_pitch", "v_view_pitch", "spaceship_view" );
UpdateTuningForDevice( deviceClass, "flight_view_yaw", "v_view_yaw", "spaceship_view" );
UpdateOptionItem( "turret_aim_pitch", "v_aim_pitch", "spaceship_turret" );
UpdateOptionItem( "turret_aim_yaw", "v_aim_yaw", "spaceship_turret" );
}
UpdateTuningForDevice( deviceClass, "flight_throttle_abs", "v_throttle_abs", "spaceship_movement" );
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_mouseIn = false;
@ -1644,7 +1617,7 @@ namespace SCJMapper_V2
}
}
// Mouse Input
// *** Mouse Input
private void cmMouseEntry_Opening( object sender, CancelEventArgs e )
{
@ -1702,6 +1675,7 @@ namespace SCJMapper_V2
#endregion
#region DataTable Handling
// Called when the table must be rebuild
private void UpdateTable()
@ -1722,7 +1696,6 @@ namespace SCJMapper_V2
if ( ( FTAB != null ) && FTAB.Visible ) {
string actionID = m_AT.SelectedActionID;
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
private void FTAB_EditActionEvent( object sender, EditRowEventArgs e )
{
m_AT.FindAndSelectActionKey( e.Actionmap, e.Actionkey, e.Nodeindex );
}
#endregion
}
}

@ -128,7 +128,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAA8
EAAAAk1TRnQBSQFMAgEBCQEAAVgBEgFYARIBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
EAAAAk1TRnQBSQFMAgEBCQEAAXABEgFwARIBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAATADAAEBAQABCAYAAQwYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@ -207,78 +207,6 @@
<value>652, 17</value>
</metadata>
<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">
<value>
/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">
<value>421, 17</value>
</metadata>
<data name="btSaveMyMapping.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
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
</value>
</data>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>555, 17</value>
</metadata>
@ -582,7 +582,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADc
GQAAAk1TRnQBSQFMAgEBAwEAARgBAAEYAQABMAEAATABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
GQAAAk1TRnQBSQFMAgEBAwEAATABAAEwAQABMAEAATABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABwAMAATADAAEBAQABCAYAASQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

@ -71,6 +71,7 @@
this.cbxCSVListing = new System.Windows.Forms.CheckBox();
this.cbxPTU = new System.Windows.Forms.CheckBox();
this.cbxDetectGamepad = new System.Windows.Forms.CheckBox();
this.cbxTreeTips = new System.Windows.Forms.CheckBox();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
@ -427,6 +428,7 @@
//
// groupBox4
//
this.groupBox4.Controls.Add(this.cbxTreeTips);
this.groupBox4.Controls.Add(this.label14);
this.groupBox4.Controls.Add(this.comboLanguage);
this.groupBox4.Controls.Add(this.cbxAutoTabXML);
@ -445,7 +447,7 @@
// label14
//
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.Size = new System.Drawing.Size(62, 13);
this.label14.TabIndex = 12;
@ -454,7 +456,7 @@
// comboLanguage
//
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.Size = new System.Drawing.Size(100, 21);
this.comboLanguage.TabIndex = 11;
@ -494,7 +496,7 @@
//
this.cbxPTU.AutoSize = true;
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.Size = new System.Drawing.Size(108, 17);
this.cbxPTU.TabIndex = 7;
@ -512,6 +514,16 @@
this.cbxDetectGamepad.Text = "Use Gamepad";
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
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
@ -590,5 +602,6 @@
private System.Windows.Forms.CheckBox cbxAutoTabXML;
private System.Windows.Forms.Label label14;
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
/// </summary>
/// <param name="owner"></param>
public FormSettings( )
public FormSettings()
{
InitializeComponent( );
}
@ -35,14 +35,14 @@ namespace SCJMapper_V2
}
comboLanguage.Items.Clear( );
comboLanguage.Items.AddRange( SC.SCUiText.Instance.LanguagesS.ToArray() );
comboLanguage.Items.AddRange( SC.SCUiText.Instance.LanguagesS.ToArray( ) );
LoadSettings( );
}
// Save from app settings into actuals
private void LoadSettings( )
private void LoadSettings()
{
// SC path
txSCPath.Text = AppSettings.Instance.UserSCPath;
@ -66,7 +66,8 @@ namespace SCJMapper_V2
for ( int i = 0; i < chkLbActionMaps.Items.Count; i++ ) {
if ( AppSettings.Instance.IgnoreActionmaps.Contains( "," + chkLbActionMaps.Items[i].ToString( ) + "," ) ) {
chkLbActionMaps.SetItemChecked( i, true );
} else {
}
else {
chkLbActionMaps.SetItemChecked( i, false ); // 20161223: fix checked items and Canceled
}
}
@ -87,11 +88,12 @@ namespace SCJMapper_V2
// Language
comboLanguage.SelectedItem = AppSettings.Instance.UseLanguage;
cbxTreeTips.Checked = AppSettings.Instance.ShowTreeTips;
}
// Save the current settings
private void SaveSettings( )
private void SaveSettings()
{
// SC path
AppSettings.Instance.UserSCPath = txSCPath.Text;
@ -134,13 +136,14 @@ namespace SCJMapper_V2
// AutoTabXML
AppSettings.Instance.AutoTabXML = cbxAutoTabXML.Checked;
// Use CSV Listing
AppSettings.Instance.UseCSVListing = cbxCSVListing.Checked;
AppSettings.Instance.ListModifiers = cbxListModifiers.Checked;
// Language
AppSettings.Instance.UseLanguage = (string)comboLanguage.SelectedItem;
AppSettings.Instance.ShowTreeTips = cbxTreeTips.Checked;
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:
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
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
V 2.34 - BETA Build 68
- 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.Mouse;
using SCJMapper_V2.Devices.Gamepad;
using SCJMapper_V2.Devices.Options;
namespace SCJMapper_V2.SC
{
@ -218,6 +219,7 @@ namespace SCJMapper_V2.SC
string uiLabel = (string)action.Attribute( "UILabel" );
if ( string.IsNullOrEmpty( uiLabel ) )
uiLabel = name; // subst if not found in Action node
SCUiText.Instance.Add( name, uiLabel ); // Register item for translation
// prep all kinds
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" );
if ( string.IsNullOrEmpty( uiLabel ) )
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; } );
if ( !string.IsNullOrEmpty( item ) ) {
@ -354,6 +357,7 @@ namespace SCJMapper_V2.SC
return true;
}
/// <summary>
/// Read the defaultProfile.xml - do some sanity check
/// </summary>
@ -400,6 +404,14 @@ namespace SCJMapper_V2.SC
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( )
where ( x.Name == "actionmap" )
select x;

@ -27,8 +27,9 @@ namespace SCJMapper_V2.SC
new SCLocale( Languages.french.ToString( ) ),
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>
/// Set the language to be used
/// </summary>
@ -83,6 +84,34 @@ namespace SCJMapper_V2.SC
}// 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>
/// Returns the content from the UILabel in the set Language
/// </summary>

@ -238,7 +238,6 @@
</Compile>
<Compile Include="Devices\Options\OptionTree.cs" />
<Compile Include="OGL\LoaderDDS.cs" />
<Compile Include="Devices\Options\OptionsInvert.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.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;
[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() {
this.BeginInit();
this.InitClass();
@ -44,7 +44,7 @@ namespace SCJMapper_V2.Table {
}
[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) :
base(info, context, false) {
if ((this.IsBinarySerialized(info, context) == true)) {
@ -83,7 +83,7 @@ namespace SCJMapper_V2.Table {
}
[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.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
public T_ActionMapDataTable T_ActionMap {
@ -93,7 +93,7 @@ namespace SCJMapper_V2.Table {
}
[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.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
public T_ActionDataTable T_Action {
@ -103,7 +103,7 @@ namespace SCJMapper_V2.Table {
}
[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.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]
public override global::System.Data.SchemaSerializationMode SchemaSerializationMode {
@ -116,7 +116,7 @@ namespace SCJMapper_V2.Table {
}
[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)]
public new global::System.Data.DataTableCollection Tables {
get {
@ -125,7 +125,7 @@ namespace SCJMapper_V2.Table {
}
[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)]
public new global::System.Data.DataRelationCollection Relations {
get {
@ -134,7 +134,7 @@ namespace SCJMapper_V2.Table {
}
[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() {
this.BeginInit();
this.InitClass();
@ -142,7 +142,7 @@ namespace SCJMapper_V2.Table {
}
[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() {
DS_ActionMaps cln = ((DS_ActionMaps)(base.Clone()));
cln.InitVars();
@ -151,19 +151,19 @@ namespace SCJMapper_V2.Table {
}
[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() {
return false;
}
[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() {
return false;
}
[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) {
if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
this.Reset();
@ -191,7 +191,7 @@ namespace SCJMapper_V2.Table {
}
[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() {
global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream();
this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null));
@ -200,13 +200,13 @@ namespace SCJMapper_V2.Table {
}
[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() {
this.InitVars(true);
}
[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) {
this.tableT_ActionMap = ((T_ActionMapDataTable)(base.Tables["T_ActionMap"]));
if ((initTable == true)) {
@ -224,7 +224,7 @@ namespace SCJMapper_V2.Table {
}
[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() {
this.DataSetName = "DS_ActionMaps";
this.Prefix = "";
@ -242,19 +242,19 @@ namespace SCJMapper_V2.Table {
}
[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() {
return false;
}
[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() {
return false;
}
[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) {
if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) {
this.InitVars();
@ -262,7 +262,7 @@ namespace SCJMapper_V2.Table {
}
[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) {
DS_ActionMaps ds = new DS_ActionMaps();
global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
@ -308,10 +308,10 @@ namespace SCJMapper_V2.Table {
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);
[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);
/// <summary>
@ -324,7 +324,7 @@ namespace SCJMapper_V2.Table {
private global::System.Data.DataColumn columnID_ActionMap;
[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() {
this.TableName = "T_ActionMap";
this.BeginInit();
@ -333,7 +333,7 @@ namespace SCJMapper_V2.Table {
}
[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) {
this.TableName = table.TableName;
if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
@ -350,14 +350,14 @@ namespace SCJMapper_V2.Table {
}
[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) :
base(info, context) {
this.InitVars();
}
[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 {
get {
return this.columnID_ActionMap;
@ -365,7 +365,7 @@ namespace SCJMapper_V2.Table {
}
[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)]
public int Count {
get {
@ -374,33 +374,33 @@ namespace SCJMapper_V2.Table {
}
[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] {
get {
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;
[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;
[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;
[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;
[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) {
this.Rows.Add(row);
}
[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) {
T_ActionMapRow rowT_ActionMapRow = ((T_ActionMapRow)(this.NewRow()));
object[] columnValuesArray = new object[] {
@ -411,14 +411,14 @@ namespace SCJMapper_V2.Table {
}
[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) {
return ((T_ActionMapRow)(this.Rows.Find(new object[] {
ID_ActionMap})));
}
[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() {
T_ActionMapDataTable cln = ((T_ActionMapDataTable)(base.Clone()));
cln.InitVars();
@ -426,19 +426,19 @@ namespace SCJMapper_V2.Table {
}
[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() {
return new T_ActionMapDataTable();
}
[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() {
this.columnID_ActionMap = base.Columns["ID_ActionMap"];
}
[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() {
this.columnID_ActionMap = new global::System.Data.DataColumn("ID_ActionMap", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnID_ActionMap);
@ -451,25 +451,25 @@ namespace SCJMapper_V2.Table {
}
[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() {
return ((T_ActionMapRow)(this.NewRow()));
}
[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) {
return new T_ActionMapRow(builder);
}
[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() {
return typeof(T_ActionMapRow);
}
[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) {
base.OnRowChanged(e);
if ((this.T_ActionMapRowChanged != null)) {
@ -478,7 +478,7 @@ namespace SCJMapper_V2.Table {
}
[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) {
base.OnRowChanging(e);
if ((this.T_ActionMapRowChanging != null)) {
@ -487,7 +487,7 @@ namespace SCJMapper_V2.Table {
}
[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) {
base.OnRowDeleted(e);
if ((this.T_ActionMapRowDeleted != null)) {
@ -496,7 +496,7 @@ namespace SCJMapper_V2.Table {
}
[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) {
base.OnRowDeleting(e);
if ((this.T_ActionMapRowDeleting != null)) {
@ -505,13 +505,13 @@ namespace SCJMapper_V2.Table {
}
[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) {
this.Rows.Remove(row);
}
[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) {
global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
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 columnActionText;
private global::System.Data.DataColumn columnActionName;
private global::System.Data.DataColumn columnDevice;
@ -602,7 +604,7 @@ namespace SCJMapper_V2.Table {
private global::System.Data.DataColumn columnDisabled;
[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() {
this.TableName = "T_Action";
this.BeginInit();
@ -611,7 +613,7 @@ namespace SCJMapper_V2.Table {
}
[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) {
this.TableName = table.TableName;
if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
@ -628,14 +630,14 @@ namespace SCJMapper_V2.Table {
}
[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) :
base(info, context) {
this.InitVars();
}
[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 {
get {
return this.columnID_Action;
@ -643,7 +645,7 @@ namespace SCJMapper_V2.Table {
}
[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 {
get {
return this.columnREF_ActionMap;
@ -651,7 +653,15 @@ namespace SCJMapper_V2.Table {
}
[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 {
get {
return this.columnActionName;
@ -659,7 +669,7 @@ namespace SCJMapper_V2.Table {
}
[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 {
get {
return this.columnDevice;
@ -667,7 +677,7 @@ namespace SCJMapper_V2.Table {
}
[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 {
get {
return this.columnDef_Binding;
@ -675,7 +685,7 @@ namespace SCJMapper_V2.Table {
}
[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 {
get {
return this.columnDef_Modifier;
@ -683,7 +693,7 @@ namespace SCJMapper_V2.Table {
}
[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 {
get {
return this.columnAddBind;
@ -691,7 +701,7 @@ namespace SCJMapper_V2.Table {
}
[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 {
get {
return this.columnUsr_Binding;
@ -699,7 +709,7 @@ namespace SCJMapper_V2.Table {
}
[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 {
get {
return this.columnUsr_Modifier;
@ -707,7 +717,7 @@ namespace SCJMapper_V2.Table {
}
[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 {
get {
return this.columnDisabled;
@ -715,7 +725,7 @@ namespace SCJMapper_V2.Table {
}
[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)]
public int Count {
get {
@ -724,38 +734,39 @@ namespace SCJMapper_V2.Table {
}
[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] {
get {
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;
[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;
[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;
[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;
[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) {
this.Rows.Add(row);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.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) {
[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 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()));
object[] columnValuesArray = new object[] {
ID_Action,
null,
ActionText,
ActionName,
Device,
Def_Binding,
@ -773,14 +784,14 @@ namespace SCJMapper_V2.Table {
}
[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) {
return ((T_ActionRow)(this.Rows.Find(new object[] {
ID_Action})));
}
[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() {
T_ActionDataTable cln = ((T_ActionDataTable)(base.Clone()));
cln.InitVars();
@ -788,16 +799,17 @@ namespace SCJMapper_V2.Table {
}
[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() {
return new T_ActionDataTable();
}
[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() {
this.columnID_Action = base.Columns["ID_Action"];
this.columnREF_ActionMap = base.Columns["REF_ActionMap"];
this.columnActionText = base.Columns["ActionText"];
this.columnActionName = base.Columns["ActionName"];
this.columnDevice = base.Columns["Device"];
this.columnDef_Binding = base.Columns["Def_Binding"];
@ -809,12 +821,14 @@ namespace SCJMapper_V2.Table {
}
[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() {
this.columnID_Action = new global::System.Data.DataColumn("ID_Action", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnID_Action);
this.columnREF_ActionMap = new global::System.Data.DataColumn("REF_ActionMap", typeof(string), null, global::System.Data.MappingType.Element);
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);
base.Columns.Add(this.columnActionName);
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.Caption = "ActionMap";
this.columnREF_ActionMap.DefaultValue = ((string)("\"\""));
this.columnActionText.AllowDBNull = false;
this.columnActionText.ReadOnly = true;
this.columnActionText.DefaultValue = ((string)("\"\""));
this.columnActionName.AllowDBNull = false;
this.columnActionName.ReadOnly = true;
this.columnActionName.DefaultValue = ((string)("\"\""));
@ -859,25 +876,25 @@ namespace SCJMapper_V2.Table {
}
[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() {
return ((T_ActionRow)(this.NewRow()));
}
[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) {
return new T_ActionRow(builder);
}
[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() {
return typeof(T_ActionRow);
}
[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) {
base.OnRowChanged(e);
if ((this.T_ActionRowChanged != null)) {
@ -886,7 +903,7 @@ namespace SCJMapper_V2.Table {
}
[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) {
base.OnRowChanging(e);
if ((this.T_ActionRowChanging != null)) {
@ -895,7 +912,7 @@ namespace SCJMapper_V2.Table {
}
[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) {
base.OnRowDeleted(e);
if ((this.T_ActionRowDeleted != null)) {
@ -904,7 +921,7 @@ namespace SCJMapper_V2.Table {
}
[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) {
base.OnRowDeleting(e);
if ((this.T_ActionRowDeleting != null)) {
@ -913,13 +930,13 @@ namespace SCJMapper_V2.Table {
}
[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) {
this.Rows.Remove(row);
}
[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) {
global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
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;
[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) :
base(rb) {
this.tableT_ActionMap = ((T_ActionMapDataTable)(this.Table));
}
[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 {
get {
return ((string)(this[this.tableT_ActionMap.ID_ActionMapColumn]));
@ -1008,7 +1025,7 @@ namespace SCJMapper_V2.Table {
}
[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() {
if ((this.Table.ChildRelations["T_ActionMap_T_Action"] == null)) {
return new T_ActionRow[0];
@ -1027,14 +1044,14 @@ namespace SCJMapper_V2.Table {
private T_ActionDataTable tableT_Action;
[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) :
base(rb) {
this.tableT_Action = ((T_ActionDataTable)(this.Table));
}
[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 {
get {
return ((string)(this[this.tableT_Action.ID_ActionColumn]));
@ -1045,7 +1062,7 @@ namespace SCJMapper_V2.Table {
}
[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 {
get {
return ((string)(this[this.tableT_Action.REF_ActionMapColumn]));
@ -1056,7 +1073,18 @@ namespace SCJMapper_V2.Table {
}
[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 {
get {
return ((string)(this[this.tableT_Action.ActionNameColumn]));
@ -1067,7 +1095,7 @@ namespace SCJMapper_V2.Table {
}
[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 {
get {
try {
@ -1083,7 +1111,7 @@ namespace SCJMapper_V2.Table {
}
[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 {
get {
try {
@ -1099,7 +1127,7 @@ namespace SCJMapper_V2.Table {
}
[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 {
get {
try {
@ -1115,7 +1143,7 @@ namespace SCJMapper_V2.Table {
}
[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 {
get {
try {
@ -1131,7 +1159,7 @@ namespace SCJMapper_V2.Table {
}
[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 {
get {
try {
@ -1147,7 +1175,7 @@ namespace SCJMapper_V2.Table {
}
[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 {
get {
try {
@ -1163,7 +1191,7 @@ namespace SCJMapper_V2.Table {
}
[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 {
get {
return ((bool)(this[this.tableT_Action.DisabledColumn]));
@ -1174,7 +1202,7 @@ namespace SCJMapper_V2.Table {
}
[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 {
get {
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.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() {
return this.IsNull(this.tableT_Action.DeviceColumn);
}
[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() {
this[this.tableT_Action.DeviceColumn] = global::System.Convert.DBNull;
}
[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() {
return this.IsNull(this.tableT_Action.Def_BindingColumn);
}
[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() {
this[this.tableT_Action.Def_BindingColumn] = global::System.Convert.DBNull;
}
[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() {
return this.IsNull(this.tableT_Action.Def_ModifierColumn);
}
[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() {
this[this.tableT_Action.Def_ModifierColumn] = global::System.Convert.DBNull;
}
[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() {
return this.IsNull(this.tableT_Action.AddBindColumn);
}
[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() {
this[this.tableT_Action.AddBindColumn] = global::System.Convert.DBNull;
}
[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() {
return this.IsNull(this.tableT_Action.Usr_BindingColumn);
}
[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() {
this[this.tableT_Action.Usr_BindingColumn] = global::System.Convert.DBNull;
}
[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() {
return this.IsNull(this.tableT_Action.Usr_ModifierColumn);
}
[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() {
this[this.tableT_Action.Usr_ModifierColumn] = global::System.Convert.DBNull;
}
@ -1260,7 +1288,7 @@ namespace SCJMapper_V2.Table {
/// <summary>
///Row event argument class
///</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 {
private T_ActionMapRow eventRow;
@ -1268,14 +1296,14 @@ namespace SCJMapper_V2.Table {
private global::System.Data.DataRowAction eventAction;
[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) {
this.eventRow = row;
this.eventAction = action;
}
[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 {
get {
return this.eventRow;
@ -1283,7 +1311,7 @@ namespace SCJMapper_V2.Table {
}
[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 {
get {
return this.eventAction;
@ -1294,7 +1322,7 @@ namespace SCJMapper_V2.Table {
/// <summary>
///Row event argument class
///</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 {
private T_ActionRow eventRow;
@ -1302,14 +1330,14 @@ namespace SCJMapper_V2.Table {
private global::System.Data.DataRowAction eventAction;
[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) {
this.eventRow = row;
this.eventAction = action;
}
[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 {
get {
return this.eventRow;
@ -1317,7 +1345,7 @@ namespace SCJMapper_V2.Table {
}
[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 {
get {
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:complexType>
<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: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:sequence>
</xs:complexType>
</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: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="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="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" />
@ -48,7 +49,7 @@
</xs:element>
<xs:annotation>
<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:annotation>
</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">
<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_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>
<Connectors>
<Connector ID="DesignRelation:T_ActionMap_T_Action" ZOrder="2" LineWidth="11">
@ -18,11 +18,11 @@
</Point>
<Point>
<X>494</X>
<Y>287</Y>
<Y>300</Y>
</Point>
<Point>
<X>627</X>
<Y>287</Y>
<Y>300</Y>
</Point>
</RoutePoints>
</Connector>

@ -13,7 +13,7 @@ namespace SCJMapper_V2.Table
{
public partial class FormTable : Form
{
public FormTable( )
public FormTable()
{
InitializeComponent( );
@ -31,6 +31,7 @@ namespace SCJMapper_V2.Table
btUpdateFromEdit.Enabled = chkEditBlend.Checked;
DGV.Columns["Usr_Binding"].ReadOnly = true;
DGV.Columns["Usr_Modifier"].ReadOnly = true;
DGV.Columns["ActionName"].Visible = false;
DGV.ReadOnly = !chkEditBlend.Checked;
}
@ -45,7 +46,7 @@ namespace SCJMapper_V2.Table
}
public event EventHandler<UpdateEditEventArgs> UpdateEditEvent;
private void RaiseUpdateEditEvent( )
private void RaiseUpdateEditEvent()
{
if ( UpdateEditEvent != null ) {
UpdateEditEvent( this, new UpdateEditEventArgs( ) );
@ -57,7 +58,7 @@ namespace SCJMapper_V2.Table
public Point LastLocation { get; set; }
public string LastColSize { get; set; }
private BindingSource m_bSrc = new BindingSource();
private BindingSource m_bSrc = new BindingSource( );
/// <summary>
/// Assign or retrieve the underlying DataSet
@ -65,8 +66,8 @@ namespace SCJMapper_V2.Table
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
}
@ -80,12 +81,12 @@ namespace SCJMapper_V2.Table
/// <summary>
/// Populate the view from the dataset
/// </summary>
public void Populate( )
public void Populate()
{
// DGV.SuspendLayout( );
// DGV.SuspendLayout( );
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++ ) {
if ( i < DGV.Columns.Count )
DGV.Columns[i].Width = int.Parse( e[i] );
@ -93,7 +94,7 @@ namespace SCJMapper_V2.Table
}
DGV.AllowUserToResizeColumns = true;
ComposeFilter( );
// DGV.ResumeLayout( );
// DGV.ResumeLayout( );
}
/// <summary>
@ -114,11 +115,11 @@ namespace SCJMapper_V2.Table
/// <param name="rowIndex"></param>
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
string actionMap = DS_ActionMap.ActionMap(id);
string actionKey = DS_ActionMap.ActionKey(id);
int nodeIndex = DS_ActionMap.ActionCommandIndex(id);
string actionMap = DS_ActionMap.ActionMap( id );
string actionKey = DS_ActionMap.ActionKey( id );
int nodeIndex = DS_ActionMap.ActionCommandIndex( id );
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 '*'
string filter = "";
if ( ! string.IsNullOrEmpty( txFilterAction.Text)) {
if ( !string.IsNullOrEmpty( txFilterAction.Text ) ) {
filter += string.Format( "(ActionName LIKE '*{0}*')", txFilterAction.Text );
}
if ( !string.IsNullOrEmpty( txFilterDefBinding.Text ) ) {
@ -146,7 +147,8 @@ namespace SCJMapper_V2.Table
string deviceFilter = "";
if ( ( chkJoystick.Checked == false ) && ( chkGamepad.Checked == false ) && ( chkMouse.Checked == false ) && ( chkKbd.Checked == false ) ) {
// none checked means all
} else {
}
else {
deviceFilter = "( Device='X'"
+ ( ( chkJoystick.Checked ) ? string.Format( " OR Device = 'joystick'" ) : "" )
+ ( ( chkGamepad.Checked ) ? string.Format( " OR Device = 'xboxpad'" ) : "" )
@ -229,21 +231,25 @@ namespace SCJMapper_V2.Table
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 )
{
LastSize = this.Size;
if ( this.WindowState == FormWindowState.Normal )
LastSize = this.Size;
}
private void DGV_ColumnWidthChanged( object sender, DataGridViewColumnEventArgs e )
{
string setting = "";
foreach ( DataGridViewColumn col in DGV.Columns ) {
setting += string.Format( "{0};", col.Width.ToString( ) );
if ( this.WindowState == FormWindowState.Normal ) {
string setting = "";
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
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;
}
}
@ -308,9 +314,10 @@ namespace SCJMapper_V2.Table
// only if dirty and the Blended column ..
// 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
} else {
}
else {
DGV.Rows[DGV.CurrentCell.RowIndex].Cells[DGV.Columns["Disabled"].Index].Value = false;
}
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
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;
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 );
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 string Device { get; set; } // name of the device (uses DeviceClass)
public string DefBinding { get; set; } // the default binding
@ -77,7 +77,6 @@ namespace SCJMapper_V2.Actions
public ActionCls ReassignJsN( JsReassingList newJsList )
{
ActionCls newAc = this.MyClone( );
// creates a copy of the list with reassigned jsN devs
newAc.InputList.Clear( ); // get rid of cloned list
foreach ( ActionCommandCls acc in InputList ) {
@ -87,7 +86,6 @@ namespace SCJMapper_V2.Actions
return newAc;
}
/// <summary>
/// ctor
/// </summary>
@ -102,7 +100,6 @@ namespace SCJMapper_V2.Actions
InputList = new List<ActionCommandCls>( ); // empty list
}
/// <summary>
/// Creates and adds the inputCommand list with given input string
/// 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
/// apply default ActivationMode
/// </summary>
/// <param name="devInput"></param>
/// <param name="index"></param>
/// <returns></returns>
/// <param name="devInput">The input to apply</param>
/// <param name="index">The nodeindex</param>
/// <returns>The created ActionCommand</returns>
public ActionCommandCls AddCommand( string devInput, int index )
{
ActionCommandCls acc = new ActionCommandCls( devInput, index );
acc.ActivationMode = new ActivationMode( ActivationMode.Default );
ActionCommandCls acc = new ActionCommandCls( devInput, index ) {
ActivationMode = new ActivationMode( ActivationMode.Default )
};
InputList.Add( acc );
return acc;
}
/// <summary>
/// Delete an ActionCommand with nodeindex
/// </summary>
/// <param name="index">The nodeindex</param>
public void DelCommand( int index )
{
int removeIt = -1;
@ -144,7 +146,6 @@ namespace SCJMapper_V2.Actions
if ( removeIt >= 0 ) InputList.RemoveAt( removeIt );
}
/// <summary>
/// Merge action is simply copying the new input control
/// </summary>
@ -157,8 +158,6 @@ namespace SCJMapper_V2.Actions
}
}
/// <summary>
/// Updates an actionCommand with a new input (command)
/// </summary>
@ -193,7 +192,6 @@ namespace SCJMapper_V2.Actions
return acc;
}
/// <summary>
/// Find an ActionCommand with index in an Action
/// </summary>
@ -212,7 +210,6 @@ namespace SCJMapper_V2.Actions
return acc;
}
/// <summary>
/// Dump the action as partial XML nicely formatted
/// </summary>
@ -233,7 +230,6 @@ namespace SCJMapper_V2.Actions
r += string.Format( "\t\t</action>\n" );
}
}
return r;
}

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

@ -1,9 +1,4 @@

#define USE_DS_ACTIONMAPS
using System;
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
@ -111,10 +106,11 @@ namespace SCJMapper_V2.Actions
/// <returns>The ActionMaps copy with reassigned input</returns>
public ActionMapsCls ReassignJsN( JsReassingList newJsList )
{
var newMaps = new ActionMapsCls( this );
newMaps.m_uiCustHeader = (UICustHeader)this.m_uiCustHeader.Clone( );
newMaps.m_tuningOptions = (Tuningoptions)this.m_tuningOptions.Clone( );
newMaps.m_deviceOptions = (Deviceoptions)this.m_deviceOptions.Clone( );
var newMaps = new ActionMapsCls( this ) {
m_uiCustHeader = (UICustHeader)this.m_uiCustHeader.Clone( ),
m_tuningOptions = (Tuningoptions)this.m_tuningOptions.Clone( ),
m_deviceOptions = (Deviceoptions)this.m_deviceOptions.Clone( )
};
foreach ( ActionMapCls am in this ) {
newMaps.Add( am.ReassignJsN( newJsList ) ); // creates the deep copy of the tree
@ -125,7 +121,10 @@ namespace SCJMapper_V2.Actions
return newMaps;
}
/// <summary>
/// cTor: private copy constructor
/// </summary>
/// <param name="other"></param>
private ActionMapsCls( ActionMapsCls other )
{
this.version = other.version;
@ -135,7 +134,7 @@ namespace SCJMapper_V2.Actions
}
/// <summary>
/// ctor
/// cTor: plain, initializes values
/// </summary>
public ActionMapsCls()
{
@ -147,16 +146,14 @@ namespace SCJMapper_V2.Actions
for ( int i = 0; i < JoystickCls.JSnum_MAX; i++ ) {
m_js[i] = ""; m_GUIDs[i] = "";
}
// create the default mapped optiontree
CreateNewOptions( );
//LoadSupportedActionMaps( ); // get them from config @@@@@@@@@
// CreateNewOptions( );
}
private void CreateNewOptions()
/// <summary>
/// Helper to create all needed objs
/// </summary>
public void CreateNewOptions()
{
// create options objs
m_uiCustHeader = new UICustHeader( );
@ -171,11 +168,9 @@ namespace SCJMapper_V2.Actions
/// <param name="newAcm"></param>
private void Merge( ActionMapCls newAcm )
{
log.Debug( "Merge - Entry" );
// do we find an actionmap like the new one in our list ?
ActionMapCls ACM = this.Find( delegate ( ActionMapCls acm ) {
return acm.Name == newAcm.Name;
return acm.MapName == newAcm.MapName;
} );
if ( ACM == null ) {
; // 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 )
{
dsa.Clear( );
@ -196,7 +193,7 @@ namespace SCJMapper_V2.Actions
int AMcount = 1;
foreach ( ActionMapCls am in this ) {
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;
dsa.T_ActionMap.AddT_ActionMapRow( amr );
@ -205,10 +202,11 @@ namespace SCJMapper_V2.Actions
int ilIndex = 0;
while ( ac.InputList.Count > ilIndex ) {
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.REF_ActionMap = amShown;
ar.ActionName = ac.ActionName;
ar.ActionText = SCUiText.Instance.Text( ac.ActionName );
ar.Device = ac.Device;
ar.Def_Binding = ac.DefBinding;
ar.Def_Modifier = ac.DefActivationMode.Name;
@ -228,6 +226,11 @@ namespace SCJMapper_V2.Actions
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 )
{
foreach ( ActionMapCls am in this ) {
@ -236,7 +239,7 @@ namespace SCJMapper_V2.Actions
foreach ( ActionCls ac in am ) {
int ilIndex = 0;
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 );
ar.Usr_Binding = ac.InputList[ilIndex].DevInput;
ar.Usr_Modifier = ac.InputList[ilIndex].ActivationMode.Name;
@ -248,13 +251,8 @@ namespace SCJMapper_V2.Actions
}
}// each Action
}// each ActionMap
}
#endif
/// <summary>
/// Dump the ActionMaps as partial XML nicely formatted
/// </summary>
@ -281,7 +279,6 @@ namespace SCJMapper_V2.Actions
// close the tag
r += string.Format( ">\n" );
// *** CustomisationUIHeader
// 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_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
{
get { return m_tvCtrlRef; }
@ -70,8 +74,6 @@ namespace SCJMapper_V2.Actions
}
}
/// <summary>
/// If a node was selected, update it from the tree content
/// </summary>
@ -82,13 +84,15 @@ namespace SCJMapper_V2.Actions
NodeSelected( );
}
// filters
private bool m_showJoy = true;
private bool m_showGameP = true;
private bool m_showKbd = true;
private bool m_showMouse = true;
private bool m_showMappedOnly = false;
private string m_Filter = ""; // the tree content filter
/// <summary>
/// maintains the change status (gets reset by reloading the complete tree)
@ -100,9 +104,6 @@ namespace SCJMapper_V2.Actions
/// </summary>
public string IgnoreMaps { get; set; }
private string m_Filter = ""; // the tree content filter
/// <summary>
/// ctor
/// </summary>
@ -146,6 +147,9 @@ namespace SCJMapper_V2.Actions
#region Properties
/// <summary>
/// Returns if one can Assign a new binding on the selected node
/// </summary>
public bool CanAssignBinding
{
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 {
if ( Ctrl.SelectedNode == null ) return false;
@ -163,7 +170,7 @@ namespace SCJMapper_V2.Actions
}
/// <summary>
/// Returns true if a binding can be cleared
/// Returns true if a binding can be cleared on the selected node
/// </summary>
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
{
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
{
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 )
{
if ( Act.IsDisabledInput( input ) && m_showMappedOnly ) return false;
@ -231,7 +248,6 @@ namespace SCJMapper_V2.Actions
}
}
#endregion
/// <summary>
@ -262,7 +278,6 @@ namespace SCJMapper_V2.Actions
}
}
/// <summary>
/// Delete the selected ActionChild and remove corresponding ActionCommands
/// </summary>
@ -282,18 +297,22 @@ namespace SCJMapper_V2.Actions
FindAndSelectCtrlByName( matn.Name, ( matn.Parent as ActionTreeNode ).Action );
}
/// <summary>
/// Disables the binding of the selected node
/// </summary>
public void DisableBinding()
{
UpdateSelectedItem( DeviceCls.DisabledInput, Act.ActionDevice.AD_Unknown, false );
}
/// <summary>
/// Clears the binding of the selected node
/// </summary>
public void ClearBinding()
{
UpdateSelectedItem( "", Act.ActionDevice.AD_Unknown, false );
}
/// <summary>
/// Dumps the actions to an XML string
/// </summary>
@ -311,6 +330,10 @@ namespace SCJMapper_V2.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 )
{
// 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 )
{
log.DebugFormat( "UpdateMasterNode - Entry {0}", m_MasterTree.GetHashCode( ).ToString( ) );
@ -338,7 +365,6 @@ namespace SCJMapper_V2.Actions
}
}
/// <summary>
/// Find the master element for the given ActionNode
/// </summary>
@ -381,8 +407,6 @@ namespace SCJMapper_V2.Actions
return null;
}
/// <summary>
/// Apply the filter to the GUI TreeView
/// </summary>
@ -448,7 +472,6 @@ namespace SCJMapper_V2.Actions
ApplyFilter( ); // to the GUI tree
}
/// <summary>
/// Filters entries with given criteria
/// </summary>
@ -462,10 +485,9 @@ namespace SCJMapper_V2.Actions
#endregion
/// <summary>
/// Load Mappings into the ActionList and create the Master TreeView
/// Load Mappings from defaultProfile into the ActionList and create the Master TreeView
/// </summary>
/// <param name="defaultProfileName">The name of the profile to load (w extension)</param>
/// <param name="applyDefaults">True if default mappings should be carried on</param>
/// <param name="applyDefaults">True if default mappings should be used as current mappings</param>
public void LoadProfileTree( bool applyDefaults )
{
log.Debug( "LoadProfileTree - Entry" );
@ -507,8 +529,9 @@ namespace SCJMapper_V2.Actions
if ( !IgnoreMaps.Contains( "," + elem[iMap] + "," ) ) {
// must have 2 elements min
Array.Resize( ref cnl, 0 );
acm = new ActionMapCls { Name = elem[iMap] }; // get actionmap name
for ( int eIndex = iAction; eIndex < elem.Length; eIndex += 5 ) { // step 2 - action;actionlabel;defaultBinding;defaultActivationMode;defMultiTap come in as 5groups
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
if ( !string.IsNullOrEmpty( elem[eIndex] ) ) {
// default assignments
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
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...
if ( ActivationMode.IsDefault( defActivationModeName ) ) {
@ -586,9 +609,9 @@ namespace SCJMapper_V2.Actions
}
}//for
// ActionMap node
tn = new ActionTreeNode( acm.Name, cnl ) {
Name = acm.Name, ActionLabel = elem[iMapLabel],
Action = acm.Name, // name it to find it..
tn = new ActionTreeNode( acm.MapName, cnl ) {
Name = acm.MapName,
Action = acm.MapName, // name it to find it..
ImageIndex = 0, NodeFont = FontActionmap // new Font( m_MasterTree.Font, FontStyle.Bold );
};
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" );
// fix for defect TreeView (cut off bold text)
ActionMaps.CreateNewOptions( );
txReader = null;
Dirty = false;
@ -669,7 +693,6 @@ namespace SCJMapper_V2.Actions
// this is the main node with Action Cmd
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
// 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
// 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 ) ) {
@ -724,7 +747,6 @@ namespace SCJMapper_V2.Actions
ActionCls ac = FindActionObject( atn.Parent.Name, atn.Name ); // the related action in an actionmap
if ( ac == null ) return false; // ERROR exit
if ( checkKind && ( ac.ActionDevice != inKind ) ) return false; // ERROR exit
// ActionCommandCls acc = ac.FindActionInputObject( ActionTreeNode.CommandFromNodeText( atn.Text ) );
ActionCommandCls acc = ac.FindActionInputObject( atn.Command ); if ( acc == null ) return false; // ERROR exit
// have it - continue
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>
private ActionCommandCls FindActionInputObject( string actionMap, string actionKey, string devInput )
{
//log.Debug( "FindActionInputObject - Entry" );
// Apply the input to the ActionTree
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 ( ac != null ) acc = ac.InputList.Find( delegate ( ActionCommandCls _ACC ) { return _ACC.DevInput == devInput; } );
if ( acc == null ) {
@ -793,10 +814,9 @@ namespace SCJMapper_V2.Actions
/// <returns>An actionCommand or null if not found</returns>
private ActionCommandCls FindActionInputObject( ActionTree tree, string actionMap, string actionKey, int index )
{
//log.Debug( "FindActionInputObject - Entry" );
// Apply the input to the ActionTree
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 ( ac != null ) acc = ac.InputList.Find( delegate ( ActionCommandCls _ACC ) { return _ACC.NodeIndex == index; } );
if ( acc == null ) {
@ -814,10 +834,9 @@ namespace SCJMapper_V2.Actions
/// <returns>An action or null if not found</returns>
private ActionCls FindActionObject( string actionMap, string action )
{
//log.Debug( "FindActionObject - Entry" );
// Apply the input to the ActionTree
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 ( ac == null ) {
log.Error( "FindActionObject - Action Not found in tree" );
@ -842,7 +861,6 @@ namespace SCJMapper_V2.Actions
m_showMappedOnly = showMappedOnly;
}
/// <summary>
/// Loads the mappings back into the treeview control
/// 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( ) );
foreach ( ActionMapCls acm in ActionMaps ) {
if ( IgnoreMaps.Contains( "," + acm.Name + "," ) ) break; // next
if ( IgnoreMaps.Contains( "," + acm.MapName + "," ) ) break; // next
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
foreach ( ActionCls ac in acm ) {
ActionTreeNode matn = (ActionTreeNode)mtn.Nodes[ac.Key]; // get the action node
@ -871,10 +889,8 @@ namespace SCJMapper_V2.Actions
}
else {
// have to recreate the action child nodes
//ActionTreeInputNode matin = new ActionTreeInputNode( "UNDEF" ); matin.ImageKey = "Add";
ActionTreeInputNode matin = new ActionTreeInputNode( ac.ActionName ) { ImageKey = "Add" };
matin.Update( matn); matin.Command = "";
acc.NodeIndex = matin.Index; // assign visual reference
matn.Nodes.Add( matin ); // add to master tree
matin.UpdateAction( acc ); UpdateMasterNode( matin );
@ -895,7 +911,6 @@ namespace SCJMapper_V2.Actions
FilterTree( );
}
/// <summary>
/// Find a control that contains the string and mark it
/// this method is applied to the GUI TreeView only
@ -906,7 +921,6 @@ namespace SCJMapper_V2.Actions
log.Debug( "FindAndSelectActionKey - Entry" );
foreach ( ActionTreeNode tn in Ctrl.Nodes ) {
// if ( string.IsNullOrEmpty( actionmap ) || ( tn.Text == actionmap ) ) {
if ( string.IsNullOrEmpty( actionmap ) || ( tn.Action == actionmap ) ) {
// have to search nodes of nodes
foreach ( ActionTreeNode stn in tn.Nodes ) {
@ -948,8 +962,7 @@ namespace SCJMapper_V2.Actions
// have to search nodes of nodes
if ( string.IsNullOrEmpty( actionmap ) || ( tn.Action == actionmap ) ) {
foreach ( ActionTreeNode stn in tn.Nodes ) {
//if ( stn.Text.Contains( ctrl ) ) {
if ( stn.Contains( ctrl ) ) {
if ( stn.ContainsCtrl( ctrl ) ) {
if ( Ctrl.SelectedNode == stn ) NodeSelected( );
Ctrl.SelectedNode = stn;
Ctrl.SelectedNode.EnsureVisible( );
@ -957,8 +970,7 @@ namespace SCJMapper_V2.Actions
}
// have to search nodes of nodes
foreach ( ActionTreeInputNode sstn in stn.Nodes ) {
//if ( sstn.Text.Contains( ctrl ) ) {
if ( sstn.Contains( ctrl ) ) {
if ( sstn.ContainsCtrl( ctrl ) ) {
if ( Ctrl.SelectedNode == sstn ) NodeSelected( );
Ctrl.SelectedNode = sstn;
Ctrl.SelectedNode.EnsureVisible( );
@ -970,7 +982,6 @@ namespace SCJMapper_V2.Actions
}
}
/// <summary>
/// Find a control that contains the string and mark it
/// this method is applied to the GUI TreeView only
@ -1003,7 +1014,6 @@ namespace SCJMapper_V2.Actions
}
}
/// <summary>
/// Find all actions that are mapped to this input
/// </summary>
@ -1026,7 +1036,7 @@ namespace SCJMapper_V2.Actions
if ( ac.DefBinding == input ) {
ret.Add( "" );
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 );
}
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 );
if ( acc.ActivationMode == ActivationMode.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 );
}
}
@ -1075,7 +1085,7 @@ namespace SCJMapper_V2.Actions
if ( acc.ActivationMode == ActivationMode.Default )
aMode = string.Format( "default" );
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.WriteLn( );
used = true;
@ -1084,16 +1094,15 @@ namespace SCJMapper_V2.Actions
}
if ( ( !used ) && ac.DefBinding == input ) {
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( );
}
}
}
}
/// <summary>
/// Find a control the the actionmap that contains the Text
/// Find a control the the actionmap that contains the ActionText
/// </summary>
/// <param name="actionmap">The actionmap to find the string, empty string matches all actionmaps</param>
/// <param name="text">The string to find</param>
@ -1125,7 +1134,6 @@ namespace SCJMapper_V2.Actions
return FindText( "", text );
}
/// <summary>
/// Returns Action and Ctrl of the currently selected node
/// </summary>
@ -1138,15 +1146,11 @@ namespace SCJMapper_V2.Actions
if ( Ctrl.SelectedNode.Level == 1 ) {
ActionTreeNode matn = FindMasterAction( (ActionTreeNode)Ctrl.SelectedNode );
// action = ActionTreeNode.ActionFromNodeText( matn.Text );
// ctrl = ActionTreeNode.CommandFromNodeText( matn.Text );
action = matn.Action;
ctrl = matn.Command;
}
else if ( Ctrl.SelectedNode.Level == 2 ) {
ActionTreeNode matn = FindMasterAction( (ActionTreeInputNode)Ctrl.SelectedNode ); // the parent treenode
// action = ActionTreeNode.ActionFromNodeText( matn.Text );
// ctrl = ActionTreeNode.CommandFromNodeText( matn.Text );
action = matn.Action;
ctrl = matn.Command;
}
@ -1161,12 +1165,10 @@ namespace SCJMapper_V2.Actions
if ( Ctrl.SelectedNode == null ) return "";
if ( Ctrl.SelectedNode.Level == 1 ) {
ActionTreeNode matn = FindMasterAction( (ActionTreeNode)Ctrl.SelectedNode );
// return ActionTreeNode.CommandFromNodeText( matn.Text );
return matn.Command;
}
else if ( Ctrl.SelectedNode.Level == 2 ) {
ActionTreeNode matn = FindMasterAction( (ActionTreeInputNode)Ctrl.SelectedNode ); // the parent treenode
// return ActionTreeNode.CommandFromNodeText( matn.Text );
return matn.Command;
}
else return "";
@ -1182,12 +1184,10 @@ namespace SCJMapper_V2.Actions
if ( Ctrl.SelectedNode == null ) return "";
if ( Ctrl.SelectedNode.Level == 1 ) {
ActionTreeNode matn = FindMasterAction( (ActionTreeNode)Ctrl.SelectedNode );
// return ActionTreeNode.ActionFromNodeText( matn.Text );
return matn.Action;
}
else if ( Ctrl.SelectedNode.Level == 2 ) {
ActionTreeNode matn = FindMasterAction( (ActionTreeNode)Ctrl.SelectedNode.Parent ); // the parent treenode
// return ActionTreeNode.ActionFromNodeText( matn.Text );
return matn.Action;
}
else return "";
@ -1210,7 +1210,6 @@ namespace SCJMapper_V2.Actions
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
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
// have it - continue
string actionID = DS_ActionMap.ActionID( atn.Parent.Name, ac.Key, acc.NodeIndex );
@ -1277,15 +1276,13 @@ namespace SCJMapper_V2.Actions
}
/// <summary>
/// Reports a summary list of the mapped items
/// </summary>
/// <returns></returns>
public string ReportActions()
{
log.Debug( "FindCtrl - ReportActions" );
log.Debug( "ReportActions - Entry" );
string repList = "";
// 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] );
}
// now the mapped actions
const int padAction = 42;
const int padAction = 50;
const int padDevice = 4;
const int padInput = 25;
repList += string.Format( "\n" );
repList += string.Format( " {0}+- {1} _ {2}#-[{4}] {3}\n\n", "Action".PadRight( padAction ), "Dev".PadRight( padDevice ), "Binding".PadRight( padInput ), "Activation", "T" ); // col description line
repList += string.Format( " {0}+- {1} _ {2}#-[{4}] {3}\n\n", "Action".PadRight( padAction ),
"Dev".PadRight( padDevice ),
"Binding".PadRight( padInput ),
"Activation", "T" ); // col description line
foreach ( ActionMapCls acm in ActionMaps ) {
string rep = string.Format( "*** {0}\n", acm.Name );
string rep = string.Format( "*** {0}\n", SCUiText.Instance.Text( acm.MapName ) );
repList += rep;
foreach ( ActionCls ac in acm ) {
foreach ( ActionCommandCls acc in ac.InputList ) {
if ( ShowAction( ac.ActionDevice, acc.Input ) ) {
if ( !string.IsNullOrEmpty( acc.Input ) /* && !( acc.Input == DeviceCls.BlendedInput )*/ ) {
string actionName = SCUiText.Instance.Text( ac.ActionName );
if ( actionName.Length > padAction ) actionName = actionName.Substring( 0, padAction );
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 {
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 ) {
rep += string.Format( " . [{1}] {0}\n", ac.DefActivationMode.Name, ac.DefActivationMode.MultiTap );
@ -1330,14 +1332,13 @@ namespace SCJMapper_V2.Actions
return repList;
}
/// <summary>
/// Reports a summary list of the mapped items
/// </summary>
/// <returns></returns>
public string ReportActionsCSV( bool listModifiers )
{
log.Debug( "FindCtrl - ReportActions2" );
log.Debug( "ReportActionsCSV - Entry" );
string repList = "";
// JS assignments
@ -1384,7 +1385,8 @@ namespace SCJMapper_V2.Actions
}
// action changed - restart collection
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
if ( listModifiers ) {
kbA = "n.a.;;;;"; // defaults tag;input;mod-tag;mod-name;mod-mult

@ -7,67 +7,12 @@ using System.Windows.Forms;
namespace SCJMapper_V2.Actions
{
/// <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>
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
/// <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.ImageKey = srcNode.ImageKey;
this.Tag = srcNode.Tag;
this.m_actionLabel = srcNode.m_actionLabel;
this.m_action = srcNode.m_action;
this.m_actionDevice = srcNode.m_actionDevice;
this.m_actionText = srcNode.m_actionText;
@ -165,7 +164,6 @@ namespace SCJMapper_V2.Actions
}
// 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
private string m_action = ""; // i.e. v_pitch
protected string m_command = ""; // i.e. js2_button3
@ -176,9 +174,9 @@ namespace SCJMapper_V2.Actions
/// Crates the translated node text for display
/// </summary>
/// <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 ) ) {
return tAction; // v_eject
@ -194,8 +192,6 @@ namespace SCJMapper_V2.Actions
}
}
/// <summary>
/// Update this node from the other node
/// applies dynamic props only
@ -205,10 +201,11 @@ namespace SCJMapper_V2.Actions
{
// TreeNode props
this.BackColor = other.BackColor;
this.ToolTipText = other.ToolTipText;
// own props
this.Command = other.Command;
this.Modified = other.Modified;
this.ActionLabel = other.ActionLabel;
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;
if ( this.Level == 2 ) {
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
@ -244,29 +240,10 @@ namespace SCJMapper_V2.Actions
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>
/// Property ActionText (action in profile notation i.e. v_something) of an Action node
/// </summary>
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>
/// Property Action of an Action node
@ -277,6 +254,7 @@ namespace SCJMapper_V2.Actions
set {
m_action = value;
// may need to update too
this.ToolTipText = m_action;
m_actionText = ActionTreeNode.ComposeNodeActionText( m_action, m_command, m_modified );
base.Text = ComposeNodeText( );
}
@ -306,19 +284,37 @@ namespace SCJMapper_V2.Actions
m_modified = value;
// may need to update too
m_actionText = ActionTreeNode.ComposeNodeActionText( m_action, m_command, m_modified );
base.Text = ComposeNodeText( );
base.Text = ComposeNodeText( );
}
}
/// <summary>
/// Property ActionDevice of an Action node
/// </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; }
set {
m_actionDevice = value;
}
string m = match.ToLowerInvariant( );
if ( m_command.Contains( m ) ) return true;
return false;
}
/// <summary>
@ -326,9 +322,10 @@ namespace SCJMapper_V2.Actions
/// </summary>
/// <param name="match">A string to match</param>
/// <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;
}

Binary file not shown.
Loading…
Cancel
Save