private void setDwellAllButtons(object uiElement, int dwellMillis) { if (uiElement is Button) { GazeInput.SetDwellDuration((Button)uiElement, new TimeSpan(0, 0, 0, 0, dwellMillis)); } else if (uiElement is Panel) { var uiElementAsCollection = (Panel)uiElement; foreach (var element in uiElementAsCollection.Children) { setDwellAllButtons(element, dwellMillis); } } else if (uiElement is UserControl) { var uiElementAsUserControl = (UserControl)uiElement; setDwellAllButtons(uiElementAsUserControl.Content, dwellMillis); } else if (uiElement is ContentControl) { var uiElementAsContentControl = (ContentControl)uiElement; setDwellAllButtons(uiElementAsContentControl.Content, dwellMillis); } }
public void FastestDwellTime() { GazeInput.SetFixationDuration(KeyGrid, new TimeSpan(0, 0, 0, 0, 10)); GazeInput.SetDwellDuration(KeyGrid, new TimeSpan(0, 0, 0, 0, 0)); }
public void SlowDwellTime() { GazeInput.SetFixationDuration(KeyGrid, new TimeSpan(0, 0, 0, 0, 200)); GazeInput.SetDwellDuration(KeyGrid, new TimeSpan(0, 0, 0, 0, 200)); }