示例#1
0
 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);
     }
 }
示例#2
0
 public void FastestDwellTime()
 {
     GazeInput.SetFixationDuration(KeyGrid, new TimeSpan(0, 0, 0, 0, 10));
     GazeInput.SetDwellDuration(KeyGrid, new TimeSpan(0, 0, 0, 0, 0));
 }
示例#3
0
 public void SlowDwellTime()
 {
     GazeInput.SetFixationDuration(KeyGrid, new TimeSpan(0, 0, 0, 0, 200));
     GazeInput.SetDwellDuration(KeyGrid, new TimeSpan(0, 0, 0, 0, 200));
 }