Helper class to count the number of mouse devices connected to the computer.
This makes it possible to check the availability of Mouse support.
View code on GitHub
Inheritance Hierarchy
DeltaEngine.Input.Windows MouseDeviceCounter
Namespace: DeltaEngine.Input.Windows
Assembly: DeltaEngine.Input.Windows (in DeltaEngine.Input.Windows.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The MouseDeviceCounter type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | MouseDeviceCounter | Initializes a new instance of the MouseDeviceCounter class |
Methods
Name | Description | |
---|---|---|
![]() | GetNumberOfAvailableMice |
Remarks
Examples
[Test] public void GetNumberOfAvailableMice() { Assert.DoesNotThrow(delegate { var counter = new MouseDeviceCounter(); Assert.Greater(counter.GetNumberOfAvailableMice(), 0); }); }
[Test] public void DeviceCounterInMouseProperty() { var windowsMouse = GetMouse(); Assert.IsTrue(windowsMouse.IsAvailable); }
See Also