SCJMapper-V2/DeviceCls.cs
bm98 29ebc857fe V2.18 Build51 2.nd push for preRelease
fixed #36 Ctrl key works now
fix - keyboard command formatting
ActivationMode handling finished
user ActivationMode change indication in mapping tree
partial internal cleanup
doc update
2016-01-03 00:15:26 +01:00

57 lines
1.9 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SCJMapper_V2
{
/// <summary>
/// Basic device as DXInput device
/// </summary>
public abstract class DeviceCls
{
public const String DeviceClass ="UNDEF";
public const String DeviceID = "NA0_";
static public Boolean IsUndefined( String deviceClass )
{
return ( deviceClass == DeviceClass );
}
public const String BlendedInput = "~"; // internal used only
static public Boolean IsBlendedInput( String input ) { return ( input == BlendedInput ); }
static public Boolean IsDeviceClass( String deviceClass ) { return false; }
static public String DeviceClassFromInput( String input ) { return DeviceClass; }
static public String DevInput( String input ) { return input; }
static public Boolean DevMatch( String devInput ) { return false; }
public abstract String DevClass { get; }
public abstract String DevName { get; }
public abstract System.Drawing.Color MapColor { get; }
public abstract Boolean Activated { get; set; }
public virtual void FinishDX( ) { }
public virtual void ApplySettings( ) { }
public abstract String GetLastChange( );
public abstract void GetCmdData( String cmd, out int data );
public abstract void GetData( );
static public String toXML( String blendedInput )
{
return blendedInput.Replace( BlendedInput, " " ); // must make spaces (tilde is for internal processing only)
}
static public String toXMLBlendExtension( String blendedInput )
{
return (IsBlendedInput(blendedInput) ? string.Format( "multiTap=\"1\"") : "" ); // blending needs to overwrite potential multitaps (2+)
}
static public String fromXML( String blendedInput )
{
return blendedInput.Replace( " ", BlendedInput ); // must make tilde (spaces is for external processing only)
}
}
}