Skip to content

Commit 709553b

Browse files
committed
Changed workings of Dwell settings to change the maximum if a user entered too high a number. Set maximum value to 10s. Also reformed the UI to make it more obvious the time is in ms.
1 parent eddf9e0 commit 709553b

File tree

2 files changed

+17
-28
lines changed

2 files changed

+17
-28
lines changed

VehicleApp/VehicleApp/TobiiSettings.Designer.cs

Lines changed: 12 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

VehicleApp/VehicleApp/TobiiSettings.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ public partial class TobiiSettings : Form
2020

2121
public int DwellTime { get { return dwellTime; } }
2222

23-
public TobiiSettings(int gt)
23+
public TobiiSettings(int dt)
2424
{
2525
InitializeComponent();
2626

2727
// Get the EyeX host.
2828
_eyeXHost = Program.EyeXHost;
2929

30-
dwellTime = gt;
30+
dwellTime = dt;
3131

3232
numDwellTime.Value = dwellTime;
3333
sliderDwellTime.Value = dwellTime;
@@ -87,6 +87,9 @@ private void UpdateUserPresence(EngineStateValue<UserPresence> value)
8787
#region Gaze Time
8888
private void numDwellTime_ValueChanged(object sender, EventArgs e)
8989
{
90+
if (numDwellTime.Value > sliderDwellTime.Maximum)
91+
sliderDwellTime.Maximum = (int)numDwellTime.Value;
92+
9093
sliderDwellTime.Value = (int)numDwellTime.Value;
9194
dwellTime = (int)numDwellTime.Value;
9295
}

0 commit comments

Comments
 (0)