diff options
| author | Jacob Palecki <[email protected]> | 2021-01-07 23:11:24 -0800 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2021-01-07 23:11:24 -0800 |
| commit | 8273ecf0c22876f0f4e9dfa9eb29b9d491614faa (patch) | |
| tree | 089cb8e024722781670433502e1452a59456cc6a /grapher/Models/AccelGUI.cs | |
| parent | rough GUI integration of "Device Hardware ID" (diff) | |
| download | rawaccel-8273ecf0c22876f0f4e9dfa9eb29b9d491614faa.tar.xz rawaccel-8273ecf0c22876f0f4e9dfa9eb29b9d491614faa.zip | |
Refactor
Diffstat (limited to 'grapher/Models/AccelGUI.cs')
| -rw-r--r-- | grapher/Models/AccelGUI.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/grapher/Models/AccelGUI.cs b/grapher/Models/AccelGUI.cs index 5c25813..9f97eed 100644 --- a/grapher/Models/AccelGUI.cs +++ b/grapher/Models/AccelGUI.cs @@ -1,4 +1,5 @@ using grapher.Models.Calculations; +using grapher.Models.Devices; using grapher.Models.Mouse; using grapher.Models.Options; using grapher.Models.Serialized; @@ -23,7 +24,8 @@ namespace grapher Button writeButton, ButtonBase toggleButton, MouseWatcher mouseWatcher, - ToolStripMenuItem scaleMenuItem) + ToolStripMenuItem scaleMenuItem, + DeviceIDManager deviceIDManager) { AccelForm = accelForm; AccelCalculator = accelCalculator; @@ -36,6 +38,7 @@ namespace grapher DefaultButtonFont = WriteButton.Font; SmallButtonFont = new Font(WriteButton.Font.Name, WriteButton.Font.Size * Constants.SmallButtonSizeFactor); MouseWatcher = mouseWatcher; + DeviceIDManager = deviceIDManager; ScaleMenuItem.Click += new System.EventHandler(OnScaleMenuItemClick); WriteButton.Click += new System.EventHandler(OnWriteButtonClick); @@ -95,6 +98,8 @@ namespace grapher public ToolStripMenuItem ScaleMenuItem { get; } + public DeviceIDManager DeviceIDManager { get; } + private Timer ChartRefresh { get; } private Font SmallButtonFont { get; } @@ -142,7 +147,7 @@ namespace grapher args = newArgs, minimumTime = driverSettings.minimumTime, directionalMultipliers = driverSettings.directionalMultipliers, - deviceHardwareID = driverSettings.deviceHardwareID + deviceHardwareID = DeviceIDManager.HWID, }; ButtonDelay(WriteButton); |