diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2020-03-19 02:13:01 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2020-03-19 02:13:01 +0200 |
| commit | fb8342a8ec237f5646a4807b63c12f6afe3ba290 (patch) | |
| tree | efce179c712ea20d2b8f3d90f39c8d1765d33ea2 /Software/Visual_Studio/Tango.RemoteDesktop/Input/MouseController.cs | |
| parent | 7320824d1fc827b25327a2aaa3d571480b40975c (diff) | |
| download | Tango-fb8342a8ec237f5646a4807b63c12f6afe3ba290.tar.gz Tango-fb8342a8ec237f5646a4807b63c12f6afe3ba290.zip | |
Improved monitoring.
Implemented RDP keyboard/double click.
Diffstat (limited to 'Software/Visual_Studio/Tango.RemoteDesktop/Input/MouseController.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.RemoteDesktop/Input/MouseController.cs | 13 |
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 { |
