diff options
Diffstat (limited to 'grapher/Models/Mouse/MouseWatcher.cs')
| -rw-r--r-- | grapher/Models/Mouse/MouseWatcher.cs | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/grapher/Models/Mouse/MouseWatcher.cs b/grapher/Models/Mouse/MouseWatcher.cs index fea4e2d..405110e 100644 --- a/grapher/Models/Mouse/MouseWatcher.cs +++ b/grapher/Models/Mouse/MouseWatcher.cs @@ -1,16 +1,12 @@ using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; namespace grapher.Models.Mouse { public class MouseWatcher { + #region External /// <summary> /// Enumeration containing HID usage page flags. /// </summary> @@ -677,6 +673,10 @@ namespace grapher.Models.Mouse [DllImport("user32.dll")] public static extern int GetRawInputData(IntPtr hRawInput, RawInputCommand uiCommand, out RawInput pData, ref int pcbSize, int cbSizeHeader); + #endregion External + + #region Constructors + public MouseWatcher(Form containingForm, Label display, AccelCharts accelCharts) { ContainingForm = containingForm; @@ -695,6 +695,10 @@ namespace grapher.Models.Mouse PollTime = 1; } + #endregion Constructors + + #region Properties + private Form ContainingForm { get; } private Label Display { get; } @@ -703,6 +707,10 @@ namespace grapher.Models.Mouse private double PollTime { get; } + #endregion Properties + + #region Methods + public void OnMouseMove(int x, int y, double timeInMs) { Display.Text = $"Last (x, y): ({x}, {y})"; @@ -723,5 +731,7 @@ namespace grapher.Models.Mouse } } + + #endregion Methods } } |