// gaze event handler private async void FormMain_GazeUpdated(object o, FormMain.GazeEventArgs e) { // update last feature this.lastFeature = e; // store feature to queue recentFeatures.Enqueue(e.EyeFeature); // request to redraw window this.Invalidate(); // schedule to remove feature after specified time await Task.Delay(settings.GazeLostTime); recentFeatures.Dequeue(); }
// gaze update handler private void FormMain_GazeUpdated(object o, FormMain.GazeEventArgs e) { fixationDetector.AddGazePosition(e.PredictedGaze, e.EyeFeature); this.Invalidate(); }