aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.RemoteDesktop/Input/MouseController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.RemoteDesktop/Input/MouseController.cs')
-rw-r--r--Software/Visual_Studio/Tango.RemoteDesktop/Input/MouseController.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.RemoteDesktop/Input/MouseController.cs b/Software/Visual_Studio/Tango.RemoteDesktop/Input/MouseController.cs
index ec556f88c..ce3a3eb09 100644
--- a/Software/Visual_Studio/Tango.RemoteDesktop/Input/MouseController.cs
+++ b/Software/Visual_Studio/Tango.RemoteDesktop/Input/MouseController.cs
@@ -4,6 +4,7 @@ using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
+using WindowsInput;
namespace Tango.RemoteDesktop.Input
{
@@ -33,6 +34,13 @@ namespace Tango.RemoteDesktop.Input
[DllImport("user32.dll")]
private static extern void mouse_event(int dwFlags, int dx, int dy, int dwData, int dwExtraInfo);
+ private static InputSimulator simulator;
+
+ static MouseController()
+ {
+ simulator = new InputSimulator();
+ }
+
public static void SetCursorPosition(int x, int y)
{
SetCursorPos(x, y);
@@ -64,6 +72,11 @@ namespace Tango.RemoteDesktop.Input
;
}
+ public static void DoubleClick()
+ {
+ simulator.Mouse.LeftButtonDoubleClick();
+ }
+
[StructLayout(LayoutKind.Sequential)]
public struct MousePoint
{