summaryrefslogtreecommitdiff
path: root/grapher/Models/AccelGUI.cs
diff options
context:
space:
mode:
authorJacob Palecki <[email protected]>2020-08-13 01:52:49 -0700
committerJacob Palecki <[email protected]>2020-08-13 01:52:49 -0700
commit93a22c08b3223b040c3a3644fc3c4ef82fc576f0 (patch)
tree336d99789e3dac52466c00fb5e07fc82a73c3bc8 /grapher/Models/AccelGUI.cs
parentAlmost working (diff)
downloadrawaccel-93a22c08b3223b040c3a3644fc3c4ef82fc576f0.tar.xz
rawaccel-93a22c08b3223b040c3a3644fc3c4ef82fc576f0.zip
Dot to show mouse move
Diffstat (limited to 'grapher/Models/AccelGUI.cs')
-rw-r--r--grapher/Models/AccelGUI.cs15
1 files changed, 9 insertions, 6 deletions
diff --git a/grapher/Models/AccelGUI.cs b/grapher/Models/AccelGUI.cs
index 5a46a73..a63bf07 100644
--- a/grapher/Models/AccelGUI.cs
+++ b/grapher/Models/AccelGUI.cs
@@ -1,4 +1,5 @@
using grapher.Models.Calculations;
+using grapher.Models.Mouse;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@@ -11,7 +12,7 @@ using System.Windows.Forms.DataVisualization.Charting;
namespace grapher
{
public class AccelGUI
- {
+ {
#region constructors
@@ -28,7 +29,8 @@ namespace grapher
Option acceleration,
Option limtOrExp,
Option midpoint,
- Button writeButton)
+ Button writeButton,
+ Label mouseMoveLabel)
{
AccelForm = accelForm;
AccelCharts = accelCharts;
@@ -43,10 +45,11 @@ namespace grapher
LimitOrExponent = limtOrExp;
Midpoint = midpoint;
WriteButton = writeButton;
- AccelData = new AccelData();
ManagedAcceleration.ReadFromDriver();
UpdateGraph();
+
+ MouseWatcher = new MouseWatcher(AccelForm, mouseMoveLabel, AccelCharts);
}
#endregion constructors
@@ -79,7 +82,7 @@ namespace grapher
public Button WriteButton { get; }
- public AccelData AccelData { get; }
+ public MouseWatcher MouseWatcher { get; }
#endregion properties
@@ -88,8 +91,8 @@ namespace grapher
public void UpdateGraph()
{
- AccelCalculator.Calculate(AccelData, ManagedAcceleration, Sensitivity.Fields.X);
- AccelCharts.Bind(AccelData);
+ AccelCalculator.Calculate(AccelCharts.AccelData, ManagedAcceleration, Sensitivity.Fields.X, Sensitivity.Fields.Y);
+ AccelCharts.Bind();
}
#endregion methods