summaryrefslogtreecommitdiff
path: root/grapher/Models/Mouse/MouseWatcher.cs
diff options
context:
space:
mode:
authorJacob Palecki <[email protected]>2020-09-01 02:18:41 -0700
committerJacob Palecki <[email protected]>2020-09-01 02:18:41 -0700
commit246fb772c5bf7dd6a85143fadebece3b4d9f1e04 (patch)
tree454c869d44c69a0e7603ceb1e03de8a3e4f5e70a /grapher/Models/Mouse/MouseWatcher.cs
parentShow xy charts only when accel applied by component (diff)
downloadrawaccel-246fb772c5bf7dd6a85143fadebece3b4d9f1e04.tar.xz
rawaccel-246fb772c5bf7dd6a85143fadebece3b4d9f1e04.zip
Add constants class and separate classes into regions
Diffstat (limited to 'grapher/Models/Mouse/MouseWatcher.cs')
-rw-r--r--grapher/Models/Mouse/MouseWatcher.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/grapher/Models/Mouse/MouseWatcher.cs b/grapher/Models/Mouse/MouseWatcher.cs
index fea4e2d..6f6b776 100644
--- a/grapher/Models/Mouse/MouseWatcher.cs
+++ b/grapher/Models/Mouse/MouseWatcher.cs
@@ -11,6 +11,7 @@ namespace grapher.Models.Mouse
{
public class MouseWatcher
{
+ #region External
/// <summary>
/// Enumeration containing HID usage page flags.
/// </summary>
@@ -677,6 +678,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 +700,10 @@ namespace grapher.Models.Mouse
PollTime = 1;
}
+ #endregion Constructors
+
+ #region Properties
+
private Form ContainingForm { get; }
private Label Display { get; }
@@ -703,6 +712,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 +736,7 @@ namespace grapher.Models.Mouse
}
}
+
+ #endregion Methods
}
}