summaryrefslogtreecommitdiff
path: root/grapher/Models/Mouse/MouseData.cs
diff options
context:
space:
mode:
authorJacob Palecki <[email protected]>2020-09-22 13:08:31 -0700
committerJacob Palecki <[email protected]>2020-09-22 13:08:31 -0700
commit45285413a94c9c081098c672e69e9811ac5262b7 (patch)
tree4c89d57a30226e2d1c007547fa5cf787118f3158 /grapher/Models/Mouse/MouseData.cs
parentFix bug & rename x axis to input speed (diff)
downloadrawaccel-45285413a94c9c081098c672e69e9811ac5262b7.tar.xz
rawaccel-45285413a94c9c081098c672e69e9811ac5262b7.zip
Rename experiment two to motivity
Diffstat (limited to 'grapher/Models/Mouse/MouseData.cs')
-rw-r--r--grapher/Models/Mouse/MouseData.cs49
1 files changed, 49 insertions, 0 deletions
diff --git a/grapher/Models/Mouse/MouseData.cs b/grapher/Models/Mouse/MouseData.cs
new file mode 100644
index 0000000..e59a969
--- /dev/null
+++ b/grapher/Models/Mouse/MouseData.cs
@@ -0,0 +1,49 @@
+using System;
+
+namespace grapher.Models.Mouse
+{
+ public class MouseData
+ {
+ #region Constructors
+
+ public MouseData()
+ {
+ Lock = new Object();
+ X = 0;
+ Y = 0;
+ }
+
+ #endregion Constructors
+
+ #region Properties
+
+ public Object Lock { get; }
+
+ private int X { get; set; }
+ private int Y { get; set; }
+
+ public void Set(int x, int y)
+ {
+ lock (Lock)
+ {
+ X = x;
+ Y = y;
+ }
+ }
+
+ #endregion Properties
+
+ #region Methods
+
+ public void Get(out int x, out int y)
+ {
+ lock (Lock)
+ {
+ x = X;
+ y = Y;
+ }
+ }
+
+ #endregion Methods
+ }
+}