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.Linq; using System.Text; using System.Threading.Tasks; namespace SCJMapper_V2.Devices { /// /// Collects and provides the device instances throughout the application /// Remark: pls use the ..Ref properties unless assiging the instance /// public sealed class DeviceInst { /// /// Holds the DXInput Joystick List /// static private JoystickList m_Joystick = new JoystickList( ); static public JoystickList JoystickListInst { get => m_Joystick; } /// /// Provides the JoystickList of instances found in this system /// static public JoystickList JoystickListRef { get => m_Joystick; } /// /// Holds the DXInput Joystick List /// static private JoystickCls m_curJoystick = null; static public JoystickCls JoystickInst { set => m_curJoystick = value; } /// /// Provides the 'current' Joystick instance /// static public JoystickCls JoystickRef { get => m_curJoystick; } /// /// Holds the DXInput keyboard /// static private GamepadCls m_Gamepad = null; static public GamepadCls GamepadInst { set => m_Gamepad = value; } /// /// Provides the first Gamepad instance found in this system /// static public GamepadCls GamepadRef { get => m_Gamepad; } /// /// Holds the DXInput keyboard /// static private KeyboardCls m_Keyboard = null; static public KeyboardCls KeyboardInst { set => m_Keyboard = value; } /// /// Provides the first Keyboard instance found in this system /// static public KeyboardCls KeyboardRef { get => m_Keyboard; } /// /// Holds the DXInput mouse /// static private MouseCls m_Mouse = null; static public MouseCls MouseInst { set => m_Mouse = value; } /// /// Provides the first Mouse instance found in this system /// static public MouseCls MouseRef { get => m_Mouse; } } }